How to filter a Google Calendar event trigger for a specific attendee

  • 18 November 2020
  • 7 replies
How to filter a Google Calendar event trigger for a specific attendee
Userlevel 5

Hi there, this is Erin Oz from the Zapier Support Team with a workflow idea to share. 

Have you ever wanted to trigger on a specific calendar event in Google Calendar, but only in cases where a specific person is attending the event? 

For example, let’s say you’re an executive assistant, and you want to trigger on all Google Calendar events that the executive has marked “attending”. 

Or, let’s say you are working from a shared calendar and only want the Zap to trigger on events you are attending!

You can use a Code Step to search the list of event attendees for your target email address, and add a filter that only allows the Zap to continue if that person has marked “attending”.


I've created a code step solution that will find a specific attendee by email address and return their response.  

Start by mapping the Attendees Email and Attendees Response Status fields from Google Calendar as values into keys "attendeesEmails" and "attendeesResponses" as shown below:


Then copy and paste this code into the Code field:

// Create arrays from stringified input data

var attendeesEmailArray = inputData.attendeesEmails.split(','); var attendeesResponsesArray = inputData.attendeesResponses.split(',');

// Find index of

var targetPosition = attendeesEmailArray.indexOf("");

// Return corresponding response

var targetResponse = attendeesResponsesArray[targetPosition] output = [{target_response: targetResponse}];

The expected output will contain the response status for your target attendee: 


That way, you can filter on the output field Target Response from the Code Step to only allow the Zap to continue if the status contains "accepted":


Now the following steps in the workflow will run for every event that is attending! 

Do you have any other ideas for how this code could be adapted to a different scenario? Let me know in the comments! 

7 replies

Userlevel 7
Badge +10

Thanks @erinoz - this is really useful!

@Maxime F 
It appears that Attendees Responses Status is not an option for all event triggers.  For instance, it is available for trigger “Event Start” but not available for “Event Ended”

Hi @erinoz, Hope you are well. 

I’m not getting the Attendees Responses Status from Zapier. Is there anything I can do to get this fixed?

I’m trying to use zapier to send a typeform to all confirmed attendees to recurrent meetings.

Hi @agustindl 

Did you find a solution? I’m trying to do the exact same thing. 

Thanks in advance!


Hi Erin,

This is great, thanks a lot!

I have a quite similar, yet different thing to solve: I’d like to send emails (gmail) triggered by an event (google calendar), e.g. 24h before the event starts. This is easy. However, I’d like event invitee 1 to receive a different message than event invitee 2. The invitees (1 and 2) will be different from event to event. Is there a possibility to do this with zapier?

Thanks a lot!

I’m getting an error to this routine - c&p faithfully, used the correct fields, but I get “Failed to run your JavaScript code

SyntaxError: Unexpected identifier”

Hi @erinoz , thank you for the input, it is a very interesting scenario! 


I am right now playing with a different variant of this scenario, but I am not so gifted (yet) with js. 

I would like to send participants of a meeting a follow-up email, but only if their status is not “declined”. This means that those with “accepted”, “tentative” or “needsAction” would receive an E-Mail.


I’ve been able to set all the triggers, but just the part where I can make sure that the attendeesEmails is filtered to only the selected few, is puzzling me. Can you help me with that?