cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anonymous21
Super User
Super User

Approval Workflow and reminder emails won't stop running

Hi, I have created an approval workflow and reminder emails if the approvers do not respond to the approval. When I test the approval and trigger the reminder emails, the workflow will stop and the flow runs successfully. The problem is when the approval is sent to the approver and the request is approved, the flow will not stop running and end. How to fix this?

 

This is my flow

anonymous21_0-1657028993977.png

anonymous21_1-1657029018219.png

anonymous21_2-1657029090212.png

 

Thank you.

 

26 REPLIES 26
Hardesh15
Super User
Super User

@anonymous21  You are using delay of 1 min. Too short delay for reminders.how many emails do you get before and after approval?

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

@Hardesh15 I'm testing to see if it's working, that's why I put it 1 minute. Under normal circumstances, it's 1 day. When the delay is 1 day, the flow won't stop running.

@anonymous21  Pls expand do until loop advance section and share.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

@Hardesh15 

anonymous21_0-1657030346254.png

1 email is sent when the item is created, another email will be sent if there's no response and another one will be sent if there's still no response. That's what I'm trying to do.

@anonymous21  Pls click on change limit in do until loop. What is your settings.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

@anonymous21 So your do until count is 60 for 30 days. With 1 min testing your do until loop will run for 1 hr if approver does not approve. is this working fine?

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

 

@Hardesh15 can you tell me what's change limit? I put it as 30 days to make sure the flow will run for 30 days if there's no response. Is that right?

I have not tested like that. I only test to see after 1 minute whether the reminder email is sent to the approver or not.

 

@anonymous21  Count in do until means that how many times it will loop back for condition. Timeout is the maximum time for do until loop.  Suppose you put delay one day and then in count you put 30 and timeout P15D. In this case your loop will break after 15 counts though you have set count 30.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

@Hardesh15 where does 15 comes from if the count is 30?

@anonymous21  Time out is set for 15 days so for each day waiting, count will be 15 in 15 days. Though you have set count 30 but do until will break after 15 days.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

@Hardesh15 So the flow will run for 15 days even if the request has been approved? How to stop it if it’s done approving?

vivekpande18
Super User
Super User

Hi @anonymous21 ,

 

Your logic is totally correct. Not sure what issue you are facing. Since you have added a delay it will wait for the dealy time before ending the flow after approver taken the action.

 

Thanks

Vivek Pande

ChadVKealey
Memorable Member
Memorable Member

What you're missing is a check at the top of the "do until" loop to see if the "Approved" variable is true. You would think the Do until would check that value on its own, but it does not. 

@ChadVKealey 

isn't it this one?

anonymous21_0-1657067780867.png

 

Hi @vivekpande18,

so it will keep continuing running following the delay I input even though the approval is done?

 Is there a way for the flow to stop running once the approval is approved?

As I said, you might think it was, but it's not. Within the loop, you need to add a condition to evaluate the "Approved" variable; if true, then stop the flow, otherwise, send the reminder. See this video for the pattern I use for "approvals with reminders": https://youtu.be/lWxmC2oLvgg

Hi @anonymous21 ,

 

I followed your steps and it's working fine for me.

 

Thanks

Vivek Pande

@vivekpande18 oh, that's pretty weird then😅

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.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,572)