Introduction
This article walks through the steps for integrating with the Google Calendar API. The API allows full interaction with Google Calendar, including event creation and scheduling capabilities. In this tutorial, you’ll learn how to generate new calendar events in a user’s Google Calendar.
Integrating with Google Calendar involves two main steps. First, you’ll need to create a Google Calendar Web Connection in FME Form. Once the connection is established, a Google Calendar integration can be created. There are many reasons to integrate with Google Calendar API:
- Help manage recurring meetings
- Appointment coordination
- Gather statistics on scheduled or recurring meetings
. The following tutorial has been broken down into 3 parts:
- Part 1: Create a Google Calendar Web Connection
- Part 2: GET current Google Calendar Events
-
Part 3: POST a new Google Calendar Event
Step-by-step Instructions
Part 1: Create a Google Calendar Web Connection
Prior to creating the FME Form web service, you need to create a project within the Google console. Once your project is created, enable and use the Google API.
1. Open FME Form
Start FME Form and navigate to Utilities > FME Options > Web Connections.
2. Create the Google Calendar Web Service
Within the Web Connections menu, click on “Manage Services…”. When the Manage Web Service window pops up, use the ‘+’ to create a new Google Calendar web service. Before applying changes to the web service, replace the ClientID with your Google Cloud Console App Client ID. Also, rename the new service.
3. Create the Google Calendar Web Connection
Now that we have created a web service, we need to establish a web connection. Within the Utilities > FME Options > Web Connection menu, use the ‘+’ to add a Google Calendar web connection.
Part 2: GET Current Google Calendar Events
In this section, we will collect all meetings for the FME Lizard’s first work week of 2026.
1. Initiate the Workspace
Add a Creator transformer. This transformer creates a single feature to initiate the workflow.
2. Create Request Attributes
Add an AttributeCreator. Connect the output port of the Creator, to the input port of the AttributeCreator.
Within the AttributeCreator parameters, create four new attributes:
- Name: FME Lizard
- Email: fme.lizard@gmail.com
- DateMin: 2026-01-05T00:00:00Z
- DateMax: 2026-01-09T00:00:00Z
3. GET Calendar Events
After the new attributes are created, add an HTTPCaller to the Form canvas. Connect the output port of the AttributeCreator to the input port of the HTTPCaller. The HTTPCaller will make a GET request to the Google Calendar API to retrieve calendar events.
Double-click the HTTPCaller to set the parameters. Here, we will use the web connection created in Part 1 to authenticate the GET request. The request URL should include a GoogleCalendarID. The GoogleCalendarID can be found within your Google Calendar > Settings > Settings for your Calendar > Integrate calendar > Calendar ID menu. The Request URL will be formatted as follows.
https://www.googleapis.com/calendar/v3/calendars/<CalendarID>/eventsFor example:
https://www.googleapis.com/calendar/v3/calendars/fme.lizard@gmail.com/eventsNext, configure the Query String parameters of the HTTPCaller. The Query String parameters will control the information returned in the request. As per the Google Calendar API documentation, set the following parameters:
- maxResults: 250
- eventTypes: default
- singleEvents: True
- timeMin: @Value(DateMin)
- timeMax: @Value(DateMax)
Leave all other parameters as default.
The Google Calendar payload will be stored in a new attribute called _response_body.
4. Fragment the Response
Add a JSONFragmenter to the output port of the HTTPCaller. Within the JSONFragmenter parameters, set:
- Input Source: Attribute
-
JSON Query:
json["items"][*] -
Attributes to Expose: summary
Review the results to see what the FME Lizard got up to during this week!
Part 3: POST a new Google Calendar Event
In this section, we will create a Google Calendar event for March Break 2026. This is a common time for employees to take time off work due to an annual mid-term break for students attending elementary and high school.
1. Initiate the Workspace
Add a Creator transformer. This transformer creates a single feature to initiate the workflow.
2. Create Scheduling Attributes
Add an AttributeCreator. Connect the output port of the Creator, to the input port of the AttributeCreator.
Within the AttributeCreator parameters, create four new attributes:
- Name: FME Lizard
- Email: fme.lizard@gmail.com
- DateMin: 2026-03-16T00:00:00Z
- DateMax: 2026-03-10T00:00:00Z
3. Create the Event
After the new attributes are created, add an HTTPCaller to the Form canvas. Connect the output port of the AttributeCreator to the input port of the HTTPCaller. The HTTPCaller will make a POST request to the Google Calendar API to retrieve calendar events.
Double-click the HTTPCaller to set the transformer parameters. Here, we will use the web connection created in Part 1 to authenticate the POST request. The request URL should include a GoogleCalendarID. The GoogleCalendarID can be found within your Google Calendar > Settings > Settings for your Calendar > Integrate calendar > Calendar ID menu. The Request URL will be formatted as follows.
https://www.googleapis.com/calendar/v3/calendars/<CalendarID>/eventsFor example:
https://www.googleapis.com/calendar/v3/calendars/fme.lizard@gmail.com/eventsNext, expand the Body section of the parameters. Set the Upload Body as Specify Upload Body. Copy the following JSON code into the Upload Body parameter:
{
"end": {
"dateTime": "@Value(DateMax)",
"timeZone": "America/Vancouver"
},
"start": {
"dateTime": "@Value(DateMin)",
"timeZone": "America/Vancouver"
},
"summary": "Vacation - March Break",
"description": "I will be OoO for March Break this week. Please email me for emergencies",
"kind": "calendar#event",
"eventType": "default",
"guestsCanModify": true,
"attendees": [
{
"email": "@Value(Email)",
"responseStatus": "needsAction"
}
]
}Lastly, specify the Content Type as JSON. The HTTPCaller should match the image below.
4. Run the Workspace
Run the workspace to create the Google Calendar Event.