cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Send Today's Calendar events details to attendees

Hello guys,

I have a requirement to send a notification everyday with the calendar events which are falling on Today's schedule.

So for recurring events, SharePoint is storing the details on RecurringDetails field which is Hidden, so I'm unable to see it on Nintex workflow while querying the list item.

It can be done from web service call, but if anyone has any hands-on experience on this, please provide me the query details.

Labels: (1)
0 Kudos
Reply
11 Replies
Not applicable

Re: Send Today's Calendar events details to attendees

Hi,

It was interesting task for me so I just googled a little and find a solution for You, maybe later a will post a detailed blog but now just to help you right now i can share what i found.

To query all recurring events in Nintex workflow you need to use Query list action with CAML query editor with corresponding query:

<Query>

  <Lists>

    <List ID="{5C8A24D4-8961-4D08-858C-0367E3F48CD6}" />

  </Lists>

  <ViewFields>

    <FieldRef Name="ID" />

    <FieldRef Name="RecurrenceData" />

  </ViewFields>

  <Where>

    <Eq>

      <FieldRef Name="fRecurrence"  />

      <Value Type="Recurrence">1</Value>

    </Eq>

  </Where>

</Query>

The key of this solution is this field which you cant see in any builder or list settings  <FieldRef Name="RecurrenceData" />. It is XML field which gives you information about your recurring event.

<recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><daily weekday="TRUE" /></repeat><repeatForever>FALSE</repeatForever></rule></recurrence>

So if you want to notify on your events you just need to query all events in you list with Query list action and get their ID's so after that you can loop through that events and check if it is todays event or not and then notify your users.

One more interesting thing is if you want to query recurring event this is the key point:

<Eq>

      <FieldRef Name="fRecurrence"  />

      <Value Type="Recurrence">1</Value>

    </Eq>

After this point you just need to examine your events data. If it is RecurrenceData field that use Query XML action.

If i forget something to mention or you still not able to achieve your goal you can try using SP Caml Query builder or helper which is very handy tool which shows all information about list, it's fields types and possible values. Thats how i found RecurrenceData field

I hope it helps

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

I attached a workflow that did just this in a previous thread.  We currently look at the events for the day and then email a group of users with an html table showing what is happening.  Getting the regular and recurring events is just half the battle.  Then you have to use some logic to decide whether or not that recurring event occurs on that particular day. 

Query one week of recurring events

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

Thanks for sharing this. It is helpful; I'm trying to modify the workflow as per my requirement.

One thing I noticed is, it is sending emails only if the event is All Day event. The workflow is too big to modify as per my requirement. I just want to send emails for all kind of events if that falls on Today's calendar.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

Here is the most recent version of the workflow.  We have it scheduled to run every day and I was able to confirm that it does include events that are not all day events. 

Unfortunately, because of the logic in calculating whether or not recurring events occur on today, the workflow does get kind of unruly.  This is in no way a perfect workflow.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

Thank you so much for your inputs!! We have a requirement to send notification for all kind of events if they occur on Today's date. Currently we have one item which will occur every Tuesday of the week and that should be notified to attendees. With the logic we have it is sending daily and that should not happen in my case.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

If you are simply filtering to return all events that start on or before today and end on or after today, it will give you all recurring events that span before and after today.  You have to add additional logic to determine whether or not that event would actually occur today.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

Hi Jermemiah -  I just tested your workflow and it is working great except for non All Day events.  Have you guys made any additional changes to the workflow since the post back in October?

Im new to nintex and this is working almost exactly as I need!

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

I modified the query so that the <lt> became <leq> and it now pulls in non-all day events for today.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Send Today's Calendar events details to attendees

Hi Jeremiah are you able to supply your logic so I can port to O365 environment?

0 Kudos
Accept as Solution Reply