I would like to display the ID of an event (event.id) in google calendar (using dialogflow fulfillment). So I inserted a showEvent () function but this doesn't work. Could someone tell me where is the mistake? I need the ID because I would like to be able to delete an event later.
I would like to display the ID of an event (event.id) in google calendar (using dialogflow fulfillment). So I inserted a showEvent () function but this doesn't work. Could someone tell me where is the mistake? I need the ID because I would like to be able to delete an event later.
/* ***** */ `function showEvents(agent) { return new Promise ((resolve, reject) => {calendar.events.list({ 'auth': serviceAccountAuth, 'calendarId': calendarId, 'timeMin': (new Date()).toISOString(), 'showDeleted': false, 'singleEvents': true, 'maxResults': 10, 'orderBy': 'startTime' }).then(function(response) { var events = response.result.items; console.log('events:', events); agent.add('Appointment List:');
}); }); }`