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:
Use
go-notion
— It’s a FANTASTIC package that takes much of the heavy lifting out of using the Notion API.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.
Learn
go-cron
— Thego-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.‘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.
Learn how to use type switches — Because Notion databases have so many potential configurations, type switches should be used when parsing database properties.