Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Update DB Records #70

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Spiral-Memory
Copy link
Contributor

@Spiral-Memory Spiral-Memory commented Mar 6, 2024

Issue(s)

CLOSES #69

  • Added a command to open the update record modal
  • Added help for this command
  • Created an update record modal with a dropdown to select a database
  • Added a function to fetch information of the selected database to the update modal

@Spiral-Memory Spiral-Memory marked this pull request as draft March 6, 2024 11:00
@Spiral-Memory Spiral-Memory force-pushed the feat/update-record-values branch from 5edd814 to f7c8f93 Compare April 6, 2024 18:10
added help

created update record modal

added info fectch of selected db
@Spiral-Memory Spiral-Memory force-pushed the feat/update-record-values branch from f7c8f93 to 8febf8d Compare April 11, 2024 16:18
@Spiral-Memory
Copy link
Contributor Author

Hey @devanshkansagra

I've started doing this, but stopped in between, as per discussion, if you are interested, you can take this up and try implementing as you wanted to learn rc app s development.

Thanks

@devanshkansagra
Copy link

Okay @Spiral-Memory, good to go with this

@devanshkansagra
Copy link

Hey @Nabhag8848, can you help me to set this app locally if you are available? I have followed the steps to setup this app locally according to the readme file and when I do /notion connect,
image
image
image
image

At the end I am getting this error
image

I have also set the client id and client secret from notion to the app and also added this webhook URI to the notion public integration
image

@Nabhag8848
Copy link
Collaborator

Nabhag8848 commented Dec 22, 2024

@devanshkansagra can you try following:

  1. try using ngrok and change redirecturis in notion public integration according to that ngrok base url.

  2. if it doesn't work, it can be version mismatch between rocketchat version and apps-engine version in which notion app is currently being run, in that case you can get older version of rc and try it out.

you can try logging in this file and see what goes wrong if that doesn't work:

https://github.com/RocketChat/Apps.Notion/blob/main/src/endpoints/webhook.ts

can you open a issue about this, ping me in that issue around what you found out, will reply as early as I can, Thanks !

@devanshkansagra
Copy link

Sure, Happy to work with you 😊

@Nabhag8848
Copy link
Collaborator

@devanshkansagra more things to make sure:

  • assuming you are using docker compose and this dockerfile to setup in local and not using core repo setup and trying to run apps on that.

https://github.com/RocketChat/Docker.Official.Image/tree/main/7.1

  • try npm install instead of npm ci and see if things goes well.

@devanshkansagra
Copy link

Hey @Nabhag8848, I tried using ngrok and also downgrading the version of rocket chat to v6.13 but still the error exists. and also I have gone through the code and the output and find out that webhook url is not working properly if you use the webhook url in the browser it redirects and give this window output
image

and I found out when I add the client id and client secret and save the changes the button is just loaded and I need to refresh the page to view the change.

@devanshkansagra
Copy link

devanshkansagra commented Dec 23, 2024

also I do not have knowledge of docker so I don't know how to use that and run the rocketchat so I didn't went through that approach you mentioned

try npm install instead of npm ci and see if things goes well.

Tried this also

@Spiral-Memory
Copy link
Contributor Author

Spiral-Memory commented Dec 23, 2024

Hey @Nabhag8848, I tried using ngrok and also downgrading the version of rocket chat to v6.13 but still the error exists. and also I have gone through the code and the output and find out that webhook url is not working properly if you use the webhook url in the browser it redirects and give this window output
image

and I found out when I add the client id and client secret and save the changes the button is just loaded and I need to refresh the page to view the change.

This is expected, @devanshkansagra .
If you look into the source code, it expects a code param in the URL, which is appended by Notion during the redirection. If you try to open the URL without a code parameter, it won't be able to connect to Notion, and an error screen will be displayed.

@devanshkansagra
Copy link

which code?

@Spiral-Memory
Copy link
Contributor Author

Spiral-Memory commented Dec 23, 2024

See, the connection with Notion is like OAuth. When you provide a redirect URI in Notion, it redirects to the Rocket.Chat webhook URL along with a code query parameter. The Notion RC app then looks for this parameter to connect.

If the query parameter is missing, it will fail and render the error screen.

@Nabhag8848
Copy link
Collaborator

Nabhag8848 commented Dec 23, 2024

@devanshkansagra have you setup rc core repo for running apps ? if yes, instead use docker compose, do some chatgpt on how to run that Dockerfile, though its already mention in readme.

there would be a way to run apps on core repo setup but requires more actions to run which isn't recommended.

@devanshkansagra
Copy link

@devanshkansagra have you setup rc core repo for running apps ? if yes, instead use docker compose, do some chatgpt on how to run that Dockerfile, though its already mention in readme.

there would be a way to run apps on core repo setup but requires more actions to run which isn't recommended.

Actually I have both setup one is the snap version of rocketchat server and the core repo of rocketchat. I have downgraded the corerepo to v6.13 and still the error exists

@devanshkansagra
Copy link

The snap version of rocketchat server is running because of running EmbeddedChat, I have decent resources on my laptop and rocketchat core repo is very heavy it consumes a lot of memory resources so..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Update Record in Notion Database
3 participants