Creator Help

Create an Event in Zoho Calendar

 Create an Event in Zoho Calendar

You can use Zoho Creator Form to collect information and populate it in Zoho Calendar as a new event using createEvent() Deluge task.

Syntax

<return value> = zoho.calendar.createEvent(<calName>,<Event Details key:value>);

where,
<return value> is the map object containing response returned by Zoho Calendar.
<calName> is the name of the calendar in Zoho Calendar, where the event should be added.
<Event Details> is the map variable that holds the key,value pairs. The map key is the column name of the table and the map value is the field value as submitted in the ZC form.

 Example 1: Create an event in Zoho Calendar

Sample script to create a new event in Zoho Calendar. You can add the script to On Add -> On Success block of the form.

mp = { "StartDate" : Date_Time_1, "EndDate" : Date_Time_2, "sum" : "localcalapitest", "loc" : "India", "desc" : "TEST" };
calResp = zoho.calendar.createEvent("TEST",mp);

StartDate & EndDate holds the start and end of the event (date format "dd-MM-yyyy HH:mm:ss").
sum refers to the name of the event to be created
loc refers to the event location
desc refers to the description of the event
calResp is the map variable which holds the value returned by Zoho Calendar.

Note:

  • Use date-time field type for StartDate and EndDate.

Sample script to create a new event in Zoho Calendar, where the values of start date, end date, sum. loc, desc are provided. Please note that the date-time values must be in the format as given below.

calResp = zoho.calendar.createEvent("TEST", {"StartDate" : "19-06-2012 17:20:00", "EndDate" : "20-06-2012 18:00:00", "sum" : "localcalapitest", "loc" : "India", "desc" : "TEST"});

Example 2: Create an all-day event in Zoho Calendar

The following script creates an all-day event in the calendar - "richard.p" in Zoho Calendar.

paramMap={"StartDate":"19-06-2019 18:00:00", "EndDate":"21-06-2019 18:00:00", "sum":"Meeting", "loc":"Chennai", "desc":"Zoholics", "all":"1"};
response =zoho.calendar.createEvent("richard.p",paramMap);

all represents that the event created lasts more than a day.

 Response Format

{
    "response":
    {
        "result":
        {"eventId":286000000009001,"eventKey":"27d5099014ece3f2381aa04619302c
6af8c0a3cf2cd0cb6a3ce7330d80615b93edb789d082bc93e15abe988762ba1040",
"eventName":"localcalapitest"}
    }
}

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com