Skip to main content
Nintex Community Menu Bar

I tried searching for site workflow examples on the forum and I didn't see a tremendous amount, so I thought I would write about a simple site workflow that appears to be requested often.  The workflow needs to remind the document owner when the document review date is three months away (giving them time to review and update the document).

To run through this blog post, ensure you have a document library in your site called "Procedure".  Ensure that this document library has the following columns:

  • Review Date (Date and Time:  Date Only) - mandatory
  • Document Owner (Person or Group) - mandatory

 

A site workflow does not get created in a list or library, but is accessible though Settings > Nintex Workflow 2013 > Create Site Workflow.  The workflow designer will open ready for you to start developing your site workflow.

The first thing we need to do is calculate the date in three months time (as we will be using this to compare to the review date).  We will need to save the calculated date into a variable.  Create a variable in your workflow of type Date and Time and name as appropriate.  In the example below I have named my variable vDate3MonthsAhead.

Add the "Calculate date" action to the design node on the workflow designer.  Double click to configure as follows:

CalculateDate.PNG

Now we have the date in three months time, we can query our procedures document library for all documents where the review date = our calculated date above.

The results returned from the query list action will need to be stored in a collection type variable, ensure you have one created.  In the example below I have named my collection variable vCollFilteredRecords.

QueryList.PNG

So I now have a collection of item IDs for the procedures that are due for review in three months time (note this collection could be empty).

For each policy returned, I want to email the document owner and inform them that the review date is approaching.  To do this I need to query the item to get some details about the document.

Drag a "For each" action to the canvas and double click to configure. The target collection is the output from the query list (so vCollFilteredRecords in my case) and the Store result in requires a variable to store the item in the collection's ID.  I have created another variable of type List Item ID called vListIDProcedureID:

ForEach.PNG

Inside the For each container I am going to query the list of the current item in the collection to get the properties I require, and store in relevant variables which will need to be created:

QueryList2.PNG

 

Finally, I will email the document owner for each item to inform them that the review is due in three months:

SendNotification.PNG

 

The completed workflow looks like this:

WF1.PNG

WF2.PNG

Publish the workflow.

Now, the clever bit.  This workflow needs to be scheduled to run daily, forever.

Settings > Nintex Workflow 2013 > Schedule Site Workflows > Add Schedule

Complete the schedule as follows:

Schedule.PNG

Cassy - nice article!  I am doing pretty much the same thing using a site workflow.  I am referencing a library column named "Expired Date" and will send an email 30 days and 10 days before the due date - sent to the "Assigned To" person.  My logic pretty much aligns with yours. Thanks for providing your solution.


Nice and simple solution, good post.


I assume this is not going to work in O365 because there is no option to schedule a workflow ?


Hi Jaap. Did you manage to get a solution for O365? I am looking at implementing exactly this but can't seem to with O365.


Good day,

My scenario is the following: 

I have a List with Reminder Date and a Due date. I need to send a Task assignment to the Task Owner on the Reminder date and the Task owner has to complete the Assigned task and attach the necessary documents and Update the Reminder date to the Next Year.

I have created the Initial form from a SharePoint List and created the Site workflow but...(this is where is need help please because this is all new to me.)

in my site workflow on the Task Form it does not see my List columns , am i doing this totally wrong? I have followed your document but still clueless. Any suggestions please.

I have a attached my current site workflow Site workflow pic


Indeed this wasn't possible in O365, I have used a bit different approach and it's working with a way of working of course. Yesterday I got confirmation that scheduled workflow is added to the Nintex O365 Workflow capabilities. Not sure what it means for my existing solution. You can also have a look for Document retention management in O365, https://technet.microsoft.com/en-us/library/dn790613.aspx never worked with this and not sure if this is practical (maybe overkill)


you have to pull the list item properties that you need in the second query list action?


‌ Amazing solution - thank you! Totally fixes my problem (and others) of not being able to get a Pause action to work properly. In your email notification you include the Document title from the variable you set up. Do you have any idea how to include a link to the item? I've tried building one out using, but I keep getting hung up because there's no way to get the list URL or the list name to tack onto a site URL.


Gah! I figured out a way to get a full usable URL shortly after posting this. You can use a RegX to trim the junk off the end of the Encoded URL. This will leave you with the URL to the list to which you can add DispForm.aspx?ID=<your item ID varable here>


Hello

I have downloaded your wf and I seem to get an error message:

what am i missing here?


I think it was a problem with the vListIDProcedureID being a variable > List ID instead of text.

When I chosen a different variable set a text, the workflow works now.

I am yet confused what the FOR EACH does ??
Is it supposed to check how many items are about to expire and then send individual email for each??

I had an impression that it would show a list of all potential expire items on one email instead of multiple emails.


yes this example sends an email for each item returned.  there are examples on the community of sending one email for all items where I believe they build html with the collection items.  I will have a search and update this thread.


https://community.nintex.com/community/build-your-own/blog/2017/04/27/send-grouped-notification-based-on-list-items


Cassy Freeman‌ your blog worked great, but it's only sending out one email alert for one library item! What am I doing wrong? I've detailed my steps here Any help would be appreciated! I'm going round in circles!


Hi Darren Floyd

Yes in this scenario the person to notify may be different for each item, so it sends a notification for each one.

the link you have added doesn't work for me...

I am sure there are examples on here where people have built html table with all items returned from the collection and then sent one email with the html table inside the email.

try these:

https://community.nintex.com/message/67243-re-how-do-you-send-one-email-for-multiple-list-items

https://community.nintex.com/community/build-your-own/blog/2017/04/27/send-grouped-notification-based-on-list-items

https://community.nintex.com/message/55012-re-send-multiple-notifications-in-one-email

https://community.nintex.com/message/18176

https://community.nintex.com/message/45636-re-site-workflow-that-groups-data


Hi Cassy

Thanks for the reply. Here's the link again: https://community.nintex.com/thread/18334-date-review-workflow-only-sending-one-alert.

Sorry I may not have been clear. I'm not trying to send multiple emails out for one item. What I need to happen is that the workflow loops through the library items and sends out emails for each item which has a Start Date seven day in the past, if that makes sense?


Hi Cassy,

Great work, this is exactly what I need since I do not want to include a timer job in my approval process workflow.

I do have one question: Once I´ve set this up, do I need to add something server side? Even if I create this site workflow and make it run every day, it doesn´t seem to do that on my site.

Best regards,


As long as you schedule it - it should be good to go.  feel free to post a new question outlining the issue and link to it here for me (and others) to take a look at.


Cassy,

Great workflow got me going in the correct direction and THANKS for that. I have an SharePoint 2010 ECM solution that contains multiple libraries with the same content type. Once documents hit a status they will have a review period. What im wondering is how to query multiple libraries with a site workflow every day and start a another re-approval workflow. I am struggling with how to query across multiple libraries and get the correct items to be acted on by the workflow. Any tips would be greatly appreciated. And thanks for being part of the community!


Hey!  glad it was of some help...

I have done this before where I have changed the query list into CAML and used List Title instead of ID.  then have a variable required on start form where I specify the list name for query.  that way I can schedule the same workflow many times but for the different lists I need to query.  does that make sense?


So as I understand it you are building multiple iterations of the same workflow each focusing on a separate library?


Maybe if I explain in a little more detail. Apologies if this is a long explanation

I have 9 individual factory sub sites, each of them 9 Individual libraries all with the same content type applied to them. My goal is the following

1) All items in these libraries are records and each has an approved date which is the date it was last approved +1 year.

2) I have a calculated column that grabs 90 days prior to approved date. (In effect an expiration date)

3) I need to be able to run a site workflow that queries all 9 individual libraries and find all items that are 90 days prior

4) I then need to change these items status and move those items to a separate library that will start the reapproval process on them.

This solution it around ISO9000 documentation so it has a lot of requirements around retention and access. I am trying to make this process as hands off for the users as possible

Currently based on your previous email I have configured a CAML query that looks like this (Please realize I haven’t setup all my variables and calculations yet)

</Value>

</Leq>

</Where>

</Query>

Any advice is greatly appreciated

Thanks.


I am getting this too...


Awesome post. Got it to work!  THANK YOU! 


yes exactly!

in your original site workflow you used query builder to select the library you wanted to look in.

What I am suggesting is changing your CAML query from this:

<Query>
  <Lists>
    <List ID="{6C4BEE8F-C61F-4127-A75C-6D5617F31F76}" />
  </Lists>

to this:

<Query>
  <Lists>
    <List Title="{WorkflowVariable:vTextListName}" />
  </Lists>


Reply