RocketChat / Apps.Notion

Integrating Notion with Rocket.Chat
https://github.com/Nabhag8848/Google-Summer-Of-Code
10 stars 18 forks source link

[Feat] Improve Preserved Important Message in Notion With Notion's Link Preview #39

Open Nabhag8848 opened 8 months ago

Nabhag8848 commented 8 months ago

What do we need?

Acceptance Criteria

Relevant ScreenShots

https://github.com/RocketChat/Apps.Notion/assets/65061890/acabbacf-d5f7-47d6-a219-a0061f205d08

Further Comments

No response

Spiral-Memory commented 8 months ago

I am going through the documentation to understand how it works, and I would like to work on it.

Spiral-Memory commented 8 months ago

@Nabhag8848 , after going through the documentation and all the steps required to set up the link preview, I have concluded the following:

It might be implemented even if it is self-hosted, but there are many considerations that have to be taken into account while setting it up:

  1. Global Setup Limitation: It can't be set up globally; every workspace owner has to go through a lot of setup, if they are not using the Cloud Rocket Chat server.

  2. Link Preview API Access: The Link Preview API is not available directly. One has to fill out a form for their workspace to get access to this particular API. I have already filled it out, and they mentioned that it might take 1-2 weeks for them to respond. Therefore, it will be a lengthy process for the workspace owner.

  3. Authentication Requirements: Once they gain access to this API, the link preview works only if the user is authenticated to see the link preview. To set it up, two forms have to be filled:

    • The External Authorization Setup form: The form asks for OAuth Client Id, Secret key, authorize URL, authorize token URL, etc., as Notion has to authorize it since the message link will be private. So i think this will involve third-party integration that rocket chat provides, where we need to listen for requests on OAuth Authorize URL and listens for notion request and provide UI to authorize it.
    • The Unfurling Domain & Patterns form: Here, a callback URL needs to be provided to tell Notion how to render it. It's unclear whether this can be done using the RC app Notion directly, or if it has to be implemented on the Rocket Chat server itself. This form expects the URL that shares data to be displayed in the Link Preview, and Notion will send a post or delete request to that link.

Documentation I referred.

In summary, I feel this can be implemented even when hosted on external servers, but every workspace owner has to go through this process to set it up. It can't be done globally, in my opinion.

Nabhag8848 commented 8 months ago
  1. not an issue, but noted, Do you think We Can write script for reducing those steps for non rc cloud user.
  2. for non rc cloud server this can be little blockage and for rc cloud as it will be rocket. chat they don't need to fill out this form in that case for them as long as they don't have access we can show current implementation we have.
  3. challenging + long process.

Question: from step 2 and step 3 what i can see is if we need to make work in open.rocket.chat and xyz.rocket.chat we need to provide separetly tokens and fill form for both of them. if thats a case they this will cause every rocketchat workspace user using notion app to fill this form ?

Spiral-Memory commented 8 months ago
  1. Writing scripts might not be possible, as only the workspace owner can access the integrations, and there is no API currently to access those settings from outside. Filling out the forms is in the integration section. However, good documentation could be provided to guide them on how to do it seamlessly.

Regarding your question: I feel that if both are using the same domain, then there won't be an issue. For the first time, the user just has to authorize it, and it can be globally set up, similar to how Slack does it for their workspaces, as there is no option to self-host it, and all workspaces run on a single domain.

However, for self-hosted instances, this has to be done for every workspace owner, and it has to be done for every domain.

Spiral-Memory commented 8 months ago

@Nabhag8848 , I haven't received API access for link preview yet. I've emailed the Notion team again. I'll let you know once I get access and test it.

Nabhag8848 commented 7 months ago

@Spiral-Memory Any updates from Notion Team ?

Spiral-Memory commented 7 months ago

@Spiral-Memory Any updates from Notion Team ?

Yes i got a reply, but it wasn't very helpful. Let me share you the screenshot.

Screenshot_20240229-200907.png

Nabhag8848 commented 7 months ago

@Spiral-Memory Any updates from Notion Team ?

Yes i got a reply, but it wasn't very helpful. Let me share you the screenshot.

Screenshot_20240229-200907.png

As Always, We got a similar reply when we asked for webhooks. just had replied with details we already knew.🫂 please confirm once in docs if we can build without they provide access.

Spiral-Memory commented 7 months ago

Yep 🥲

I have replied to them again that I know these details and please reply with the exact thing of what I'm asking.. let's see if they do.

Spiral-Memory commented 6 months ago

Hey @Nabhag8848 I got another reply today, have a look at it and provide me enough info to respond back to this email :

image

Nabhag8848 commented 6 months ago

Hey @Nabhag8848 I got another reply today, have a look at it and provide me enough info to respond back to this email :

image

This is awesome @Spiral-Memory , So Exicted for this one. Will share all the details by end of day. I will need to look at details.

Spiral-Memory commented 6 months ago

Hey @Nabhag8848 I got another reply today, have a look at it and provide me enough info to respond back to this email :

image

This is awesome @Spiral-Memory , So Exicted for this one. Will share all the details by end of day. I will need to look at details.

  • some thoughts rocketchat is supported for self-hosted and also cloud version rocketchat provides for users that instance goes to (https:// .rocket.chat). We need to look if they will support self-hosted cause their domain will be different.

Sure @Nabhag8848 Take your time 🤗 I'm also very excited for it !

Spiral-Memory commented 6 months ago

Hey @Nabhag8848 I got an automated reply that they are waiting for the response. Could you please provide all details as early as possible so that i can forward it to them. Thanks !