How to set up the plugin "Notion API" for your Bubble app.

Integration

Create a Notion Integration here and associate it with a workspace you own or are an admin of.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/765beb1c-8d47-4a2d-94fd-86adf5dc3ab1/Screenshot_2021-07-08_at_09.34.25.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0f92c515-23ae-4be2-8b3f-a3018262978b/Untitled.png

API key

Copy the integration's API key into the settings of the Bubble plugin "Notion API" you've installed in your Bubble app. Do not forget to add "Bearer " in front of the key (note the space after Bearer, before the key).

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2c5c1c0b-3e3f-46a6-82b2-e14115fa17b5/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d7202dc1-94ac-4fcf-aacd-81e42ff3f722/Untitled.png

Access

Finally, return to Notion and grant access to your integration to any databases or pages you want to interact with through your Bubble app via the plugin.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/618bcdce-1fd7-49b3-a3b6-55c6a438132c/Untitled.png

Documentation

You're all set, you can now use the Data and Actions calls offered by the plugin. Please refer to Notion's API documentation for more information on the different parameters expected for the API calls (documentation is linked to for every API call).

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d70dbdff-d50e-4e40-a88b-a98e4fe4c7fe/Untitled.png

Example

Notion's objects are very rich and, more importantly, very diverse. The most flexible we found was to allow the plugin the accept json payloads as parameters. Notion's API documentation is the source of truth for these payloads, but here below is an example that shows you how to use the plugin.