Help Centre › Functions & Formulas
This article describes the RPA Microsoft Graph connector function to create a calendar event.
For a full list of available functions, please read MICROSOFT GRAPH functions.
Description
The Create event function creates a new event in the authenticated user’s calendar via Microsoft Graph API. It supports setting attendees, location, and can automatically create a Microsoft Teams meeting link.
Setting it up
To use the Create event function, follow these instructions:
{{popups:rpas/add:action=microsoft-graph-create-event}}
Once on a process map:
- Navigate to the process where you would like to add the function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the MICROSOFT 365 Create event option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Connector | Yes | Select | - | Select the Microsoft Graph connector to use |
| Subject | Yes | Text | - | Event subject/title |
| Start | Yes | Text | - | Start time as JSON: {"dateTime":"2024-01-15T09:00:00","timeZone":"Africa/Johannesburg"} |
| End | Yes | Text | - | End time as JSON: {"dateTime":"2024-01-15T10:00:00","timeZone":"Africa/Johannesburg"} |
| Body | No | Textarea | - | Event body/description |
| Location | No | Text | - | Event location |
| Attendees | No | Textarea | - | List of attendee objects as JSON |
| Online Meeting | No | Select | false | Create a Teams meeting link (true/false) |
| Variable | Yes | Text | - | Variable to store the created event |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Object | The created event with id, subject, start, end, webLink, and onlineMeeting details |
Errors
- Authentication failed – the connector token has expired or is invalid
- Invalid date format – start or end time is not a valid date object
- Insufficient permissions – the application lacks Calendars.ReadWrite permission
Tips
- Set Online Meeting to true to auto-generate a Teams meeting link
- Use variables in the subject and body, e.g. {meeting_topic}
- Access the Teams link via {variable.onlineMeeting.joinUrl} after creation
Related functions
- Update event – Update an existing calendar event
- Delete event – Delete a calendar event
- List events – List calendar events