- Print
To download the app, visit: Library
Integrating with Microsoft's Graph API for Calendar
Introduction
Microsoft Calendar API allows the users to create, read and edit Microsoft calendar events with the right access set to their M365 accounts. The Goal of this connector is to integrate Tulip with Microsoft using Microsoft’s Graph API(v1.0) using HTTP Connectors & provide our customers with an out-of-box connector that can be imported into their instance.
Purpose
We are going to highlight different connector functions that can be built by doing HTTP calls to Microsoft’s Graph Api(v1.0) to interact with the Microsoft Calendar events to showcase various read and write actions on the calendar that could be leveraged for various use cases.
API Doc
Microsoft Graph API Documentation
Pre-Requisites
Create an account on Microsoft 365 & configure the OAuth 2.0 credentials in Microsoft Entra ID.
Register API with the required scopes in the Microsoft portal. Azure - Entra ID
Video of setting up the connector for excel:
You can follow the same steps to set up the calendar connector as well.
Tulip Connection Details
The following information would need to be configured on Tulip’s
Connectors.
- Running On: Cloud Connector Host
- Host: graph.microsoft.com
- Port:443
- TLS: Yes
OAuth 2: Authentication will be carried forward to all the Connector Functions
Connector Functions
1) Get all Calendar Events
Purpose
This connector will fetch all the calendar events from the M365 Calendar.
Endpoint
HTTP GET call to the endpoint: https://graph.micrsoft.com:443/v1.0/me/events
Required Input
No Inputs required
Output Extractor
- eventID: Unique identifier of the event which will be used to carry out the other tasks.
- eventSubject: Subject of the event.
- eventContent: Content of the event.
- eventStartDate: Start Date and time of the event.
- eventEndDate: End Date and time of the event.
- eventLocation: Location of the event.
- eventAttendees: Attendees of the event.
- eventOrganizer: Organizer of the event.
- Additional parameters that are returned with the response are included as part of the output parameters.
2) Get User Meeting Schedule
Purpose
This connector will get the free/busy availability information for a collection of users, distribution lists, or resources (rooms or equipment) for a specified time period.
Endpoint
HTTP GET call to the endpoint -https://graph.microsoft.com:443/v1.0/me/calendar/getSchedule
Required Input
The following are the parameters that are to be passed in the Request Body
- Email Address: A collection of SMTP addresses of users, distribution lists, or resources to get availability information for.
- Schedule Start Date Time: The date, time, and time zone that the period starts.
- Schedule End Date Time: The date, time, and time zone that the period ends.
- Timezone: Event TimeZone.
Output Extractor
- scheduleUserId: Schedule user email address.
- startTime: The date, time, and time zone that the period starts.
- endTime: The date, time, and time zone that the period ends.
- timeZone: TimeZone.
- scheduleStatus: Response status of the user schedules.
- scheduleSubject: Scheduled event subject.
- scheduleLocation: Scheduled event Location.
- scheduleStartDateTime: Scheduled event Start date time.
- scheduleEndDateTime: Scheduled event End date time.
3) Create an Event
Purpose
- Users can pass an Event Subject, Content, Start date-time, End date time, and other parameters as input & Tulip will create a new calendar event with the provided inputs. The response of the API will be the metadata and various properties of the calendar event. This can be further used to fetch and Update events.
- This connector can create an event in the user's default calendar or specified calendar for a specific user or group user or multiple users.
- Information is pulled from Microsoft Graph V1.0 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.
Endpoint
HTTP POST call to the endpoint: https://graph.microsoft.com:443/v1.0/me/events
Required Input
The following are the parameters that are to be passed in the Request Body
- Event Subject: Subject of the event
- Event Content: Content of the event
- Event Start Date Time: Start date-time of the event
- Event Timezone: Timezone of the event
- Event End Date Time: End date-time of the event
- Event Location: Location of the event
- Attendee Email Address: Attendee email address
Output Extractor
- eventId: Created event ID
- eventTimezone: Event TimeZone
- eventSubject: Subject of the event
- eventBody: Content of the event
- eventStartDateTime: Start date time of the event
- eventEndDateTime: End date time of the event
- eventLocation: Location of the event
- Additional parameters that are returned with the response are included as part of the output parameters.
4) Create Recurring Events
Purpose
- Users can pass an Event Subject, Content, Start date-time, End date time, and other parameters as input & Tulip will create a new recurring calendar event with the provided inputs. The response of the API will be the metadata and various properties of the calendar event. This can be further used to fetch and Update events.
- This connector will create a recurring event in the user's default calendar and specified calendar for a user or a group of users.
- Information is pulled from Microsoft Graph V1.0 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.
Endpoint
HTTP POST call to the endpoint https://graph.microsoft.com:443/v1.0/me/events
Required Input
The following are the parameters that are to be passed in the Request Body
- Event Subject: Subject of the event
- Event Content: Content of the event
- Event Start Date Time: Start date-time of the event
- Event Timezone: Timezone of the event
- Event End Date Time: End date-time of the event
- Event Location: Location of the event
- Attendee Email Address: Attendee email address
- Recurrence Event type: Recurrence event Type
- Recurrence Days Of Week: Recurrence event day
- Recurrence Start Date: Recurrence event Start Date
- Recurrence End Date: Recurrence event End Date
Output Extractor
- eventId: Created event ID
- eventTimezone: Event TimeZone
- eventSubject: Subject of the event
- eventBody: Content of the event
- eventStartDateTime: Start Date Time of the event
- eventEndDateTime: End Date Time of the event
- eventLocation: Location of the event
- eventRecurrenceRangeStartDate: Recurrence event Start date.
- eventRecurrenceRangeEndDate: Recurrence event End date.
- eventAttendees: Attendees of the event.
- eventOrganizer: Organizer of the event.
- Additional parameters that are returned with the response are included as part of the output parameters.
5) Update an Event
Purpose
- Users can pass an Event ID, Subject, Content, and other parameters as input & Tulip will update the events in the calendar. The response of the API will be the metadata and various properties of the calendar events.
- Information is pulled from Microsoft Graph V1.0 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.
Endpoint
HTTP PATCH call to the endpoint https://graph.microsoft.com:443/v1.0/me/events/{eventID}
Required Input
The following are the parameters that are sent as the Request Body
- Event Subject: Subject of the event
- Event Content: Content of the event
- Event Start Date Time: Start date time of the event
- Event TimeZone: Timezone of the event
- Event End Date Time: End date time of the event
- Event Location: Location of the event
- Attendee Email Address: Attendee email address
Output Extractor
- eventId: Created event ID
- eventTimezone: Event TimeZone
- eventSubject: Subject of the event
- eventBody: Content of the event
- eventStartDateTime: Start date time of the event
- eventEndDateTime: End date time of the event
- eventLocation: Location of the event
- Additional parameters that are returned with the response are included as part of the output parameters.
6) Delete an Event
Purpose
- Users can pass an Event ID as an input & Tulip will delete the event in the calendar.
Endpoint
HTTP DELETE call to the endpoint - https://graph.microsoft.com:443/v1.0/me/events/{eventID}
Required Input
The following are the parameters that are sent as the Request Body
- Event ID - The Event ID
Further Reading
Check out more information regarding Microsoft Connectors