Google Calendar Notifications

My workflow seems to be working well except for one thing. I create events in Google Calendar, so I know what is happening and when. I recently came into a situation where the event was canceled. So, I updated my workflow to handle this. I put “Canceled” in the event title. The issue is that I want to remove any alerts/notifications from the event. I thought about deleting the event completely, but I want to keep it as a reminder that the event was canceled so that when it gets rescheduled, I can duplicate it to the new day and time.

My question is, how do I remove the notifications from the event? I don’t see an option to do so. I have searched the forums and Google and still haven’t figured this out.

I am hoping this is something simple. I really appreciate any help you can provide.

Information on your n8n setup

  • n8n version: 1.48.3
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: CasaOS

Hi @jlhsolutions, thanks for posting!

To remove notifications from an event in Google Calendar, you can use the Operation: Update and

  1. turn off the Use Default Reminders option
  2. Set Update Fields > Send Updates to None

Hope that answers your question! If not, could you share your workflow or parts of it here by copy & pasting the workflow JSON content in between two block quotes (```)? That way, we can understand your usecase better :sun_with_face:

1 Like

@aya Thank you for the reply. I tried this but it didn’t remove the notification off the event.

Here is my workflow. I retested it after i made the changes you suggested but it didn’t remove the 2 notifications from the event.

Hey @jlhsolutions, I had another look and you’re right. Right now there is an option to set reminders and notifications in the Google Calendar node, but no way to remove them.

In that case, you can use the HTTP request node:

Hope that helps! But it would be nice to be able to do this from the GCal node for sure!

You can find details about the Google Calendar API here:

Hi @aya,

I copied in your HTTP node and tried running my workflow. I get this error.

Any ideas on what could be causing this?

Hi @jlhsolutions,
Judging from the error, it could be due to a couple of things:

  • can you check to make sure that the calendarId and eventId in the URL are accurate? The calendarId would be an email, and the eventId would be an alphanumeric string.
  • can you confirm that the authentication is valid and has the necessary scopes?
  • can you check that the event you’re trying to update actually exists? You can do this by sending a GET request first to get the details of the event.

@aya I did the steps above. As I am fairly new to using n8n and the Google APIs, I don’t know if I have this setup correctly.

I checked that calendarId and eventId are correct per the previous nodes.
I made sure that calendarId is my email address and the eventId is an alphanumeric string. Then I added a GET request and used this info and it pulls the event.

I checked the authentication, and now I see this (see screenshot below). I went to my console in Google Cloud and verified that the 2 scopes were added. I tried running the workflow in testing mode, but it still didn’t work. Then, I submitted it to be reviewed. Currently, it’s pending review.
image

So, I don’t know if I have to wait for this to be approved or not.

Let me know what you think. I have never done anything like this before, so I am learning as I go.

Hi @jlhsolutions, this is strange. You did mention that your workflow used to work and you were able to make other requests using the same Google Calendar OAuth2 API credentials, right? Are you using the same credentials to update the notifications?

Another thing you can test out is to make the PATCH request to update notification settings via the Google Calendar API Explorer:

CleanShot 2024-07-24 at 11.26.19

If it works, it’s probably an n8n issue, but if it’s not, it’s probably an issue you’ll need to check your Google settings or reach out to Google for.

Also, could you maybe share your latest workflow?

@aya Yes, my workflow does work for everything else. After going to the page you linked above, I found that the calendarID should have been this. {{ $json.organizer.email }}. Once I changed to that, it worked. I don’t know if it’s because it’s a “shared” calendar, but it showed a different email address (the one that created the calendar). Once I fixed this, I was able to remove the notifications and update my title to “Canceled: Event Name”.

I still have this showing up above my credentials, but it’s working, so I don’t know what it’s for. I have submitted my Google app for verification as these 2 scopes are checked but require the app to be verified.

image

1 Like

@jlhsolutions Glad to hear that you managed to get it working!

Regarding the yellow note you’re seeing about the scopes of the credentials — that’s expected. It’s just a friendly note to remind users what scopes are available.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.