Best answer

Removing a user from a Google Calendar Invite

  • 1 April 2021
  • 5 replies
  • 1485 views

Userlevel 7
Badge +9

Hello! Is there a nice and clean way to do this that anyone has found? 

Basically I want to remove a single user from a Group Calendar Invite, but I can’t find a way of doing this without clearing the calendar invite attendees and then re-adding everyone but the person I want to remove… Which has the unintended consequence of

  1. Notifying everyone when the event is cleared
  2. Re-notifying them when I add everyone back in

...Another way to put this question could also be “How can I update a calendar invite without notifying everyone?”

icon

Best answer by Troy Tessalone 1 April 2021, 23:43

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +14

Hi @andywingrave

Have you tried using the GCal Update Event and simply replacing the Attendees minus the 1 you want to remove?

Wondering how GCal behaves if it sees the same Attendees -1.

Maybe this won’t retrigger the notifications for the Attendees.

 

Userlevel 7
Badge +9

Hey @Troy Tessalone - How can I do that though, because this field seems to expect individual users

I guess I could just set the limit on users to something managable in a JS script and output them as individual variables… 

Userlevel 7
Badge +9

Which is what I did - And it looks as ugly as anything I’ve ever seen, but it’s functional… So there’s that.

 

var attendees = (await inputData.attendees).split(',')
var remove = inputData.email


var newAttendees = attendees.filter(x => x != remove)

var attendee0, attendee1, attendee2, attendee3, attendee4, attendee5, attendee6, attendee7, attendee8, attendee9, attendee10, attendee11, attendee12, attendee13, attendee14, attendee15, attendee16, attendee17, attendee18, attendee19, attendee20, attendee21, attendee22, attendee23, attendee24, attendee25, attendee26, attendee27, attendee28, attendee29, attendee30, attendee31, attendee32, attendee33, attendee34, attendee35, attendee36, attendee37, attendee38, attendee39, attendee40, attendee41, attendee42, attendee43, attendee44, attendee45, attendee46, attendee47, attendee48, attendee49, attendee50;

attendee0 = newAttendees[0]
attendee1 = newAttendees[1]
attendee2 = newAttendees[2]
attendee3 = newAttendees[3]
attendee4 = newAttendees[4]
attendee5 = newAttendees[5]
attendee6 = newAttendees[6]
attendee7 = newAttendees[7]
attendee8 = newAttendees[8]
attendee9 = newAttendees[9]
attendee10 = newAttendees[10]
attendee11 = newAttendees[11]
attendee12 = newAttendees[12]
attendee13 = newAttendees[13]
attendee14 = newAttendees[14]
attendee15 = newAttendees[15]
attendee16 = newAttendees[16]
attendee17 = newAttendees[17]
attendee18 = newAttendees[18]
attendee19 = newAttendees[19]
attendee20 = newAttendees[20]
attendee21 = newAttendees[21]
attendee22 = newAttendees[22]
attendee23 = newAttendees[23]
attendee24 = newAttendees[24]
attendee25 = newAttendees[25]
attendee26 = newAttendees[26]
attendee27 = newAttendees[27]
attendee28 = newAttendees[28]
attendee29 = newAttendees[29]
attendee30 = newAttendees[30]
attendee31 = newAttendees[31]
attendee32 = newAttendees[32]
attendee33 = newAttendees[33]
attendee34 = newAttendees[34]
attendee35 = newAttendees[35]
attendee36 = newAttendees[36]
attendee37 = newAttendees[37]
attendee38 = newAttendees[38]
attendee39 = newAttendees[39]
attendee40 = newAttendees[40]
attendee41 = newAttendees[41]
attendee42 = newAttendees[42]
attendee43 = newAttendees[43]
attendee44 = newAttendees[44]
attendee45 = newAttendees[45]
attendee46 = newAttendees[46]
attendee47 = newAttendees[47]
attendee48 = newAttendees[48]
attendee49 = newAttendees[49]
attendee50 = newAttendees[50]

output = [{newAttendees, attendee0, attendee1, attendee2, attendee3, attendee4, attendee5, attendee6, attendee7, attendee8, attendee9, attendee10, attendee11, attendee12, attendee13, attendee14, attendee15, attendee16, attendee17, attendee18, attendee19, attendee20, attendee21, attendee22, attendee23, attendee24, attendee25, attendee26, attendee27, attendee28, attendee29, attendee30, attendee31, attendee32, attendee33, attendee34, attendee35, attendee36, attendee37, attendee38, attendee39, attendee40, attendee41, attendee42, attendee43, attendee44, attendee45, attendee46, attendee47, attendee48, attendee49, attendee50}];

 

 

Userlevel 7
Badge +14

@andywingrave You should be able to simplify that code.

Try this...

 

Code:

var Emails = inputData.Emails.split(',');
var Exclude = inputData.Exclude;

Emails = Emails.filter(i => !i.includes(Exclude));

output = [{Exclude, Emails}];

 

Userlevel 7
Badge +9

Yeah - Good shout - Didn’t think of that. D’oh! Thanks Troy

 

Although - aside from the prettier code, I’m still capped by the number of records I want to copy and paste into the next step… So I will keep my ugly code as it is for now. But appreciate your guidance here.