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

Flow to send a recurring email based on past due tasks

I have created a SharePoint list to track CI projects at the facility I work at. I have a column where project owners will enter their target dates for project completion. I would like to send a recurring email on a monthly basis to project owners whose projects are not completed and the date is passed their target date. I have created two calculated columns to help me do this. The first column is "Completed?". This acts as a boolean column that returns a 1 if the project is completed and a 0 if it is not. The second column is "on_time?" This column is also a boolean column that will return a 1 if the current date is not passed the target date, and a 0 if the current date is passed the target date. 

 

I have started my flow using a recurrence. The I used the SharePoint "Get Items" step and connected it to my SharePoint list.  

Jake_Bildstein_0-1644433045350.png

 

 

From there I left the output as the default "value" as it is my understanding that this returns an array of all the items in the sharepoint list. 

 

I then move into two conditions. The first checks to see if the project is completed (ie if "Completed?" = 0). If it is not, it moves to the second condition to determine if the project is on time (ie if "on_time?" =0). If it is not true, I then send an email to the project owner asking them to update their project etc.

 

Jake_Bildstein_1-1644433286688.png

 

 

My issue comes from the first condition, which always returns false, meaning that all the projects are complete, except that is not true. There are several projects that are not complete and therefor return a "0" in the column:

 

Jake_Bildstein_2-1644433763318.png

 

 

I am wondering if using "get items" is not the way to obtain the data I need. Any help is appreciated! 

 

Thanks, Flow Problem 1.PNGFlow Problem 2.PNGFlow Problem 3.PNGFlow Problem 4.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Jake_Bildstein 

Please try to put double quotes around 0 like below and try again.

vLilyWmsft_2-1644560603722.png

You can add a Compose action to look the output of ‘Completed’, you will find that the output result is a string.

vLilyWmsft_3-1644561225731.png

Best Regards,

Community Support Team _ Lily
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
mattias1172
Responsive Resident
Responsive Resident

My best guess is that the issue lies within the boolean values being returned from SharePoint for Completed and On Time. The logic itself works when Power Automate is expecting and getting integers. 

 

flow1.png

 

You may need to either convert the SharePoint values to integers or try using an expression to check for boolean values. 

Jake_Bildstein
Frequent Visitor

Thank you for the reply, both the columns for "Completed?" and for "On_Time?" are returning integers already:

 

Jake_Bildstein_0-1644487441640.png

 

 

Looking at the past runs, the input into the first condition is showing as "false"

Jake_Bildstein_1-1644487681403.png

 

 

Which confuses me, because the input should be the information stored in the "value" array, not a true or false statement

Hi @Jake_Bildstein 

Please try to put double quotes around 0 like below and try again.

vLilyWmsft_2-1644560603722.png

You can add a Compose action to look the output of ‘Completed’, you will find that the output result is a string.

vLilyWmsft_3-1644561225731.png

Best Regards,

Community Support Team _ Lily
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jake_Bildstein
Frequent Visitor

Placing quotes around the 0 worked. I guess even though sharepoint was returning an integer, the flow still had the value as a string.

 

Thanks!

-Jake 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,144)