cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

How do you create a Flow to send notifications when a task is due?

The logic seems straight forward - Due Date = Today, then send email reminder. But I can't seem to find the right steps to create it.

12 REPLIES 12
Community Support
Community Support

Hi @farinadeng,

 

Could you please share more details about where are the tasks created in?

 

I would offer you the workaround when the tasks are created in the outlook tasks, the screenshot of the flow as below:

Capture.PNG

 

The expression in the Condition as below:

@equals(formatDateTime(items('Apply_to_each')?['DueDateTime']?['DateTime'], 'yyyy/MM/dd'), formatDateTime(utcNow(), 'yyyy/MM/dd'))

 

The flow would run successfully as below:

Capture.PNG

 

 

Best regrads,

Alice

@farinadeng:

 

I agree with @v-yuazh-msft but would like to add that there is a limit of 5000 iterations for an Apply to Each loop unless you have one of the premium Flow plans.  It is conceivable that a user might have more than 5000 saved tasks.  I don'tt see a way to filter the items returned from List All Tasks.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Skilled Sharer
Skilled Sharer

I have implemented this is one of my Flows and what I do is run the Flow on a Schedule, daily basis.

To limit the number of items coming back to keep it within the 5000 item limit I send a OData filter expression on the Get Items action.

This filter would be:
DueDate eq “2018-08-29”

DueDate is the INTERNAL name of tour date field
“2018-08-29” is a UTC formatted date for today.

Hope this helps
Mark

@MarkStokes: I was unaware that list all tasks had a filter option.  Can you point to where I can find that?

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Skilled Sharer
Skilled Sharer

Oh hang on. I may have mis-interpreted the question. In my head I assumed a SharePoint List of tasks, but just realised that was never mentioned and the OP probably means Outlook Tasks.

My bad!

Hi Alice,

 

Thank you for your reply. The tasks are actually created in a SharePoint list, sorry I missed adding that part.

Hi Mark,

 

You are correct, it is a SharePoint list. Sorry I missed adding that part to the question!

Thanks Mark. What would the flow look like?

Sure.

 

First up is my simple Task List in SharePoint

TaskList.PNG 

 

Here is the full flow.

 

1-FullFlow.PNG

 

The Trigger is a Recurrance trigger to run at 3pm each day.

 

2-Trigger.PNG

 

First thing we need to do is get a string representation of the current day in a UTC format. Use a Compose action with the following expression.

 

 

utcNow('yyyy-MM-dd')

 

 

3-UTCToday.PNG

 

Then you perform your SharePoint Get Items action. In this case you can pass in a Filter Query as shown below. The Output is the value generated from your Compose action. My first reply had an error. It needs to be wraped in '' (single quotes) not "" (double quotes) otherwise it will fail.

 

4-GetItems.PNG

 

When we have ONLY the items with a due date of today then we can iterate over them and create a friendly HTML email to the Assigned To user and giving them a link directly to the SharePoint list item.

 

5-SendEmail.PNG

 

I hope this helps. 

Thanks for laying it out for me Mark! I keep getting a an error at the Get Items stage:

 

 GetItems.PNG

 BadGateway.PNG

Skilled Sharer
Skilled Sharer

This looks like a problem with the connection to SharePoint.

Is this a SharePoint Online or on-premises site?

Can you click the settings in the top right of the Get Items action and check to see if there are any errors with the connection?
Administrator
Administrator

Hey, @farinadeng!

 

Thank you for posting on the Flow Community Forum! It appears as though @v-yuazh-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

 

Thank you for being an active member of the Flow Community!

 

-Gabriel
Flow Community Manager

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager
Power Platform Communities

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (9,450)