I understand that Google Calendar’s current trigger is only a “polling” trigger, yet I do know that the Google Calendar API does have a way to “push notifications” which takes another step of fetching the changes since the last sync.
Has anyone figured out a way to do this all in Make.com?
I’m already paying for a 2-way sync between Google Calendar and Asana, but was wondering if I could get some help figuring this out, since I want to customize the process a bit more than my current solution.
I’m stumped on:
Refreshing Access Tokens every 50 minutes?
How to get the EventID of the change that’s been made?
How to get the synced differences
How to get this setup so I can add multiple calendars
The workaround for an instant trigger upon event start would be to set a notification in Google Calendar to fire off an email at the start of the event,
Then your Gmail forwards it to a Custom Mailhook instant trigger of your scenario.
Yeah I understand that there aren’t any instant triggers.
But that wasn’t my question at all. And I already know that mailhook triggers are capable of sending a text message when an event starts, but again… that wasn’t my question.
I was asking a more complex workflow that involves using Google Calendar’s API that sends out “push notifications” of changes since the last sync.
I get that you’re trying to build your brand, but I can’t help but think that you’re sort of spamming the comments without even reading what people are asking for.
The title of your post indicated you were looking for a workaround and Sam provided that.
Sorry you didn’t get the answer you were looking for, but keep in mind this is a community and as such, it’s just as much about giving as it is taking…
We’re all helping each other out in whatever free time we have, but also still need to make a living.
It would do you well to check these posts before posting.
If you just want someone to do this for you, you can check out this category.
Before jumping in, I suggest you learn the basics and advanced concepts of the Make platform first.
What product do you currently use to sync Google Calendar with Asana?
How much experience do you have with Google’s APIs?
Have you already searched this forum on this topic? If so, you should reference what you’ve found.
What you want is not built-in to Make and must be created custom.
If you want to tackle it, here’s some info that might help you out.
Create a Google OAuth connection in Make. Instructions here. Be sure you scope it properly for Google Calendar.
Set up your webhook using the instructions on this page and the webhook address generated in the previous step.
Once Google fires the webhook, that’s your queue to query the events endpoint.
** That endpoint will return either a nextPageToken or nextSyncToken.
** If it’s nextPageToken call the endpoint again with a pageToken parameter using that nextPageToken.
** Repeat until you go through all the pages until you finally get a nextSyncToken.
** With a nextSyncToken, use this value with the syncToken parameter to get the list of changes since the last time you called the endpoint. You’ll need to store this token (try a Data Store), use it next time the scenario runs, store the new token you receive, then use the new token next time, etc…
Challenges:
The subscription expires (by default it looks like 7 days for personal Gmail accounts), so you need to figure out how and when to renew it without creating duplicates. Even Google documents that it’s possible to have both active at once which would cause it to trigger the webhook multiple times.
** When you initially create the subscription it will return a value that let’s you know exactly when it will expire so you won’t have any surprises there.
Directly from the Google docs: Notifications are not 100% reliable. Expect a small percentage of messages to get dropped under normal working conditions. Make sure to handle these missing messages gracefully, so that the application still syncs even if no push messages are received.
I don’t know what else to expect as I just set all this up today.
Just to address what you’re stumped on…
Make handles this when you set up the custom OAuth client, but Google may require you to renew the project on their side periodically, nothing Make can do about that.
When you query the events endpoint, it includes the event’s ID. Using the syncToken filters it down to most recent changes since the last call.
Same as last point
You need to separately subscribe to events on each calendar.
You can use the same webhook if you want, but you have to coordinate all the other stuff that goes with it as well, like renewing ALL subscriptions when they expire, etc…