- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-24-2019 06:24 AM
Dear All, In this section I will describe how we can send event notification from Service-now calendar (user_calendar_event) to Gmail Calendar (your personal Gmail account).
First, in the System navigation type 'my calendar' then you will find your service-now calendar under the Self-service module: you can create some events for testing. All those events are stored in the service-now table: user_calendar_event
We start by creating Events to trigger the creation or updating or deleting the events in service-now:
1 - Go to system policy -> Events -> Registry and click new:
We create the first event that will trigger when an event is created in our service-now calendar,
2- Click on the related link and create a business Rule to capture that event when triggered.
The business rule will run after insert only, on the advanced script copy the script below:
if (current.operation() == 'insert') { gs.eventQueue("user_calendar_event.inserted", current, gs.getUserID(), gs.getUserName()); } |
The business rule will be like:
3- We create a notification for that event:
In the when to send part we have to specify: event is fired and we select our event from the list as below:
We can also specify who will receive, we can select both: Event parm 1 contains recipient and Send to event creator
And finally what it will contain, the best practice is to use a template with a content type: HTML and plain text:
Below the content of the template notification:
BEGIN:VCALENDAR RODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:PUBLISH X-WR-CALNAME:Art Yourself Classes X-WR-TIMEZONE:Europe/Paris X-WR-CALDESC:Sign up here to take Art Classes @ Art Yourself w/Virginia LaM ont Naegeli X-WR-TIMEZONE:Europe/Paris BEGIN:VEVENT ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:${user.email} ORGANIZER:MAILTO:dev42863@servicenowdevelopers.com LOCATION:Hangout meeting DTSTART:${start_date_time} DTEND:${end_date_time} UID:${sys_id} DTSTAMP:${dtstamp} STATUS:CONFIRMED DESCRIPTION:test from servicenow SUMMARY:subject line END:VEVENT END:VCALENDAR |
- 4,111 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Dear Dadi,
First of all great work, really useful.
I was wondering if this solution will update and cancel the meetings on Google calendar ?
I assume not. Would you kind enough to guide me how can I update (reschedule or cancel a meeting )?
At the moment if I create a meeting in SNOW, it creates it in Google calendar, thats great, but If I want to modify a pre-created meeting's time on SNOW, how to update the google side ?
Appreciate your direction.
Ayub