web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send an email daily ba...
Power Automate
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.

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @AnnaJordan 

     

    Could you please post your format and add expression you are using under the IF condition?

     

    Thanks

  • AnnaJordan Profile Picture
    on at

    @abm  I have now added the requested expressions.

     

    Many thanks

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @AnnaJordan 

     

    Thanks for your quick reply. Which condition is getting passed every time? Your expressions looks good to me.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @AnnaJordan 

     

    Can you try replacing the Task Status from the first condition box to Task Status Value and select the operand as Equal To and try again? Ensure that there are no white spaces after the text on the right side box of the condition. 

     

    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

    @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'?

  • AnnaJordan Profile Picture
    on at

    @abm Thank you for the response.

     

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

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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

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

    failed run.JPG

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard