Remove a user/attended from all events.

725 views
Skip to first unread message

James Costello

unread,
Jun 2, 2021, 2:36:23 PM6/2/21
to GAM for Google Workspace
We have some termed users we want remove from all calendar events for all calendars. Can someone share the query with me to remove a user/email from all calendar events 

Cheers,



Adam Wanninger

unread,
Jun 8, 2021, 1:46:21 PM6/8/21
to GAM for Google Workspace
I'm sure there is a more elegant way, but it could be done by exporting the list of events from the termed employees using a command like this:
gam calendar termedemployee1 print events todrive
Then take that list and remove them from the events with a series of commands like this:
gam calendar current...@calm.com update event id 393udv0aqvh8296o9ecr209fgh removeattendee termede...@calm.com

James

unread,
Jun 15, 2021, 2:00:50 PM6/15/21
to GAM for Google Workspace
I know Ross had a way to do this in a query it just goes through every event and will remove the person by email this is very close though and i could use this but just seems it be a lot of work to go through all these calendars. 

Brian Kim

unread,
Jun 16, 2021, 5:56:13 AM6/16/21
to GAM for Google Workspace
Try

gam config csv_output_row_filter "''attendees.*email:regex:user...@domain.com'" redirect csv ./eventstoUpdate.csv multiprocess all users print events primary

Then use the CSV to removeattendee from the events in the CSV.
Reply all
Reply to author
Forward
0 new messages