Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Send an email daily based on conditions around SharePoint list

(0) ShareShare
ReportReport
Posted on by

Hi, I hope someone can help me with this.

I have a SharePoint list that the Flow is pulling from, one column is a 'Task status' that has three choices to choose from:

  • Not started
  • In Progress
  • Completed

There is also a 'Due date' column.

I am trying to create a flow that will look across all list items taking a look specifically at the 'Due date' and determine that if this is in 21 days time it has met a condition and if the 'Task status' choice 'does not contain' 'Completed' then an email will be sent.

 

I can get it to send an email without the time being looked at, and i can do the reverse of that however what i am struggling with is applying 2 conditions as the time one seems to be ignored every time and although the email is being sent Flow is telling me it has failed.

 

Expressions are:

formatDateTime(items('Apply_to_each')?['dateDueTime'],'yyyy-MM-dd')
addDays(utcNow(),21,'yyyy-MM-dd')

choices.JPG

Any help will be gratefully received.

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Send an email daily based on conditions around SharePoint list

    Hi @AnnaJordan 

     

    Glad to hear that you have resolved it. I was giving you another option that if you want to eliminate where due dates are not ready but looks like you are expecting all the values  before flow gets processed. Thanks for the update.

     

  • Verified answer
    AnnaJordan Profile Picture
    on at
    Re: Send an email daily based on conditions around SharePoint list

    @abm i tried this and all results are false which i would expect as all the fields are filled in.

     

    However from the information both @abm  and @yashag2255  gave me i managed to solve it by looking closer at the expressions and ensuring the SP list was complete.

    All Taskl.Status are now filled in and the formatdate...expression has been amended to show ['Due Date' to reflect the name on the list.

     

    Thank you both.

  • abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Send an email daily based on conditions around SharePoint list

    Hi @AnnaJordan 

     

    If you don't have Due Date value at this stage then you could check null.

     

    See below I have a list called ajlist and a column called 'StartDate type as DateTime.

     

    image.png

     

    Here is my list

     

    image.png

     

    Here is my flow checking Start Date is null?

     

    image.png

     

    Here is my run result

     

    image.png

     

     
  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on at
    Re: Send an email daily based on conditions around SharePoint list

    Hi @AnnaJordan 

     

    Yes. This shows that in the SP list, some items do not have any value in the Due Time column. Can you check and update your data so that every item has that column filled and run the flow again? 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • AnnaJordan Profile Picture
    on at
    Re: Send an email daily based on conditions around SharePoint list

    @yashag2255 is this what you mean?  failed run.JPG

  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on at
    Re: Send an email daily based on conditions around SharePoint list

    Hi @AnnaJordan 

     

    Can you share a screenshot of the action on which the flow has failed? This screenshot shows that the condition was not satisfied. You might want to click on the 'Next Failed' in the apply to each loop to navigate to the iteration that has a failed action. 

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • AnnaJordan Profile Picture
    on at
    Re: Send an email daily based on conditions around SharePoint list

    @yashag2255 I changed the operand to 'equal to' and the run failed as below:

    failed run.JPG

  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on at
    Re: Send an email daily based on conditions around SharePoint list

    Hi @AnnaJordan 

     

    The task.status.value is just a string. So it will always be a single value of the three. In this case you just want to check if it was completed or not and therefore you can change the operand that way. Can you make a try by changing the operand and see if you continue to face the same issue? 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • AnnaJordan Profile Picture
    on at
    Re: Send an email daily based on conditions around SharePoint list

    @abm Thank you for the response.

     

    When both conditions are present the formatdate... expression is being passed...

  • AnnaJordan Profile Picture
    on at
    Re: Send an email daily based on conditions around SharePoint list

    @yashag2255 - thank you for you response.

     

    The first condition box is 'Task.Status.value.  If i change the operand to 'equal to' wouldn't I need to add another condition to account for both 'Not started' & 'In Progress'?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >