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

Email for Rejected Item shows Approved

Hello:

I have a SharePoint list workflow where Send Email of approval based on condition and this is not working.  It works up to the point of Send Email V2.

 

I have successfully built workflows where this worked for me.  And the difference between this instance that doesn't work and the previous flow that does work, is that the approver comes from a look up column from a different list.  

 

By using a lookup table column, "Operating Group Email", it automatically "Apply to Each". This was different from previous approval/send email workflows I created.  And thus the fields used to "Update" were different from prior approval/send email workflows.  Prior approval/send email workflows allowed "Response" under update where this one did not so I used "Outcome".

 

If I changed the condition to Approval is equal to Reject, the Send Email with Reject status completed successfully.  But with Condition Approval is equal to Approve, it fails.

Workflow worked with Reject request.png

 

Here is my flow:

Item is created - send email.pngApply to Each - Stop and Wait for approval.png 

 Update Item.pngCondition- Approval equals Approve send Approval email- Approval equals Reject send Rejected email.png

 

 

4 REPLIES 4
tom_riha
Super User
Super User

Hello @team_user ,

try to add a 'Compose' action before the 'Condition' and store the 'Approval' dynamic content from the condition in there. That way you'll see in the flow run history what value the column has, and maybe give you a hint why the condition returns always false.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Hello - Thank you for assisting me.

 

I tested the Compose. 

Compose Configuration.png

The result was similar except that email is sending Approve whether I approve or reject item.  

 

I was not able to see anything that would show what the problem is.  When I click on "click to download" it pulls up a separate blank tab on my browser.

Add Compose.png

Result of run.png

 

But I did something different this time which may be an indication of something - in the send email, I added both Outcome field and Approval field to see what it would return and it returned blank - shouldn't it have returned the values for both of those?

 

Send Email.png

 

 

If it doesn't show any value then the 'Approval' dynamic content you use is empty. I'd check the source of it, it must come from the 'Update item' action. And if it doesn't help, I'd try to use the 'Outcome' dynamic content directly in the 'Condition'.

In the test you didn't use 'Outcome' from approval task but 'Outputs' from 'Compose'. And since 'Compose' is set to the 'Approval', it's empty too.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
team_user
Frequent Visitor

Hello again - Thank you for your assistance.  I could not get your second suggestion to work either.   I did additional research and found a solution.

After new item is added, Initialize Variable for the approvers from the lookup column.

Set the variable for the approvers column.

Updated the approval column value to pending, with options also including approved and rejected.

Start and Wait for approval.

Added Condition, with Outcome = Approval

With action being to update if approved or rejected

Added Condition for approval column = Approved

If Approved Send email with Response

If Rejected Send email with Response.

 

This worked perfectly the first time.  It looks like setting the variable and updating the approval column made this work.

 

After new item added initialize variable & set variableAfter new item added initialize variable & set variableUpdate approval column to pendingUpdate approval column to pendingStart and Wait for approvalStart and Wait for approvalAdd condition with Outcome = Approve, plus action if approved or rejectedAdd condition with Outcome = Approve, plus action if approved or rejectedAdd condition for approval column = approvedAdd condition for approval column = approved

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (1,712)