cancel
Showing results for 
Search instead for 
Did you mean: 

trigger a flow based on date and time

How about adding the ability to trigger based on date and time?

 

The basic scenario would be manually entered date/time  or recurring date/time, such as “every Monday morning do this...”

 

It would be really useful though, if triggers could be based on data in various apps and services. Here are some examples:

1. A property on a SharePoint/OneDrive document library or list. It could be “100 days after file created” or “when this date/time in a custom column occurs”. We have a use case, where contracts are stored in a doclib with custom columns for expiration. It would be very useful to be able to trigger a workflow on or before those dates occur.

 

2. Outlook reminders, on/before/after meetings occur or on/before/after tasks are due

 

3. Planner, ToDo and classroom assignments are all services that have due dates, which could benefit from reminders before or on the date, but also after to follow up or be reminded of overdue tasks.

 

Those were just some examples, but basically anywhere dates and times are to be found, either as existing fields or custom, would be applicable.

Status: Completed

This feature is available with the Recurrence trigger: https://flow.microsoft.com/en-us/blog/download-history-recurrence/

Comments
Anonymous
Not applicable

Is the Recurrence trigger the solution for this?  I'm using it to run a flow weekly, check a date column for each item in a list and send an email notification.

 

See https://docs.microsoft.com/en-us/flow/run-scheduled-tasks for more info on running flows on a schedule.

Power Automate
Status changed to: Completed

This feature is available with the Recurrence trigger: https://flow.microsoft.com/en-us/blog/download-history-recurrence/

Regular Visitor

OK, thank you for the reply.

 

So if I had a list of contracts with a specific column for expiration dates and I wanted to have a mail 100 days before that expiration date for each row, would this feature allow me to set something like that up?

 

I don't think you can and if I am right, this feature is not done.

 

At this link:

https://docs.microsoft.com/en-us/flow/run-scheduled-tasks

 

I don't see any way to select an existing date-column and trigger anything based on that column.

Anonymous
Not applicable

I have pretty much the exact same thing setup.  Step 1 is the Recurrence, I have it running every 7 days.

Step 2 is a "Get items", pointed at the list.

Step 3 is an "Apply to each"

Step 3a (within step 3) is a condition checking if the date column is less than or equal to an add days formula.  You can search for various examples, I'm using "adddays(utcnow(),60)" for a 60 days notice.

Step 3a.yes, then "Send an email".

Step 3a.no, then do nothing.

 

I have a few extra things added to the yes and no... such as setting and resetting a field indicating when the reminder was sent.

Regular Visitor
Thank you! I will try that. But still, maybe it could be made more up front in the UI, perhaps?
Frequent Visitor

Crenstrom,

 

I need help setting up step 3a.  I am a novice and this logic function to trigger is confusing.   I am trying to trigger an email to a specific person 30 days before a date in their row has been met.


New Member

There's a lot of ways to accomplish the same thing.  The way I would do is a flow triggered to run at your desired frequency, a "Get Items" connector to your source, a "For each" control to iterate through each row from your source, then within it a "Condition" control to identify/filter which of your source items need to have the email sent.

 

Within that condition control you have a couple options, which you've probably found searching around the various microsoft and reddit forums... What works with my thought pattern is in the Condition control: "Date field" "is less than or equal to" "adddays(utcnow(), 30)".  Only the last one is an expression.  You could use the "is equal to", but then you'd have to get into the formatting so it's not looking at hours, minutes, etc.

 

Hopefully that gives you some ideas.