Sync Google Calendar with Notion

Hello everyone!

I’m new to n8n and I’m trying to create a workflow to sync my Google Calendar with my Notion, I even managed to get events from a calendar from my Google Calendar to Notion, however whenever I update the flow it duplicates events instead of updating them. My intention is that every time I add a new event in Google Calendar it will be automatically directed to Notion, but without duplicating the events.

And I don’t know how to do this, can anyone help me?

How events stay in my notion:

I share my workflow with you:

Hey @Igor_Marcelo_Designe,

Welcome to the community :raised_hands:

One thing you could try is to get all of the items from Notion and use the merge node to remove anything that has a matching event id, that will then give you the unique values you can add to notion.

Hey @Jon, thanks!
I had tried to do this before but it didn’t work, I think I didn’t know how to do it correctly, would you have a workflow with this scheme applied, so I can compare if I did mine correctly?

Hey @Igor_Marcelo_Designe,

Sadly I don’t as I don’t use Notion with Google Cal but we did create a blog post a while back that goes over the theory using 2 different systems but it should be the same process: How to synchronize data between two systems – n8n Blog

Let me know if that helps

Thanks, @Jon!
I’ll look at the article calmly and try to apply it in my case with more time and I’ll tell you if I did it, but I’ve already seen something that may not work because Hubspot has the option to Create/update, the notion, it doesn’t, it has the separate options or it creates or it updates, as you can see in the image below:

Hey @Igor_Marcelo_Designe,

That is where it would depend on if you wanted to track updates as well. If you did you would add 2 marge nodes and basically flip it so you have one that does unique items and one that does existing and from there you would either use the Create or the Update option.

Hey @Jon
I finally managed to do what I wanted, your tips helped me a lot, I’ll share below how my flow turned out. Basically what I did was:

1 - I created two nodes in the first I got all the appointments from my Google Calendar, and in the second I got the appointments that are in the Notion calendar;

2 - I created two nodes to define which data from each Calendar would be used;

3 - I created a Merge node with “Remove Key Matches” because it keeps the data from entry 1 (Google Calendar) if it does NOT find a match with the data from entry 2 (Calendar Notion), this way the flow does not duplicate existing appointments in Notion;

4 - I created a Notion node to create new appointments in my Notion calendar, and I made the correspondence in the data so that when creating a new event it puts the data in the right field.

5 - I created one more merge node with “Keep Key Matches” as it keeps the data from input 1 (Google Calendar) if it finds a match with the data from input 2 (Calendar Notion), however when I run the flow the data didn’t update in Notion, that’s when I searched and found that to update Notion’s data I would need Notion’s item id, that’s when I created 3 more nodes, one to create another Google Calendar data definition where I inserted some fields with empty data these fields correspond to the fields contained in Notion so that when you merge the data they are filled with the information coming from Notion, another node I created was to merge with “Merge By Key” because it merges the data from both inputs and as a result the output will contain items from input 1 (Google Calendar) merged with the data from input 2 (Calendar Notion), and as a reference the merge happens depending on a key defined in the case the id of the appointment of goo gle and the same id as contained in Notion’s commitment as I inserted it into the creation flow, these two nodes were placed before the “Keep Key Matches” mentioned above, so the data output now contains all the information that is needed to update appointments in Notion;

6 - Before the Notion update node I placed a definition node to select the data I would need to update;

7 - I created a node to update the notion and made the correspondence between the data so that when updated it can update the data in the correct fields.

This was the way I found to sync my google calendar with the notion, another job I have now is to duplicate this flow for all the calendars I have in google calendar, as I have an agenda for each appointment category.

My final workflow:

2 Likes