function doGet(e) {
var eName = e.parameter.eventName;
var eStart = e.parameter.start;
var eEnd = e.parameter.end;
var eLoc = e.parameter.loc;
var eDesc = e.parameter.desc;
var event = CalendarApp.getDefaultCalendar().createEvent(eName,
new Date(eStart),
new Date(eEnd),
{
location: eLoc,
description: eDesc
});
event.setColor('4');
return ContentService.createTextOutput(eName + " event sent to Calendar");
}
In your blocks you would build a url for the web component and use Web1.Get:
https://<YOUR SCRIPT URL>/exec
?eventName=
Paint House
&start=
September 22, 2020 14:00:00 UTC
&end=
September 22, 2020 16:00:00 UTC
&loc=
Home
&desc=
inside and out
Note the use of getDefaultCalendar. This uses the calendar of the google account user that owns the script. This calendar would need to be shared / other users subscribed to it, for other users to be able to see the entries.