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 team@mycompany.com
which sends emails to the entire team organization. Unfortunately, my calendar event returns the alias, and not the individual emails, like this:
"attendees": [
{
"email": "me@mycomapny.com",
"self": true,
"responseStatus": "accepted"
},
{
"email": "team@mycomapny.com", <-- Not what I want
"displayName": "My Entire Company",
"responseStatus": "needsAction"
},
],
How do I get the expanded list of attendees, like this:
"attendees": [
{
"email": "me@mycomapny.com",
"self": true,
"responseStatus": "accepted"
},
{
"email": "you@mycomapny.com", <-- expanded email list
"responseStatus": "needsAction"
},
{
"email": "someoneelse@mycomapny.com",
"responseStatus": "needsAction"
},
{
"email": "manager@mycomapny.com",
"responseStatus": "needsAction"
},
... etc
],
I use an alias team@mycompany.com which sends emails to the entire team organization.
If you are adding team@mycompany.com 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.