While Notion’s API is still WIP, I’ve recently come across an unofficial Python API, as well as several use cases.

Inspired by Kevin Jalbert, who built a Google Assistant -> Notion integration, I wanted to create my own solution that would enable setting up a custom webhook from any integration in Zapier, and simply add another entree to a Notion Table on every webhook call.

In the following guide, I will provide instructions on setting up a Heroku server that uses my script, to achieve the following:

Send any tweet’s content to a tweet table in Notion, automatically

Send any Todoist task’s content to Notion

The use-cases presented in the article are pretty basic and can be expanded. I’m not too familiar with Python, so if you want to expand the script, or make use of other possibilities from the Notion-Py API, feel free to clone the Github Repo.

Step 1 – set up

To make this work, you’ll need:

A Zapier account A Heroku account (free) A notion page that is a full-page database (not inline, for now).

Getting your token and URL parameters

There are two parameters that you’ll need to add to the Heroku setup.

TOKEN parameter – to find your Notion token, go to your Notion account’s URL and click the lock icon on the left.

2. URL – get the URL by clicking Share, then “Copy Page Link” on the upper right side.

Save these two parameters for later.

Step 2: Deploy your own Heroku server

Let’s deploy an instance of my script to a Heroku server that will receive the HTTP requests and execute the Notion automation.



1. Click the button below

2. Name your app (any name will do)

3. Click ‘Manage App’

Now, it’s time to add your custom parameters. We need to tell the app about your token and your database link.



Create two config vars:

1. TOKEN : <Your Token>

2. URL : <Your URL>

Once this is done, you’re ready to set up your Zapier integration.

To test whether you’re on the right track, Copy your Heroku URL





and type this in your browser’s URL address:

https://<your-heroku-app.herokuapp.com>/create_todo?todo=works!!!

If everything works correctly, you should now check your Notion database and see the new input “works!!!” 😉

Connect Zapier to the app

Use-Case #1 – Todoist Task to Notion Database

In Zapier, create a new Zap. Connect to your Todoist account, and set up a zap that triggers on a new incomplete task.

Now, create the action.

Choose Webhooks as the action type, and select GET.

Now, enter your Heroku app’s URL, and add the following text after the URL: /create_todo?todo=

After the “=”, click the menu icon and choose the field you’d like to add.

Scroll to the bottom and click Continue.

If the test was successful, you have successfully integrated Todoist with Notion!

Use case #2 – Tweets to Notion Database

Create a new Zap. Connect to your Twitter account, and set up a zap that triggers on a new Search Mention.





Pick the term you want to watch. To track all your incoming mentions, pick your own username like I did in the GIF below:

Enter your Heroku app’s URL, and add the following text after the URL: /create_todo?todo=

and pick the parameter you want to send to Notion

If the test was successful, your mentions will now be sent to your Notion Database!

Summary

The fact that this and similar projects exist show the extraordinary hype around Notion’s API. While this project implements a basic use-case, I hope others will make use of the source code to find more complex use cases, and I might build more complex scripts soon.