Automatically accept google calendar invites from my wife

What are you trying to achieve?

Accept Google Calendar invites sent to my gmail.com account.

Steps taken so far

Looked at the Gmail module, and searched through the google calendar module.

1 Like

Love the idea but there aren’t any modules in make that lets you do this…

I do have an idea though. You can instead have a shared calendar between you and your wife. If there are any events like your kids recitals or a birthday party she can add those into your shared calendar. Then you can have it be linked to both your accounts so the events will show up on both your calendars.

I have something similar where I have a work calendar and a personal calendar. They are both synced to phone so I can access events from both on my phone.

1 Like

Hello @Ken_Corey and welcome to the Make Community!

In Google Calendar, you will need to do two things:

  1. Ensure your settings allow events from people in your contact list are automatically added to your calendar (but even then they’re not automatically accepted). See this reference.
  2. Once you get the event ID (from Watch Events module), you can run a PUT request on the events update endpoint using the Make an API Call module.

Since #1 will put the event on your calendar, it is now considered an event which should show up when Watch Events module runs.

The only problem here is that the body of the PUT request needs to contain ALL the information from the original event because everything you PUT in will overwrite your copy of the event.
The key is you need to also include an attendees[].responseStatus of accepted. It looks like this:
image

You could probably get away with most of the basic info like the start date/time, end date/time, subject, etc… only whatever you need to know as part of the event.
For example, probably no need to include the Google Meet address, if there even is one.

I hope that makes sense and hope it helps!

2 Likes

Welcome to the Make community!

Yes, that is possible. You’ll need a minimum of two modules:

Screenshot_2024-08-15_140842

Note: PATCH does not override fields that are not included in the payload, so you do not need to reinsert all the other event details.

This is just an example. Your final solution may or may not look like this depending on your requirements.

For more information, see

Module Export

You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.

  1. Copy the JSON code below by clicking the copy button when you mouseover the top-right of the code block

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the canvas.

  3. Click on each imported module and save it for validation. You may be prompted to remap some variables and connections.

Click to Expand Module Export Code

JSON - Copy and Paste this directly in the scenario editor

{"subflows":[{"flow":[{"id":1,"module":"google-calendar:watchEvents","version":5,"parameters":{"__IMTCONN__":95013,"calendar":"my-calendar@example.com","select":"create","showDeleted":false,"q":"","eventTypes":["default"],"limit":1},"mapper":{},"metadata":{"designer":{"x":0,"y":0,"name":"New Event"},"parameters":[{"name":"__IMTCONN__","type":"account:google","label":"Connection","required":true},{"name":"calendar","type":"select","label":"Calendar","required":true},{"name":"select","type":"select","label":"Watch Events","required":true,"validate":{"enum":["create","update","start","end"]}},{"name":"showDeleted","type":"boolean","label":"Show deleted events","required":true},{"name":"q","type":"text","label":"Query"},{"name":"eventTypes","type":"select","label":"Event Types","multiple":true,"validate":{"enum":["default","fromGmail","focusTime","outOfOffice","workingLocation"]}},{"name":"limit","type":"uinteger","label":"Limit","required":true}]}},{"id":3,"module":"google-calendar:makeApiCall","version":5,"parameters":{"__IMTCONN__":95013},"filter":{"name":"wife only","conditions":[[{"a":"{{1.creator.email}}","o":"text:equal","b":"wife@family.com"}]]},"mapper":{"url":"/v3/calendars/{{map(1.attendees; \"email\"; \"self\"; \"true\")}}/events/{{1.id}}","method":"PATCH","headers":[{"key":"Content-Type","value":"application/json"}],"body":"{\n  \"attendees\": [\n    {\n      \"self\": true,\n      \"email\": \"{{map(1.attendees; \"email\"; \"self\"; \"true\")}}\",\n      \"responseStatus\": \"accepted\"\n    }\n  ],\n  \"attendeesOmitted\": true\n}"},"metadata":{"designer":{"x":300,"y":0,"name":"Accept Event"},"parameters":[{"name":"__IMTCONN__","type":"account:google","label":"Connection","required":true}]}}]}],"metadata":{"version":1}}

Hope this helps! Let me know if there are any further questions or issues.

— @samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

3 Likes

Good find! For some reason I didn’t see PATCH was available.

Thanks for the detailed response @samliew . That’s amazing.

Unfortunately, I’m still not seeing it work as expected.

I have the connection to gmail lined up, and my calendars are all visible.

When I send myself a calendar invite from her account, it’s not even getting to the filter.

The ‘watch events’ node goes green, and gets a ‘1’. But there’s no data associated with that.

I have an outstanding meeting invite, not yet accepted, but it’s not being pulled up.

Thoughts?

Thanks for writing all the same Donald!

That’s not really going to work for us in this situation, but thanks for writing!

That means it did not pick up the new event from your calendar.

Try selecting an older event to test with, or select “From now on”.

Polling Triggers: Epoch Panel & Selecting Older Data

Go to the Epoch Panel, by right-clicking on the trigger module (polling triggers only), and select “Choose where to start” from the list of options in the context menu.

If you select “From now on”, the next time the scenario runs it will only return new data (or nothing if there is no new data).

You can also select other old data to re-run your scenario with next using the “Choose manually” option. This will then show you a list of previous historical items you can select to process the next time the scenario is triggered.

For more information, see

Hope this helps! If you need further assistance, we need to do a screenshare.

— @samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

1 Like