I want create an event in calendar from my custom gmail add-on. And I need to pass Title, Description to Calendar gmail add-on or google calendar.
Is it possible?
Picture of expecting feature:
I want create an event in calendar from my custom gmail add-on. And I need to pass Title, Description to Calendar gmail add-on or google calendar.
Is it possible?
Picture of expecting feature:
Have you thought about using the Google Calendar API? You could use this to create the Calendar Event.
Other than that you will be needing to manipulate the DOM... not easy/stable.
You can either use the CalendarApp:
var event = CalendarApp.getDefaultCalendar().createEvent('Apollo 11 Landing',
new Date('July 20, 1969 20:00:00 UTC'),
new Date('July 21, 1969 21:00:00 UTC'));
Logger.log('Event ID: ' + event.getId());
function createEvent() {
var calendarId = 'primary';
var start = getRelativeDate(1, 12);
var end = getRelativeDate(1, 13);
var event = {
summary: 'Lunch Meeting',
location: 'The Deli',
description: 'To discuss our plans for the presentation next week.',
start: {
dateTime: start.toISOString()
},
end: {
dateTime: end.toISOString()
}
};
event = Calendar.Events.insert(event, calendarId);
Logger.log('Event ID: ' + event.id + ' Event link in Calendar: ' + event. htmlLink);
}
event.htmlLink lets you open the Calendar event in the UI.
And the last option is to use the create event template form which you pre-populate as described here.