UI Action to create a calendar invite?

conanlloyd
Giga Guru

Greetings-

As part of our deployment cycle I am required to send a meeting request to a shared calendar with the following specs:

  1. All Day Event
  2. Show time as free
  3. No alarm
  4. To: ServiceNow@regeneron.com
  5. From: logged in user
  6. Subject: ${change number} - {Change short description}
  7. Location: ServiceNow Production Instance

Sadly, I cannot seem to wrap my head around how to configure a meeting request notification.   Can anyone out there help me?

Conan

12 REPLIES 12

Jim Coyne
Kilo Patron

Take a look at the OOB notification called "Notify Change Calendar" as a start.   Open it up, change the name to whatever you want and select "Insert & Stay" to create a new record that we will modify to your needs.



You'll need to change the condition so it fires on a new event that you must create and fire from the UI Action.



You can add the email address to the "Users" list field and clear the "Users/Groups in fields" field so it will only go out to the appropriate email address



The "Subject" field is what the user will see in the calendar view, the "Message" field contains the text you see in the email and the calendar item.



The "Email template" field points to a vCalendar template that we will modify for your purposes.   Go to the "change.calendar.integration" OOB template and create a copy of it with a new name then update the notification to use the new template.   Use the following as the template:



BEGIN:VCALENDAR


PRODID:-//Service-now.com//Outlook 11.0 MIMEDIR//EN


VERSION:2.0


METHOD:REQUEST


BEGIN:VEVENT


ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=FALSE:MAILTO:${to}


DTSTART;VALUE=DATE:20150204


DTEND;VALUE=DATE:20150205


LOCATION:ServiceNow Production Instance


X-MICROSOFT-CDO-BUSYSTATUS:FREE


TRANSP:TRANSPARENT


SEQUENCE:${sys_mod_count}


UID:${number}


DTSTAMP:${dtstamp}


DESCRIPTION:${description}


SUMMARY:${summary}


PRIORITY:3


X-MICROSOFT-CDO-IMPORTANCE:${priority}


STATUS:CONFIRMED


CLASS:PUBLIC


END:VEVENT


END:VCALENDAR



It's not quite complete, but it's a start.   The text highlighted in red are changes to the original template.   You may also want to try changing "METHOD:REQUEST" to


"METHOD:PUBLISH".   It does not work with Outlook, but it may automatically publish the event in the shared folder.



The DTSTART and DTEND parameters need to have just a date without the time to make it an "all day" event.   It's hard coded above, but I'm thinking that a mail_script would have to be written to get that info.



I'll check in on it some more tomorrow.


Did that help any?


I'm sorry for the delay Jim, not cool of me to keep you hanging. Works so far, I just need to figure out how to trim the time from the u_migrated_to_production field so it only passes the date.



Thanks much for your help, btw.   Any chance I'll get to meet you at Knowledge?


No problem, and yes, I will be at Knowledge this year.   We should definitely get together at some point.