The 'CalendarApp' is used to perform the task and we start by getting hold of the relevant event, which for the purposes of demonstrating is hard-coded into the Apps Script but is likely to be taken from a spreadsheet in reality.
var event = CalendarApp.getEventById(eventId);Next we want to get a list of the Guests which will be returned as an array.
var guestList = event.getGuestList();Finally we need to loop through each Guest and extract their email address and status.
for (var i=0; i<guestList.length; i++) {
var guest = guestList[i];
var guestEmail = guest.getEmail();
var guestStatus = guest.getGuestStatus();
}