Choose where you’d like to start

Create event in Google Calendar

Table of Contents

Note:

  • This task has been deprecated. However, user accounts with existing zoho.gapps scripts can continue to utilize it. 
  • This task is applicable only to Zoho Creator accounts added from the G Suite marketplace. The G-Suite marketplace can be accessed using the Google Apps icon (top right) in your G Suite account.

Overview

This task is used to create an event in Google Calendar in a G Suite account.

Syntax

<variable> = zoho.gapps.createEvent(<calendar_name>, <data_map>);

where,

ParameterData typeDescription
<variable> TEXTVariable to hold the response returned by Zoho Calendar.
<calendar_name>TEXTName of the calendar in which the event will be created.
<data_map>KEY-VALUE LIST OF KEY-VALUEInput map with keys representing various parameters in Google Calendar with the required values.

Applicable keys and values are:

KeyDescriptionApplicable value
evtEvent titleAny text value
evc

(optional)
Event detailsAny text value
alldayTo specify the event is an all day event or notTrue
False

Note: When set to true, the time values mentioned in st and et values will not take effect.
stEvent start timedate-time value
etEvent end timedate-time value greater than st value
remTo set reminder or notTrue
False
remValue

(optional)
Reminder valueem05da (Email 5 days)
al02mi (Alert 2 mins)
po21hr (SMS 21 hours)

Note: This value takes effect only if rem value is set to true.
part

(optional)
Comma separated participants email listComma separated participants email list
locLocationAny text value

Example

The following snippet creates two events in the specified calendar.

 
MultiEventParam = List();

MultiEventParam.add({"evc" : "John's Interview", "remValue" : "al34mi", "evt" : "On campus hiring", "rem" : "true", "allday" : "false", "loc" : "USA", "st" : "2019-10-10 12:30", "et" : "2019-10-15 23:00" });

MultiEventParam.add({"evc" : "Tony's Interview", "remValue" : "al34mi", "evt" : "Off campus hiring", "rem" : "true", "allday" : "false", "loc" : "USA", "st" : "2019-10-20 12:30", "et" : "2019-10-25 23:00" });

MultiEventResp = zoho.gapps.createEvents("calendar", MultiEventParam);

where,

MultiEventParam
is a LIST variable which holds a list of key-value pairs
"calendar"
is the TEXT that represents the calendar name in which the events will be created
MultiEventResp
is the variable which will hold the response returned by Google Calendar

Get Started Now

Execute