Add Outlook Appointment

questsal78
Giga Expert

Hi there,

Instance: Istanbul

Question: I'm trying to add appointment in Outlook and tried sending meeting invitations using articles available on google. I've succeeded to receive ics attachment file in email but I've two problems:

1) ics file I received in attachment doesn't open and I couldn't do anything with it. please see below screenshot:

find_real_file.png

2) Basically I need to add appointment directly to a mailbox, it has been confirmed by client and I want to add this in outlook calendar. Not sure if I need minor code adjustment in below code that I used to send meeting invitation in an email 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:${dtstart} 
DTEND:${dtend} 
UID:${sys_id} 
DTSTAMP:${dtstamp} 
DESCRIPTION:${description} 
END:VEVENT 
END:VCALENDAR

 

Important: Please note I just want to add an appointment in calendar

 

Your help will be appreciated.

 

Thank you,

Mujtaba Ahmed

 

1 ACCEPTED SOLUTION

arya6
ServiceNow Employee
ServiceNow Employee

Hi Mujtaba,

 

You have got the .ics attachment out without a hitch and as the mail client clearly indicates the issue lies with the file itself.

 

The mail client cannot parse the .ics file, the difficulty with these files is that they are notoriously difficult to debug, but you can make use of one of the many online ical validators to check your file.

 

I think the issues lies with one of the mail script variables, likely the format of the value when included in the file.

 

Make sure you try this with hard-coded values first by removing all mail_script variables. For example, instead of "${dtstart}" do "DTSTART:20190101T070000", again this will help you narrow-down the issue more quickly.

 

Hope that helps,

Arya

View solution in original post

7 REPLIES 7

arya6
ServiceNow Employee
ServiceNow Employee

Hi Mujtaba,

 

You have got the .ics attachment out without a hitch and as the mail client clearly indicates the issue lies with the file itself.

 

The mail client cannot parse the .ics file, the difficulty with these files is that they are notoriously difficult to debug, but you can make use of one of the many online ical validators to check your file.

 

I think the issues lies with one of the mail script variables, likely the format of the value when included in the file.

 

Make sure you try this with hard-coded values first by removing all mail_script variables. For example, instead of "${dtstart}" do "DTSTART:20190101T070000", again this will help you narrow-down the issue more quickly.

 

Hope that helps,

Arya

questsal78
Giga Expert

@Arya: thank you for your response.

 

I've tried hard coded value but still same result. I've enclosing screenshots of my icalendar mappings, email template and email notification. I really need help because I'm stuck in this for some time now and I've run out of ideas. Looks like simple 3 steps:

1) Define iCalendar mapping with custom table

2) Create email notification

3) Define email template

I've looked all the solutions but unable to find a solution yet, screenshots are below:

iCalendar Mappings:

find_real_file.png

 

Email Notification:

find_real_file.png

 

Email template:

find_real_file.png

 

I've tried using OOB outlook invitation for Change request and it's working fine. I've copied the same message in my template from change request template but still there is problem parsing this message with outlook, hence receiving unsupported .ics file message.

 

Any help/guidance will be appreciated.

 

Thank you,

Mujtaba

 

questsal78
Giga Expert

One more interesting thing, not sure if this is a trust issue with my outlook but when I click attachment it opens it properly as outlook message: please see below screenshot:

 

find_real_file.png

 

find_real_file.png

Just to give you updates, finally got it working, problem was with mail script variables as suggested by Arya.

 

I've removed unnecessary variables and it works now:

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}
ORGANIZER:MAILTO:${from}
DTSTART:${dtstart}
DTEND:${dtend}
TRANSP:OPAQUE
UID:${sys_id}
X-MICROSOFT-CDO-IMPORTANCE:${priority}
STATUS:CONFIRMED
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR