cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
farinadeng
Level: Powered On

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 Team
Community Support Team

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

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

Super User
Super User

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

@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
Super User
Super User

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

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
Super User
Super User

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

@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
Super User
Super User

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

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!
farinadeng
Level: Powered On

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

Hi Alice,

 

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

farinadeng
Level: Powered On

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

Hi Mark,

 

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

farinadeng
Level: Powered On

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

Thanks Mark. What would the flow look like?

Super User
Super User

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

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. 

farinadeng
Level: Powered On

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

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

 

 GetItems.PNG

 BadGateway.PNG

Super User
Super User

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

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

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

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
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,279)