cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
UluruRob
Helper II
Helper II

Flow running successfully without stopping for 'Start and Wait for an Approval'

Can anyone help as to why my flow would be running all the way to the end saying successfully (but not successful) and seemingly bypassing 'Start and Wait for an Approval' action which becomes greyed out after flow has run?

 

This has me totally confused as I copied the same flow from another that behaves as expected and doesn't bypass 'Start and Wait for an Approval' action? 

 

UluruRob_0-1634535197815.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you. I see that your trigger is when a new entry is created using cognito forms. You should not wrap your approval under Attachment loop. Rather you should build attachment array variable using that foreach loop and then supply that array to approval action. All the actions that are inside attachment loop right now should be outside that loop. Refer following link that shows how to build attachment array...

https://docs.microsoft.com/en-us/microsoft-365/community/power-automate-send-sharepoint-files-as-att...

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

9 REPLIES 9
PrasadAthalye
Super User
Super User

What collection are you running apply to each on? Do you have collection that has data?

 

Also, You have added your approval action under apply to each. This means, for every record, this flow will run. As soon as it runs for the first record, it will wait for approver to take action.  Are you sure, you are expecting this behavior?

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@PrasadAthalye Thanks - I am not sure what you mean by 'What collection are you running apply to each on?' do you mean the Output? if yes it is a field from an external form to add an attachment to the approval notification and this is what forced the Approval action into an apply to each. I am confused by why the exact same flow works for another flow that's using the same form (with different name) as the trigger.

 

 

UluruRob_0-1634586566053.png

 

UluruRob_1-1634586589781.png

 

Can you check if your attachment output has data ? There are only 2 possibilities...

 

  • Either your attachment output is empty
  • OR it has more than 1 Row and an approval card is pending for approval. Please check Pending approval

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

OK so looks like the Attachment Output is empty- There isn't always going to be an attachment when a form is submitted, but when there is it needs to be included, how do we work around that please?

@PrasadAthalye I have also tried all day to add a condition before the approval action to determine if a file is attached or not, every time there is no file the flow just ignores everything, if there is a file it works. I am stumped.

When there will be an attachment, It will enter the loop. What is the requirement? Do you want to start approval irrespective of there is an attachment or not? If yes, then you can not run the flow on attachment collection.

 

Can you clarify requirement and upload entire picture of the flow?

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@PrasadAthalye Correct Approval should start irrespective of attachment or not - The whole workflow is to approve employees leave, so sometimes there will be attachments to support there request and other times not, this seems to me that this would be a part of a normal approval process.

 

I have attached the whole flow for your reference as requested - thanks for you assistance so far.

 

 

Approval Flow.jpg

Thank you. I see that your trigger is when a new entry is created using cognito forms. You should not wrap your approval under Attachment loop. Rather you should build attachment array variable using that foreach loop and then supply that array to approval action. All the actions that are inside attachment loop right now should be outside that loop. Refer following link that shows how to build attachment array...

https://docs.microsoft.com/en-us/microsoft-365/community/power-automate-send-sharepoint-files-as-att...

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

@PrasadAthalye Thankyou so much this has done the trick and the flow is working successfully irrespective of attachment, appreciate your persistence and patience.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,170)