Okta Workflows How-To: Create an All Day Event in Google Calendar Using Okta Workflows

Okta Workflows is a no-code platform for automating identity processes. 

This blog post is based on a question asked during office hours or the #okta-workflows channel in MacAdmins Slack: How to create an all-day event in Google Calendar? 

Getting started

There are two ways to create an all-day event in Google Calendar:

  • Using Google Calendar – Create New Event card
  • Using Google Calendar – Custom API Action card

When using Google Calendar – Create New Event card you pass a date value that holds the date and time for Start Time field and End Time field. This is the flow:

workflows_howto_calendar_allday_flow.png (1554×1272)
Creating all-day event in Google Calendar

All-day event created in Google Calendar:

workflows_howto_calendar_alldayevent.png (1368×956)
All-day Google Calendar event

Another option is to use Google Calendar – Custom API Action card to create an all-day event. This is the flow:

workflows_howto_calendar_customapiaction.png (1026×1276)
Creating all-day event in Google Calendar

Object – Construct card creates a JSON object that holds the event title (summary), location (location) and start/end dates. The name of the fields are important (show by arrows).

Test the card to see the JSON object created. It looks like this:

{
   "summary": "💈Employee Training",
   "start": {
      "date": "2022-10-07"
   },
   "location": "Conference room 2",
   "end": {
      "date": "2022-10-07"
   }
}

A Custom API Action card uses an existing connection to a service (Google Calendar in this example) and allows calling any API endpoint supported by Google Calendar API.

How to Call an API When It’s Not Available From an Existing Card (Connection)

You need to set the Relative URL field and any other parameters required by the API.

When calling Google Calendar API, set the Relative URL field to /v3/calendars/calendarID/events. To get a calendar’s calendarID , select ⠇> Setting and sharing > Integrate calendar. There you will see the calendar ID. It is usually your email address.

So the API endpoint will be /v3/calendars/[email protected]/events.

Now you know two ways to create an all-day event in Google Calendar.

Get your Workflows questions answered

Do you have a question about Okta Workflows? Not sure how to build a flow? Join the weekly community office hours to get help. 

 

Tags

Workflows