5 min read

createEvent Documentation

Purpose

The node is designed to create an event on a Vantage-managed Outlook Calendar. It integrates with the Outlook Calendar API to allow users to define various event attributes such as title, description, timing, attendees, and more. Its primary goal is to facilitate seamless scheduling and management of calendar events through the Vantage platform.

Settings

The node has several configurable settings, each of which is crucial for defining how the event is created:

  1. Summary

    • Input Type: String
    • Description: The title of the event. This is a required field, and if it is not provided, the function will return an error.
    • Default Value: None (required)
  2. Description

    • Input Type: String
    • Description: A detailed description of the event. If omitted, the event will be created without any description.
    • Default Value: Empty string ('')
  3. Location

    • Input Type: String
    • Description: The physical or virtual location where the event will occur. If not specified, the event will be created without a location.
    • Default Value: Empty string ('')
  4. StartDateTime

    • Input Type: String (ISO 8601 format)
    • Description: The starting date and time of the event. The function requires this field to function and return successfully.
    • Default Value: None (required)
  5. EndDateTime

    • Input Type: String (ISO 8601 format)
    • Description: The end date and time of the event. This field is also mandatory for event creation.
    • Default Value: None (required)
  6. TimeZone

    • Input Type: String (IANA timezone)
    • Description: Defines the timezone for the event. If this is not provided, the default timezone set will be 'UTC'.
    • Default Value: 'UTC'
  7. Attendees

    • Input Type: String (comma-separated emails)
    • Description: A comma-separated list of attendee email addresses. If no attendees are provided, the event can still be created without them.
    • Default Value: Empty string ('')
  8. AddTeamsMeeting

    • Input Type: Boolean
    • Description: A flag indicating whether to add a Microsoft Teams meeting link to the event. If set to true, a Teams meeting link will be generated; otherwise, it will not.
    • Default Value: false
  9. CalendarId

    • Input Type: String (optional)
    • Description: An optional override for the calendar ID where the event will be created. If not provided, the event will default to the Vantage-managed calendar.
    • Default Value: None (falls back to Vantage-managed calendar)

How It Works

The node operates as follows:

  1. Initialization: It starts by establishing a connection to the Outlook Calendar service using a secure connection.

  2. Input Handling: The function attempts to retrieve the necessary inputs from the function inputs, falling back on the config if the inputs are not provided.

  3. Validation: It checks that essential fields (such as summary, startDateTime, and endDateTime) are available; otherwise, it returns an error.

  4. Calendar Selection: The function determines whether to use a user-provided calendar ID or create a Vantage-managed calendar if none is provided.

  5. Event Creation: It constructs the event data, including the start and end times and attendee details, based on Microsoft Graph API format.

  6. Execution: Finally, it calls the integration to create the event in the calendar, returning the event data and metadata upon success or an error message if the process fails.

Data Expectations

The function expects specific formats for its inputs, including:

Use Cases & Examples

Use Cases

  1. Group Meeting Scheduling: A project manager arranges a weekly stand-up meeting with team members and invites them all via email.

  2. Event Creation for Webinars: A marketing team schedules a marketing webinar, adding details such as location (virtual), attendees, and Teams meeting link.

  3. Company Events Management: An HR manager organizes an all-day company retreat, requiring the creation of a full-day event in the company's calendar.

Example Configuration

Use Case: Scheduling a Weekly Team Stand-Up

Requirement: The project manager wants to create a weekly stand-up meeting every Monday at 10 AM.

Sample Configuration Data:

json
{
    "inputs": {
        "summary": "Weekly Team Stand-Up",
        "description": "Discuss project progress and blockers",
        "location": "Conference Room A",
        "startDateTime": "2023-10-30T10:00:00",
        "endDateTime": "2023-10-30T11:00:00",
        "timeZone": "America/New_York",
        "attendees": "pm@example.com, developer@example.com, designer@example.com",
        "addTeamsMeeting": true
    },
    "config": {
        "calendarId": "user123@vantage.com"
    }
}

In this configuration, the project manager is creating a detailed event with all necessary attributes, setting the event to add a Teams meeting link, and specifying the time zone as "America/New_York".

Impact on Billing

Using the node may impact usage-based billing, as each API call to create an Outlook calendar event could count against usage limits. Ensure to monitor usage to avoid unexpected charges associated with exceeding allocated limits.