How to Set Up Calendar Invites for Outlook Using ServiceNow

Introduction: 

Creating calendar invites for Outlook through ServiceNow can significantly streamline the scheduling of meetings and events. This guide will walk you through the steps to set up an iCalendar event and trigger it via email notification using the import/export mapping feature in ServiceNow. We’ll explore how to map the date fields to the dtstart and dtend variables and create a custom email template. Throughout the blog, references to the out-of-the-box change example from the change_request table will enhance your understanding, making the setup process accessible and straightforward for all users.

Step 1: Set Up Import/Export Mapping

To begin, you need to configure the Import/Export Maps Table to translate date and time fields into the iCalendar format recognized by Outlook.

  1. Access the Table: Type sys_impex_map.list in the Type Filter Text on the left or search for it in the list of tables.

  2. Create a New Entry: Click the New button.

    • Name: Use the format icalendar.your_table_name (ensure you use the exact table name).
    • Select the Table: Choose the relevant table for your calendar invites (Optional)
    • Type: Set the "Type" field to icalendar.
    • Description: Optionally, add a description for clarity.



  3. Field Setup: Map the following fields:

    • dtstart: The start date and time of the event.
    • dtend: The end date and time of the event.




You can use an existing table or create a custom one for this purpose. Map the fields accordingly to ensure proper functionality.

Step 2: Create the iCalendar Code for the Invite

iCalendar format is a standard way to describe calendar events, and it’s supported by Outlook. You'll need to include this format in the email template. Here's an example of the iCalendar code:

BEGIN:VCALENDAR
PRODID:-//Service-now.com//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:${to} ORGANIZER:MAILTO:${from}
DTSTART:${dtstart}
DTEND:${dtend}
UID:${sys_id}
DTSTAMP:${dtstamp}
LOCATION:${location}
DESCRIPTION:${description}
SUMMARY:${short_description}
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-DISALLOW-COUNTER:TRUE
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR

Explanation of Key Elements:

  • DTSTART and DTEND: Define the event start and end times using the variables mapped earlier.
  • UID and DTSTAMP: Ensure the uniqueness of the event and mark the timestamp.
  • LOCATION: Sets the meeting location.
  • DESCRIPTION and SUMMARY: Defines the event details and subject.

Step 3: Build a Custom Email Template

Now, you need to add this iCalendar code to a custom email template in ServiceNow. This template will be used in notifications.

To create the email template:

  • Go to Email Templates under the System Notification application.
  • Use the iCalendar code as the message body.


Step 4: Configure and Trigger the Notification

Finally, you’ll need to configure the notification to trigger the calendar invite based on specific conditions, such as a task assignment or an update.

  1. Navigate to: System Notification > Email > Notifications.

  2. Define the Notification Type: Set it as a Meeting Invite.

  3. Set the Trigger Condition: For example, configure it to activate when a task is assigned.

  4. Attach the Custom Email Template: Use the template you created earlier to format the calendar invite properly.





This setup ensures that calendar invites are sent automatically under the defined conditions.

Step 5: Test the Invite

After setting everything up, test the process to ensure that the calendar invite works as expected:

  • Create or update a task that meets the notification trigger conditions.
  • Check the email to verify that the calendar invite is formatted correctly and opens in Outlook as expected.






Conclusion: With these steps, you’ve successfully configured ServiceNow to send Outlook calendar invites using import/export mapping and custom email templates. This method ensures that scheduling events and sending invites can be automated and streamlined, enhancing productivity and communication within your organization.



Comments

Popular posts from this blog

Show Character Counter for Form Fields in ServiceNow Without Risky DOM Manipulation