Preparations

To follow along with this workshop you’ll need:

Enable the Notion API

In order to enable the Notion API we need to create a integration, here's Notions guide on how to.

Here's an example of how your integration might look like:

Example of how the integration could look like

Set up your page in Notion

Now we are going to create our page and add some data to it. Please do the following steps:

Set up your script

Test your script



Troubleshooting

A few tips for troubleshooting
  • If you get the 404 error "object_not_found" while running your script, you’ve probably entered the wrong ID, check the ID's again.
  • Have you removed the curly brackets { } around the database_id and the block_id in your link?
  • You might have forgotten to share your page with your integration. It never hurts to check it.
  • Have you checked that you have used the property type "text" for your phone number in the database in your Notion document? Check just in case.
  • Is the phone number that you are sending to formatted according to E.164?
  • Here’s a list of all error codes from the Notion API.