Schedule workflow every 15th of the month querying SP custom list


Badge +3

Hello,

I have a SP Custom List with events matrix. I have a Start Date, End Date. I would like to gather all the events from the list that has a start date between 15th of the current month to 15th of the next month and send email notification with details of all those events.

I would like to schedule this workflow to run on every 15th of the month.

Email should contain details of events like description, start date, event title, manager name, department fields from the list and also attach the details in excel sheet.

Please advise.

Thank you!


6 replies

Badge +6

Hi Maulee,

I would propose you to create a scheduled site workflow.

You will just have to schedule this workflow to run every month.

You can find scheduled workflow in the Settings menu on the top bar of your Sharepoint, in the Nintex menu.

This is applicable to OnPremise only for the moment. If you are on 365 let me know

Cheers

Alex

Badge +3

Thank you Alex.

Badge +3

Alex, I would schedule a monthly site workflow that will run every 15th of the month.. what should I do on my custom list to gather required list items in collection? I am not really sure how to use collection variable and extract the details ?

Badge +3

HI Alex,

First I need to gather all items ids between 15th of current month and 15th of next month. store them and get all field values of each ID and send them all of them together in email. how do I do that?

Badge +6

Hey Maulee

you just have to retrieve your items using a Query list action it will retrieve it in a collection object

Badge +16

The first thing you will need to do before you can schedule a workflow, is to build it.  You will need in this instance a site workflow (available from settings option on site as opposed to being on a list or library ribbon).

Inside the site workflow you will need to

  • calculate date action = current date + 1 month into a variable called endDate or similar
  • query your list for items where the start date >= current date and start date <= endDate
  • store the ID of those items into a collection variable
  • add a for each action and choose the collection above to loop through and create a new variable for the ID of the item in the loop
  • inside the for each, query the list again where the item ID = the ID variable above and choose all the data you need
  • still inside the for each, send the email as required with the information you've just collected in the line above
  • publish the workflow
  • schedule the site workflow to run on the 15th of every month

Let me know if you need more help with screenshots.  I have most of it ready for you if required.

Reply