Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Help with Approval Flow with Variable Number of Approvers

(0) ShareShare
ReportReport
Posted on by 29

I have built a Flow for a customer but am running in to a couple of issues.  I'm sure it's because I'm a newbey.  It is a multi-step approval Flow with a variable number of approvers.  I thought I'd be cleaver and use an array and a Do Until Loop.  It appears to generate the right number of approvers only some of the time.  The Do Until Loop has instance data for all approvers some of the time but a lot of the time it only has one Loop instance visible in the Run History GUI.  I must be doing something wrong but I can't see any Loop instance data from the csv download even when there is only 1 loop instance which makes it difficult to debug.

 

My questions are:

  1. How do you recommend debugging actions inside of a loop?
  2. How do you recommend debugging Flows if they are outside of the csv download window (max 100) and what would you recommend a business user do to audit/debug their SharePoint related Flows?  Their doesn't appear to be a link from SharePoint to the Flow Run History.

Please help me out if you can even if it is that Flow can't do this so I can let the customer know one way or the other.

 

2018-08-01_7-22-51.png

 

  • haniel Profile Picture
    91 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    @sergeluca,

     

    In your example, you are showing two approvers for the Start an Approval action.  I did some testing and found that once I exceed 3 approvers, I get the following error:

     

    InternalServerError. The request failed. Error code: '500'. Error Message: 'BadGateway'.

     

    In my scenario, I have a variable number, some being more than three.  Have you seen this scenario?

     

    Regards,

    -Haniel

  • ehalsey Profile Picture
    29 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    @GabrielStJohn I have reviewed and still interested to hear from others.  I appreciate @sergeluca response but it is not a great option.

  • GabrielStJohn Profile Picture
    on at
    Re: Help with Approval Flow with Variable Number of Approvers

    Hello, @ehalsey!

    Have you had an opportunity to apply @sergeluca‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!


    Thank you for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

  • sergeluca Profile Picture
    500 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    No it should not be a gas factory; a single list should be enough... 🙂

     

    Kind regards

     

    Serge Luca aka "Doctor Flow"

  • ehalsey Profile Picture
    29 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    Thanks @sergeluca.  Hoping we don't have to build MS Flow infrastructure related lists, etc. but something I could suggest to the client. 

  • sergeluca Profile Picture
    500 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    ok here is what I do : I always, always, always 🙂 have a log list in SharePoint where I store my loops values

  • ehalsey Profile Picture
    29 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    @sergeluca I'm hoping someone can help with the following questions.

     

    1. How do you recommend debugging actions inside of a loop?  The download CSV option doesn't appear to contain the loop instance data i.e. the values of the set variable actions like it does for actions outside of a loop.
    2. How do you recommend debugging Flows if they are outside of the csv download window (max 100) and what would you recommend a business user do to audit/debug their SharePoint related Flows?  Their doesn't appear to be a link from SharePoint to the Flow Run History and asking a typical user to go the Run History (not sure if they'll even have access) to try and view the status of a workflow with only a date/time as a reference would be bananas.

    I'm OK if the answers are "not possible today".  I just need to get an answer back to the client so we can look at other options.

     

    Thanks again for your replies.

  • ehalsey Profile Picture
    29 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    Thanks for the reply.  Yes I was aware but we have to use this approach.  I don't recall the reason off hand but the other approach didn't satisfy the requirements. 

  • sergeluca Profile Picture
    500 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    yes,

     

    I'm not sure I fully understand your flow, but did you know that you can store a list of users in the Start an approval action without having to create a loop ?  just specify the setting "everyone from the assigned list" because the approval has an internal loop. If someone rejects, the approval will return reject automatically...and will stop.

    Does that help you to keep it simple ?

     

     

    Serge Luca

     approvers.PNG

     

  • ehalsey Profile Picture
    29 on at
    Re: Help with Approval Flow with Variable Number of Approvers

    @sergeluca is this better? Original Screen Capture or this one Google Drive copy

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >