Level Up Coding

Coding tutorials and news. The developer homepage gitconnected.com && skilled.dev && levelup.dev

Follow publication

Member-only story

How to Automate Notion with Python

I love Notion.

Before I discovered Notion, all my notes, projects, progress trackers and ideas were scattered across multiple places. It was a mess.

Notion brought everything into one place. Every project, every idea, all my notes are now in one place. I can see them all — I don’t need to switch between multiple apps. I can link and refer to each other. Notion streamlined my workflow and improved it in a way I did not know it can.

I also like to automate things. I’m one of those people who would rather spend an evening or two writing scripts to automate boring repetitive tasks than to do them over and over again.

With this kind of mindset, I looked at the workflows I created in Notion and tried to find a way to automate them.

As of the end of November 2020, Notion does not have any public API available. The billing page says the Content API is on the roadmap and it will be only available for paid accounts. What Notion’s team did not say is when we can expect the official API to be released.

Luckily, we can use notion-py package for now.

notion-py is an unofficial Python client for Notion. Under the hood, it uses requests package to open Notion as a webpage in headless mode and get data that way. It also works for both free and paid…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (5)

Write a response

Beautiful and clean but doesn't work at the moment (for me). Can you address this issue?

--

What's the lifetime of token? How to refresh it when it's invalid?

--

It's possible find duplicate value in Notion table's ( list text) with python?

--