Unlock Notion Automation: 5 Tips for Go developers who want to build Notion Integrations to automate their workspace

Go is the best language to automate things within Notion.

It is strongly typed which has a significant advantage when working with the vast number of blocks in Notion. The code can run natively on any operating system without a runtime. However, building tools around Notion with Go can be a bit confusing at first because Notion is so complex.

Here are 5 simple tips to get you started:

  1. Use go-notion — It’s a FANTASTIC package that takes much of the heavy lifting out of using the Notion API.

  2. Nest databases in a single page — You need to share any page you want to access with your Integration, so sharing a single page with all of your databases gives you access to everything without having to individually share each database.

  3. Learn go-cron — The go-cron package lets you easily schedule things using chain syntax or a simple cron statement, which is super handy if you want to have things happen automatically.

  4. ‘Copy link’ is your friend — Every page or database in Notion has this menu item, and those links include the page or database ID for you to easily grab.

  5. Learn how to use type switches — Because Notion databases have so many potential configurations, type switches should be used when parsing database properties.