Delete attendees from a calendar invite?

2,369 views
Skip to first unread message

Constantly Learning

unread,
May 19, 2018, 4:09:20 PM5/19/18
to GAM for G Suite

The use case for this question is as follows. Departed employee is on many future-dated calendar events, but I'd prefer they not be listed as attendees on those events. However, I don't want to delete the user altogether, at least not right now. So, I just want to get them off of future calendar invites for events owned by others.

I tried this:

gam user <departed employee email> print events primary starttime +1d todrive

and then picked some events and ran

gam calendar <departed employee email> deleteevent eventid <eventid> doit

and that worked great in terms of deleting the event on the <departed employee email> calendar. 

But when I looked on other people's calendars at the events I'd run deleteevent on, I still see departed employee as an invitee, but they have a big red X next to their name. That just draws even more attention to them -- what I would prefer and had hoped I could do is get them off that invitee list altogether.

Possible with GAM? 

I see there is a way to update the Attendees collection via Google API (https://developers.google.com/calendar/v3/reference/events/update) but not sure if this is implemented in GAM yet. Thanks.


Ross Scroggs

unread,
May 22, 2018, 11:51:56 AM5/22/18
to google-ap...@googlegroups.com
I just updated my Advanced Gams 4.56.08 (https://github.com/taers232c/GAMADV-X and https://github.com/taers232c/GAMADV-XTD) to support this.

To delete depa...@domain.com from events in the primary calendar of us...@domain.com:
gam user us...@domain.com update calattendees primary matchfield attendees depa...@domain.com delete depa...@domain.com doit

If you have a CSV file (DepartedEvents.csv) of events generated by a print events command:
gam csv DepartedEvents.csv gam user ~primaryEmail update calattendees calendar ~calendarId event ~id delete depa...@domain.com doit

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/4448b57c-12e5-41e0-af3d-e1bc78f34533%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ross Scroggs

unread,
May 22, 2018, 1:11:30 PM5/22/18
to google-ap...@googlegroups.com
This is an update to the Advanced Gam command i sent earlier; adding the redirects will give much cleaner output.

If you have a CSV file (DepartedEvents.csv) of events generated by a print events command:
gam redirect stdout DeleteDeparted.out multiprocess redirect stderr stdout csv DepartedEvents.csv gam user ~primaryEmail update calattendees calendar ~calendarId event ~id delete depa...@domain.com doit

Ross

On May 19, 2018, at 1:09 PM, Constantly Learning <k...@walkersands.com> wrote:

Constantly Learning

unread,
May 24, 2018, 10:34:44 AM5/24/18
to GAM for G Suite
Ross, belated thanks for adding this!  Got tied up with a couple things this week but am eager to give this a go.

Ken

Dev Bi

unread,
Jul 16, 2019, 3:47:41 PM7/16/19
to GAM for G Suite
Hi Ross,

Would you please also help with how with a suggestion if I wan to remove any attendees from the domain name domain.com for all users/ all calendar events?

Best regards,
Dev


On Tuesday, May 22, 2018 at 10:41:30 PM UTC+5:30, Ross Scroggs wrote:
This is an update to the Advanced Gam command i sent earlier; adding the redirects will give much cleaner output.

If you have a CSV file (DepartedEvents.csv) of events generated by a print events command:
gam redirect stdout DeleteDeparted.out multiprocess redirect stderr stdout csv DepartedEvents.csv gam user ~primaryEmail update calattendees calendar ~calendarId event ~id delete depa...@domain.com doit

Ross
On May 19, 2018, at 1:09 PM, Constantly Learning <k...@walkersands.com> wrote:


The use case for this question is as follows. Departed employee is on many future-dated calendar events, but I'd prefer they not be listed as attendees on those events. However, I don't want to delete the user altogether, at least not right now. So, I just want to get them off of future calendar invites for events owned by others.

I tried this:

gam user <departed employee email> print events primary starttime +1d todrive

and then picked some events and ran

gam calendar <departed employee email> deleteevent eventid <eventid> doit

and that worked great in terms of deleting the event on the <departed employee email> calendar. 

But when I looked on other people's calendars at the events I'd run deleteevent on, I still see departed employee as an invitee, but they have a big red X next to their name. That just draws even more attention to them -- what I would prefer and had hoped I could do is get them off that invitee list altogether.

Possible with GAM? 

I see there is a way to update the Attendees collection via Google API (https://developers.google.com/calendar/v3/reference/events/update) but not sure if this is implemented in GAM yet. Thanks.



--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Ross Scroggs

unread,
Jul 16, 2019, 4:13:42 PM7/16/19
to google-ap...@googlegroups.com
Dev,

I'll work on this; basically you have to:
generate a list of all users calendars
generate a list of events for all of those calendars that has an attendee from domain.com
delete those attendees from the events

I'll let you know when I have something,

Ross

On Tue, Jul 16, 2019 at 12:47 PM Dev Bi <dip...@coolheadtech.com> wrote:
Hi Ross,

Would you please also help with how with a suggestion if I wan to remove any attendees from the domain name domain.com for all users/ all calendar events?

Best regards,
Dev

On Tuesday, May 22, 2018 at 10:41:30 PM UTC+5:30, Ross Scroggs wrote:
This is an update to the Advanced Gam command i sent earlier; adding the redirects will give much cleaner output.

If you have a CSV file (DepartedEvents.csv) of events generated by a print events command:
gam redirect stdout DeleteDeparted.out multiprocess redirect stderr stdout csv DepartedEvents.csv gam user ~primaryEmail update calattendees calendar ~calendarId event ~id delete depa...@domain.com doit

Ross

On May 19, 2018, at 1:09 PM, Constantly Learning <k...@walkersands.com> wrote:


The use case for this question is as follows. Departed employee is on many future-dated calendar events, but I'd prefer they not be listed as attendees on those events. However, I don't want to delete the user altogether, at least not right now. So, I just want to get them off of future calendar invites for events owned by others.

I tried this:

gam user <departed employee email> print events primary starttime +1d todrive

and then picked some events and ran

gam calendar <departed employee email> deleteevent eventid <eventid> doit

and that worked great in terms of deleting the event on the <departed employee email> calendar. 

But when I looked on other people's calendars at the events I'd run deleteevent on, I still see departed employee as an invitee, but they have a big red X next to their name. That just draws even more attention to them -- what I would prefer and had hoped I could do is get them off that invitee list altogether.

Possible with GAM? 

I see there is a way to update the Attendees collection via Google API (https://developers.google.com/calendar/v3/reference/events/update) but not sure if this is implemented in GAM yet. Thanks.



--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages