Skip to main content
Nintex Community Menu Bar
Solved

Create an appointment element (.ics) with Nintex Workflow 2013

  • February 28, 2016
  • 12 replies
  • 515 views

Forum|alt.badge.img+6

You will find in this "How-To", all step to create an ICS element for Outlook.

Some actions see in this document: Build string, Regular expression, Web request, Calculate date, Query list, Collection operation and Send notification.

Of course, you can add all action you want in your workflow and next workflow.

Best answer by srkrahn

Excellent job documenting this...a couple enhancements to accommodate for the time zone issues...

  • Set a intGMTOffset variable to the number offset for your time zone. (CST = 6)
    • I created it as a variable, but I think I'll move it to a farm constant, since when DST changes, it would need updating
  • Use the "Calculate Date" action to add the variable above to the "hours" portion of the start & end times for the event.
  • Change the references in the textAllDayEvent variable to your new variables instead of the ItemProperty values.

12 replies

Forum|alt.badge.img
  • May 4, 2016

We have run into an issue where the calendar event is submitted without a time zone from a custom list instead of a calendar list. This causes the appointment to be saved to the users Outlook Calendar with the UTC time zone, instead of the local time zone for the user, or the regional time zone for the site collection. Is this due to being a Custom List instead of a Calendar List?


Forum|alt.badge.img+6
  • Author
  • May 6, 2016

The workflow is based on the date/time you set when you add a new element. None compute action are made to transform the date/time to the value you want (UTC, local or otherwise).

I don't think so the custom list generates an issue.


Forum|alt.badge.img+4
  • July 20, 2016

François THOMAS This is great!  Thank you so much for the detailed write up.

Jacob Bradley - My times weren't saving to Outlook correctly either.  I did some log to workflow history actions and it showed this:

  • Comment was the start and end dates from the item properties:
    start date/time: 7/20/2016 3:00 PM
    end date/time: 7/20/2016 4:00 PM 

  • Comment was the formatted date from the build string action:
    DTSTART:20160720T150000Z
    DTEND:20160720T160000Z 

  • Comment was the txtAllDayEvent workflow variable (the text making up the .ics file)
    BEGIN:VCALENDAR
    VERSION:2.0
    BEGIN:VEVENT
    STATUS:TENTATIVE
    DTSTART:20160720T150000Z
    DTEND:20160720T160000Z
    SUMMARY;ENCODING=QUOTED-PRINTABLE:another appointment
    DESCRIPTION;ENCODING=QUOTED-PRINTABLE:=0D=0A
    END:VEVENT
    END:VCALENDAR

Everything was being captured correctly and sent to outlook with the correct times, but the appointment in Outlook was off by 5 hours.  (I am in Central Time, so that should have been -6 hours, but I think it may have been ignoring daylight savings, too.)

I was able to resolve this by removing the "z" from the format date functions in the build string actions, so it looks like this:

DTSTART:fn-FormatDate({ItemProperty:EventDate},"yyyyMMddTHHmmss")

DTEND:fn-FormatDate({ItemProperty:EndDate},"yyyyMMddTHHmmss")

Hope that helps!

Brian


Forum|alt.badge.img+3
  • Rookie
  • Answer
  • January 26, 2017

Excellent job documenting this...a couple enhancements to accommodate for the time zone issues...

  • Set a intGMTOffset variable to the number offset for your time zone. (CST = 6)
    • I created it as a variable, but I think I'll move it to a farm constant, since when DST changes, it would need updating
  • Use the "Calculate Date" action to add the variable above to the "hours" portion of the start & end times for the event.
  • Change the references in the textAllDayEvent variable to your new variables instead of the ItemProperty values.

Forum|alt.badge.img+8
  • March 15, 2017

Hello,

This is really useful. However, this creates an appointment where a user can't "accept" or "Reject" a meeting invite. Is there a way to create an .ics file that has meeting invite format?


Forum|alt.badge.img+11
  • June 1, 2018

Wow this is great feature
I wonder if there is a workflow also to cancle / remove / delete the appointment from the calendar in outlook?


Forum|alt.badge.img+11
  • June 1, 2018

Seems like; it will be the same workflow but at very end of the Build String, to use the following:

BEGIN:VCALENDAR
VERSION:2.0
METHOD:CANCEL
STATUS:CANCELLED
BEGIN:VEVENT
{WorkflowVariable:txtFreeBusy}
{WorkflowVariable:txtAllDayEvent}
{WorkflowVariable:txtSummary}
{WorkflowVariable:txtLocation}
END:VEVENT
END:VCALENDAR

Although, this does not cancle it but asks you to remove it yourself.
There is no cancellation option...

UPDATE

------------

I thought the above did work but must have mistaken myself ...
Unfortunately, the above does not delete the event from the calendar UNLESS you remove it directly from the calendar manually!


Forum|alt.badge.img+11
  • October 30, 2018

Forum|alt.badge.img+9

François THOMAS,

How would you add organizer and attendees?


Forum|alt.badge.img+6
  • June 12, 2019

Hi

 

Is this code any different for Office 2010?  We have followed the procedure described but it does not seem to work with Office 2010.  Should the Version be 1.0?


Forum|alt.badge.img+6
  • June 12, 2019

These are the errors that appear for Win 10 and Win 7:

operation failed (Win10) and Not a valid Internet calendar file (Win7)


Forum|alt.badge.img+1
  • Rookie
  • March 18, 2021

Is there a way to add a reminder alert time in the appointment?