rocketchat / apps.notion Goto Github PK
View Code? Open in Web Editor NEWIntegrating Notion with Rocket.Chat
Home Page: https://github.com/Nabhag8848/Google-Summer-Of-Code
Integrating Notion with Rocket.Chat
Home Page: https://github.com/Nabhag8848/Google-Summer-Of-Code
We can add a /notion list pages
command to show the names of all the pages available in the workspace.
@Nabhag8848 can I work on this issue?
From the "Create Subpage or Record" modal, we can navigate to the "Create Database" modal. However, there is no provision to go back or go to the "Create Subpage or Record" modal from here. This behavior is not user-friendly, and therefore, I believe this needs to be implemented.
No response
For Eg:
/notion create
For eg:
Similar to Following we support in this app:
v6.5.3
Chrome
v6.5
Chrome
In the Create Page or Database modal, when selecting a database, a different set of inputs has to be filled. Conversely, when selecting a page, only the title should be filled. However, the title input is visible at all times, even when nothing is selected. This is unexpected behavior because, for both databases and pages, the input requirements are different.
v6.6.0-develop
Microsoft Edge
onInstallation
message and when running /notion connect
text in notification is breaking into two lines. we need to make an notification such that it appears in single line even though username is large.
Incase of onInstallation
message we need to attach the layout to top the the Hey username
welcome to notion app message below the layout.
/notion connect
with large username.v6.5
Chrome
running rocket.chat on local machine.
Installed using docker.
The Apps.Notion was installed using the steps in the readme.
/notion
command is working. It is showing the list of valid commands.
When i do /notion create
and open the link to connect to workspace i am getting the above error.
I have set client id and secrete correctly.
below is the webhook of the bot
http://localhost:3000/api/apps/public/<Some-key-i-don't-know-whether-it-is-save-to-share-on-github>/webhook
Also when i do curl -X GET http://localhost:3000/api/apps/public/<Some-key-i-don't-know-whether-it-is-save-to-share-on-github>/webhook
output: Cannot read property 'roomId' of undefined
/notion create
in rocket.chat channelNo response
v6.5
Chrome
-Sharing Notion pages within Rocket.Chat. Firstly, it can improve collaboration and communication within teams as it allows team members to easily share.This can streamline workflows and increase productivity by reducing the need to switch between multiple applications.
/notion create database
command from the Rocket.Chat message input field will open a modal having elements about what workspace the user is connected to, and the dropdown to search the page. A Title input field is the title of the database and the Choose Type dropdown to choose the notion database field type.InputElement
to name the field of the selected types including the Add Property button below the field name.No response
No response
There is already a command for creating databases which displays modal for database creation
But still Create Page or Record modal is having a dropdown for database creation which in my opinion unnecessary for the Create Page or Record modal which is intended to create page or record
Steps to reproduce
No response
The /notion comment command can be useful for teams who use Notion as their secondary collaboration tool. This command enables users to comment on Notion pages directly from Rocket.Chat, making it easier to collaborate and share feedback without having to switch between different applications.
When the user will run /notion comment it will open up the modal having the icon and name of the connected workspace with the dropdown where the user can search for the page and a multiline input field to leave a comment.
Furthermore, Comments on a page support rich text formatting such as bold, italic, code, strikethrough, and more. We will be handling all of these as the multiline input field supports markdown.
When User clicks on Share button it will create the Comment in Notion Page and there will be comment as Message in RocketChat Channel. Now when the user reply in that thread the comment will be automatically created in Notion but there are security concerns with this.
Now We Will have a Following:
When User runs command /notion comment it will trigger a block with the search page dropdown where user can search for page and Multline Input where user can leave a comment which also supports markdown.
when user clicks on Comment On Page it will create the Comment in Notion.
After Selecting the Page when User Clicks on the View Comments. It will Open Up the Contextual bar from Side with PageName as Header. And will show up all the Unresolved Comments. Each Comment will have associated UserName and Its Profile with the Created time.
In Case If there are Comments created in Notion while we are using the feature. User Can Click On Refresh For New Comments which will update the Contextual bar to have the New Comments.
No response
No response
/notion connect
will send the following message in the current room with greetings having the name of the user. When the user clicks Connect to workspace they will be redirected to the Notion website where they will be prompted to authorize Rocket.Chat to access their Notion account. if Authorized, redirected payload back to Rocket.Chat./notion disconnect
command they will get disconnected from the current connected workspace (if any).connect
and disconnect
.Connect to Workspace
button alerting user not connected.v6.5
Chrome
I believe it would be beneficial to implement a feature where users can utilize a '/notion append' command, triggering a modal. Within this modal, users can select pages and find a text area field to add their content, allowing them to save content it directly to Notion without the need to send a message to any channel in Rocket Chat. They could optionally add heading as well to their page. Currently, users have to send a message first before and then send it to page.
The current screenshot was created by editing elements in the inspect element tool to illustrate how it might appear. The same design can be implemented in reality.
Expected Output on Notion Page:
No response
The /notion create
command will allow users to create a new record or page in their Notion workspace directly from the Rocket.Chat. This command simplifies the workflow for users who want to quickly create a new record or page without having to switch between different applications.
When a user runs the /notion create
command from the Rocket.Chat message input field will open a modal having elements about what workspace the user is connected to, and the dropdown to search the page or database. A Title input field is the title of the database record or the title of the page.
Now users will able to search for pages or databases from keywords and according to whether the selected search is page or database modal may be updated. let's talk about when the user selects the page by searching the page name once selected there will be no changes to the modal and the user can provide the title name and create the subpage inside the page.
Now in the case when the user will search for a database and selects database then the modal will be updated with the button Add Property which will be used to add the other fields in the database one by one.
Now, when the user selects the database it will have different types of notion property, mentioning some of them, which includes Date, Email, People, Phone Number, Select, Title, URL, MultiSelect and more of them can be handled by our uikit elements such as IInputElement, IStaticSelectElement, IMultiStaticElement, DatePicker, etc.
Now, When the user wants to add the property it will pressing the button Add Property will show the dropdown having the property name having the label name as Property. Now, for example, when the user selects the property of type Date, we will accordingly update the later element. The following is a glimpse of the same.
If the property within the database is left to add, the user every time will have two options.
If all the property has been added then the only option user will have is to Create a Record in this case we will update the modal to remove the Add Property Button having the state of the modal maintained.
The Implementation of the selecting page or db is mentioned in the later section to avoid the redundancy of text within each feature. We will be using a POST /search endpoint for the search of pages or databases. Now the payload contains a property to know whether it's a database or page based on it will update the modal to Add or Remove AddProperty button which can be achieved by updateSurfaceView by creating the replica of the modal with the same state and just adding or removing the button.
To get the property (columns) of the database we will be using Retrieve a database endpoint and now each time when the property has been added we will be removing that property from the dropdown by updating the modal. Also based on the type of property we will be creating the element which I mentioned above. Once the user press Create button we will show the message in the channel about the record that has been created with more info about the workspace and mention the name of who created that record.
For creating the page or record within the database we will be using Create a Page Endpoint. Furthermore, we will have a feature to remove already added properties within the modal by providing the button Remove below within each added property.
/notion create
commandI was expecting to get the avatar_url and name in the footer after authorizing but I am getting undefined.
Just connect to notion and check the first message you get after coming back to rocket chat room.
v6.5.2
Chrome
On clicking the share button, the button doesnt disable once the user has clicked it - leading to sharing multiple times incase the user clicked it again while being impatient
/notion share
modal, select a pageLoom video for reference - https://www.loom.com/share/bad29039f1a34ffe9b9f50ea6d7ec325?sid=9d99a61a-35af-43df-9988-c7cd3835fda7
v6.2.2
Firefox
Currently Once the Record is created using /notion create
we don't have anyway to update that record from rc. lets say org is keeping track of project they are working on - in Notion Database and there is extension of project deadline, or it needs to assign to different person, xyz, etc. we can't do it currently which is needed and happens often.
we want to implement a button on the message that has been send on creation - update record particularly a message box action button which exist on every message. This button should only exist on that creation message.
Open the Modal (Similar to Creation Record Modal particular when database is selected that view) with All the input Elements with initial value which is part of that record, Every Creation Message would have one particular record attached from database right, get that values through api first and open the modal with elements you need and give the current value of record to default value to elements, have the elements according to type of value, for reference use the code we already have for creation record.
similar modal we already have in create record feature right ? and update those fields which needed to be in one go in input elements the one which are not updated in the input fields doesn't matter cause we can make the request of changed value and default which wasn't changed and update the fields through API. This allows to make multiple fields change in one go.
Once the fields are filled, and updated through api when from modal the user presses Update (SubmitAction - BlueButton) We need to Update the Creation Message Particular from where the MessageBox Action was initiated, we need to update the message with new fields which were updated during the updation.
Also Make sure We handle ViewErrors,
Also Handle If when the there is update action button pressed the user is connected to workspace in which that database exist if not notify user you are connected to different workspace.
In this case, We currently don't have goal for menu actions: But make sure its scalable if we might need to include OverFlowAction Menu which is create database + create page or record which we should be able to do.
For Reference Check the Create Record Codebase you can find lot of code which will help you, you will need to know in depth things about how we are caching data with persistance storage.
update record
.Update Record
in Message Box Action of Creation Message![]() |
![]() |
Currently, after connecting to the workspace, whether it succeeds or fails, it returns an AuthPageTemplate. However, the user has to manually close the window, which is not an expected behavior and is not user friendly. This window should automatically close after the timer runs out. So, I propose adding a script to close this page after 5 seconds.
No response
No response
Currently, the comment create time is displayed in ISO 8601 format, e.g. 2024-03-11T19:05:00.000Z
. This time, got from Notion API, is good for precision, but not good for readability and doesn't convert to the user's timezone.
For better readability, we can display the time in the same the way how Notion show comment time, which follows the writing guidelines from Atlassian Design System.
No response
There has been some changes in notion api:
FInd complete change log: https://developers.notion.com/page/changelog
New ID Field introduced in Notion Table, check if that breaks anything in our app.
The verification page property was added to the Page properties documentation. see if it breaks and we can improve something.
australian_dollar
in the format field of number database properties. [imp]v6.5
Chrome
No response
No response
Change Workspace
which will open Change Workspace Modal to directly from Create DatabaseChange Workspace
/notion workspace
.No response
No response
No response
v6.5
Chrome
No response
No response
No response
Our App doesn't support pagination of comments. The current implementation fetches Notion's Comment API, which returns max 100 comments.
We want support pagination comments, like for pages & DBs, which have an existing issue #38 in progress.
View comments of a Notion page with 100+ comments
No response
v6.6.5
Chrome
/notion ws
v6.5.3
Firefox, Chrome, Safari, Microsoft Edge
We should not allow multiple connections to the same workspace. We should notify the user that he/she is already connected to the workspace they are trying to connect to.
v6.5.2
Chrome
Currently, there is no option to add or delete properties of a Notion database after its creation. This option is only available during the database setup process. To modify the schema later, users must manually make changes within the Notion page itself, which can be inconvenient, especially when considering the benefits of integrations. The Notion API does offer functionality for property modification, which we can use to implement this feature.
No response
No response
Current behavior:
After making a comment, the comment remains inside the text box and is unsubmitable
Expected behavior:
After making the comment, the text box should get cleared
https://www.loom.com/share/cd9900820c47476fa0b50c934481dc5d?sid=6637e7ed-7b71-4d47-9954-324b93c886a8
v6.2.2
Firefox
Currently, the notion app doesn't have an option to share a particular database just like it has an option to share pages through /notion share
.
/notion share db
/notion create
.Please let me know if this would be useful for the Notion App.
Thank you.
![]() |
![]() |
No response
/notion help
command can be useful for users who may need a quick refresher or who may have missed some of thehelp
paramNo response
Each repository has a tslint.json
however the styles are not enforced and I noticed this throughout multiple (rocket.chat.app) repositories. While each repository has a tslint.json
there are no scripts provided in package.json
to ensure the linting of code.
Other than that, I learned that tslint
has been outdated and replaced with eslint.json
so it might be a good time to switch out to eslint.json
and ensure code consistency and style.
I was however able to run the lint process without adding the script to package.json
. Here's how you can reproduce this:
npm i -g tslint
npm i -g typescript
tslint --project .
This will run the linting process in the project, and you will be now prompted with a series of error that do not match the tslint.json
convention.
Below we have our tslint.json
which enforces certain styles but are not really enforced into the code.
{
"extends": "tslint:recommended",
"rules": {
"array-type": [true, "generic"],
"member-access": true,
"no-console": [false],
"no-duplicate-variable": true,
"object-literal-sort-keys": false,
"quotemark": [true, "single"],
"max-line-length": [true, {
"limit": 160,
"ignore-pattern": "^import | *export .*? {"
}]
}
}
As you can see this enforces the quote mark as single, however it's not how it's being used in the project, or rather any of the projects.
Here are the logs as output:
https://pastebin.com/qx6BNZFP
We can use tslint --project . --fix
to fix the issues but that causes changes to more than 90+ files together. Also it might be a nice idea to switch to eslint as it is supported currently.
latest
Chrome
We can introduce an 'archive page' command to the app by leveraging Notion's archive page API endpoint.
/notion archive {page}
command into the CommandUtility file.@Nabhag8848 can I work on this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.