Using the Google Calendar API, I can get all the attendees of the events with GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
.
In my calendar event, I use an alias [email protected]
which sends emails to the entire team organization. Unfortunately, my calendar event returns the alias, and not the individual emails, like this:
"attendees": [
{
"email": "[email protected]",
"self": true,
"responseStatus": "accepted"
},
{
"email": "[email protected]", <-- Not what I want
"displayName": "My Entire Company",
"responseStatus": "needsAction"
},
],
How do I get the expanded list of attendees, like this:
"attendees": [
{
"email": "[email protected]",
"self": true,
"responseStatus": "accepted"
},
{
"email": "[email protected]", <-- expanded email list
"responseStatus": "needsAction"
},
{
"email": "[email protected]",
"responseStatus": "needsAction"
},
{
"email": "[email protected]",
"responseStatus": "needsAction"
},
... etc
],
I use an alias [email protected] which sends emails to the entire team organization.
If you are adding [email protected] to the event then that is exactly what you are adding. Calendar has no way of knowing that email is a mailing list. If you want each person to be listed then you are going to have to add each person to the event. Google calendar can only return the information that you give it.
Answer: Don't use a mailing list when creating the event add each user. Otherwise Google calendar has no way of knowing this is a mailing list. As i see it google calendar is returning the correct data.