DEV Community

Discussion on: How to Connect a React App to a Notion Database

Collapse
 
deyvis profile image
Deyvis Mariños

Hello, very interesting.
a query, is there a way to do it without nodejs (frontend only)?

Collapse
 
alexeagleson profile image
Alex Eagleson • Edited

You could "technically" add the Notion client package to the front end I imagine, but there would be no way to do so without exposing your Notion integration secret token to the users. If it has any write/modify permissions at all that's extremely dangerous. I guess with read only permissions you might be able to get away with it, but I still wouldn't do it for anything more than a hobby project.

So yes I do think the server is necessary (though it doesn't need to be written in Node.js).

Collapse
 
gilbertmizrahi profile image
GilbertMizrahi

Another possibility is to create a webhook with Google Apps Script and call the Notion APIs from there. In the client side, then, you can call the webhook without exposing Notion integration tokens.

Similarly, you can create a webhook with tools such as autocode.com/