/googleappscript-to-notion

Automatically create a notion page when you create a new calendar event

Primary LanguageJavaScript

Google calendar to Notion

A simple utility for automatically creating a notion page for a new calendar event. It will create a new page and fills the page with attendee details.

How to install

Prerequisites

The database should have a column of type date, named Date

Manual method

  1. Create a new appscript project from here

image

  1. Copy and paste the contents into the file and save it

image

  1. Enable the "Calendar API"

image

  1. Create a new internal notion integration and copy the token

image

  1. Copy the generated token and paste it to the variable MY_NOTION_TOKEN in the script you had created earlier

image

  1. Set the DATABASE_ID variable to the database you want the script to create a new page in

image

Source: https://developers.notion.com/docs/working-with-databases

  1. Share the notion database with the integration you had created in step 4

image

  1. Create a trigger for calendar update and assign main as the function to run when the trigger occurs

image image image

Everything should work! You can try it out by running the main function to see if it works. image

Updating

Just repeat step 2 with the latest calendar.js contents