Notion - Google Calendar 2-way sync with Automate.io (No Code Required)

Category
⚙Notion
Date published
Jul 10, 2021
Last updated
Jul 10, 2021 9:28 AM
image

In this guide, you'll learn how to set up a 2-way Notion - Google Calendar synchronization between events using Automate.io.

If you are using both Notion and Google Calendar for task and event management, then you will find this solution valuable as it keeps things organized across multiple platforms.

This automation will allow you to synchronize events:

  1. Notion → Google Calendar
  2. Google Calendar → Notion

The integration works both for adding and editing events.

Here is the demo on how it works:

Adding events

image

Editing events

image

What you need

For this setup, you will need:

  1. Notion database with tasks/events
  2. Google Calendar account
  3. Automate.io account with a personal plan or a trial. This is needed to create multi-step bots.

Notion setup

image

For this integration, in addition to task name, you need to have only 2 properties in your Notion database:

  • Date (Date) — Date property will include both the start date and end date of our events
  • Gcal ID (Text) — Property for storing the ID of the Google Calendar event

Automate.io setup

In Automate.io, we will need to create the following bots:

  1. Event added on Google Calendar
  2. Event updated on Google Calendar
  3. Database item added on Notion
  4. Database item modified on Notion

Why Automate.io?

The main reason we use Automate.io is simply that on Zapier you cannot achieve this solution. Zapier doesn't have the necessary trigger for editing the Notion database, which makes it impossible to link Google Calendar and Notion records together 2-ways.

Note: Make sure to add Automate.io into your Notion and give it permissions to your database. Otherwise, you won't be able to find your databases in the Automate.io interface.

image

1. Google Calendar to Notion sync

To achieve 2-way synchronicity we need to establish a relation between 2 entities: Google Calendar event and Notion record.

We need to link our events in both Google Calendar and Notion so that they know about each other and stay in sync.

For this purpose, we will use the Event ID property of Google Calendar to link it to the Notion record with the Gcal ID property.

Bot 1: Event added on Google Calendar

Bot workflow:

Google Calendar event added → Check if the event already exists in Notion → Add it to Notion → Link it back to Google Calendar

  1. Create a bot with a Trigger from Google Calendar: Event Added. This bot will be triggered once a new event is added to Google Calendar.
    1. Note: You can also use a trigger Event Start. This option will add all the events ahead of time (including existing ones)
    2. Choose your Google Calendar from the Calendar field
  2. Add Action from Notion: Search Item By Property. This action will allow us to lookup for existing Notion records for newly added event
    1. Select your Notion database
    2. In Search Criteria, use Gcal ID. Put Event Id from the Google Calendar trigger into this field.
    3. image
  3. Add Action Filters. This action will allow the bot to continue only if this event doesn't exist in the Notion database
    1. Choose Continue Only If...
    2. Choose Operator Equals - Ignores Case (string)
    3. Add Found? field into the Parameter 1
    4. image

      d. Enter no into Parameter 2

  4. Add Action from Notion: Add Database Item. In this step, we add a Notion record for our newly added Google Calendar event and link this record to Google Calendar
    1. Choose your Notion database
    2. Set the following properties using fields from Google Calendar event from the Trigger
      1. Gcal ID → Event Id
      2. Start Date → Event Begins
      3. End Date → Event Ends
      4. Task Name → Event Summary
      5. image
  5. Add Action from Google Calendar: Update an Event. In this step, we will link the newly added Notion record back to the Google Calendar event so that they become synced. We will use Notion property Page ID and Google Calendar event Description for this purpose.
    1. Set the Description to be Page ID using the Output Fields from the previous action
    2. image
    3. Set the following properties using fields from the Google Calendar event from the Trigger. This is needed so all the event details are saved
      1. Event Id → Event Id
      2. Summary → Event Summary
      3. Start Time → Event Begins
      4. End time → Event Ends

Bot #1 — Done! You can activate it.

Bot 2: Event updated on Google Calendar

Bot workflow:

Google Calendar event is updated → Check if there was an actual change in the event → Update Notion record

Note: In case you are wondering why we need these extra "checks" for our bots, they are needed in order to prevent infinite loops of events created/modified.

Because different bots can trigger each other in ways that we don't want, we should consider all the edge cases and prevent them from happening.

Here is the full diagram of all bots and how they interact with each other, so you can see on which places things can go wrong:

image

  1. Create a bot with a Trigger from Google Calendar: Event Modified. This bot will trigger every time an event on Google Calendar is updated.
    1. Choose your Calendar from Input Fields
  2. Add Action from Notion: Search Item By Property
    1. Select your database
    2. Gcal ID → Event Id (from Output Fields of Trigger)
  3. Add Action from Filters. In this step, we will compare the dates between Google Calendar and Notion records to see if there was an actual change in the event.
    1. Select Continue Only If...
    2. Operator Not Equal (date)
    3. Parameter 1 → Event Ends (from Output Fields of Trigger)
    4. Parameter 2 → Page Property Date (End Date) (from the previous Action)
  4. Add Action from Notion: Update Database Item. In this step, we will update the Notion record based on the changes to the Google Calendar event
    1. Choose your Notion database
    2. In Page, select - Use Custom Value -
    3. Page Id → Page ID (from Output Fields of Action 1)
    4. image
    5. Set the following properties using fields from Google Calendar event from the Trigger
      1. Start Date → Event Begins
      2. End Date → Event Ends
      3. Task name → Event Summary

Bot #2 — Done! You can activate it.

Now you should be able to create and update Google Calendar events which will be also synced to Notion.

2. Notion to Google Calendar sync

Now, we will set up the bots that will enable complete 2-way synchronization from Notion to Google Calendar side.

Bot 3: Notion New Database Item

Bot workflow:

New Notion record is added → Check if it has a date → Check if it doesn't have a linked Google Calendar event → Add a new Google Calendar event → Link Google Calendar event to Notion record

  1. Create a bot with a Trigger from Notion: New Database Item. This bot will trigger every time a new record on Notion is added.
    1. Select your Database
  2. Add Action from Filters. In this step, we will add a filter to ignore the Notion records without any date. This step will prevent the bot from running into errors if you tend to create Notion tasks that don't have any particular start/end dates
    1. Choose Continue Only If...
    2. Choose Operator Not Empty
    3. Parameter → Page Property Date (End Date) (from Output Fields in Trigger) So we basically say, if End Date doesn't exist, don't try to create a Google Calendar event.
  3. Add Action from Filters. In this step, we will check if the new Notion record already contains a relation to any Google Calendar events. This will prevent duplicate events from being created.
    1. Choose Continue Only If...
    2. Choose Operator Empty
    3. Parameter → Page Property Gcal ID (from Output Fields in Trigger) We check if there is already linked Google Calendar event
    4. image
  4. Add Action from Google Calendar: Add an Event. Here we will create a new Google Calendar event from the newly added Notion record
    1. Select your Calendar
    2. Set the following properties using output fields from the Notion record from the Trigger
      1. Summary → Page Property Task name
      2. Description → Page ID
      3. Start Time → Page Property Date (Start Date)
      4. End Time → Page Property Date (End Date)
  5. Add Action from Notion: Update Database Item. In this last step, we will bind the Google Calendar Event and the Notion record together.
    1. Select your database
    2. In Page, select - Use Custom Value -
    3. Page Id → Page ID (from Output Fields of Trigger)
    4. Gcal ID → Event Id (from Output Fields of the previous Action)

Success! Now the bots can create events both from Google Calendar and Notion and they will remain linked to each other.

Time for the last bot.

Bot 4: Notion Updated Database Item

Bot workflow:

Notion database item updated → Check if there is a linked Google Calendar event → Update Google Calendar event

  1. Create a bot with a Trigger from Notion: Updated Database Item. This bot will trigger every time a Notion record is updated.
    1. Select your database
  2. Add Action from Filters. In this step, we will add a condition, in which we will only try to update Google Calendar events if they are linked to any of the Notion records.
    1. Choose Continue Only If...
    2. Choose Operator Not Empty
    3. Parameter → Page Property Gcal ID. So if a Notion record is linked to any Google Calendar events, only then try to update an event.
  3. Add Action from Google Calendar: Update an Event
    1. Select your calendar
    2. Set the following properties using output fields from the Notion record from the Trigger
      1. Event Id → Page Property Gcal ID
      2. Summary → Page Property Task name
      3. Description → Page ID
      4. Start Time → Page Property Date (Start Date)
      5. End Time → Page Property Date (End Date)

That's it! You're awesome!

You can now activate all bots and play with the integration!

Enjoyed the tutorial?

Subscribe for more Notion updates →