web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / notifications by appro...
Power Automate
Unanswered

notifications by approver for SharePoint docs Pending

(0) ShareShare
ReportReport
Posted on by 295

Hi,

I have a document library for Policies and other documents that need an approval process.

The approvers don't always approve or reject so the document can sit as Pending for a number of weeks.

I would like to create a flow that finds all documents that are pending, creates an array (or some kind of list) that can be used to then send an Approver an list of their documents that are pending.

A document can have mulitple approvers.

The array of approvers and documents might look like this:

Rosie_0-1695088433258.png

I have got this far but I am a bit stuck how to put the Apply to each together to generate an array I can then use in an For Each Approver create an email with a list of documents and their links.

 

Rosie_1-1695088568069.pngRosie_2-1695088597485.png

In set variable approver2 I am not getting a value I can use, but I might be going in the wrong direction at this point anyway.

Rosie_3-1695088726880.png

 

Thanks

Rosie

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,109 Moderator on at

    Hi @Rosie 

     

    Recently, I shared the solution for the similar user case, pls check out if works:

    Re: Seperate HTML Table for different AssignedTo P... - Power Platform Community (microsoft.com)

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • Michael E. Gernaey Profile Picture
    53,932 Moderator on at

    Hello,

     

    I noticed that you are looking at the files. How are you mapping the People(approvers) to this document? Is there a SharePoint list that has the following:

    • Approval details
      • document
      • status
      • People/Group column of approvers

    It will be easier to help you with a proper solution, once I understand the Mapping between Approval List, to Documents to Approvers.

     

    Once you have the array, how are you planning to then create the email outputs?

     

    If you have your list, my suggestion would be to:

    1. Get a Unique list of approver names. Either from your main approver list or if you dont have one, you can combine a Select and a union/union to create a unique list of approver names

     

    2. Do an Apply to Each on that

    3. Then do a Filter Action on the Main list, using the CurrentItem of the Apply to Each in #2

    4. Take the output of #3 and create another Array and place the Headers you want in it and then merge in the output from #3,

    OR you can simply add the headers to the bottom of the output of #3 and then do a Reverse on the Array and it will flip it. It all depends on how you want to Display it (by date, or approval id or whatever)

     

    5. Do a Create HTML Action and pass in the output of #4

    6. Create your email and send it

     

    Anndd done. its honestly not too confusing, just read it slowly and I'm happy to help if you need it, just want you to try first 🙂

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Rosie Profile Picture
    295 on at

    Hi Mike,

    The Approver field is a people field - so anyone in our organisation - although it is only a small number that do this.

    There is a library of documents, each document has an approver column, status column etc.

    The documents that are submitted for approval have a status of pending.

    I can get the list of documents using the 'Get file (properties only)'.

    It is just how to then generate a list that could be used to send emails to each approver that I am not sure how to go about as I get apply to each within an apply to each.

    I will re-read your process a few more times and see if I can follow it.

     

    Thanks

  • Rosie Profile Picture
    295 on at

    Hi,

    That looks interesting, I am not familiar with using xpath and unions.

    Will give it a go.

     

    Thanks
    Rosie

  • Rosie Profile Picture
    295 on at

    Hi Mike,

    I am not sure if I am on the right track here.

    I can get the list of documents, and I can get the Approvers of the document listed in an html table.

    A would now like to combine these into a single list so I can then generate an email per person with a list of their documents.

     

    I have read through your post, but I stumble at the first item: I don't know how to create the list of approvers.

    I think I can understand how to achieve the rest of it once I have the list of approvers - that would be easier than the list of documents I suppose.

     

    Thanks

    Rosie

  • Rosie Profile Picture
    295 on at

    Hi @ManishSolanki ,

    I have been able to replicate your solution.

    What I am getting is the following:

    For each person (Approver) all the documents that are Pending, are listed in the HTML table rather than just the documents they are the approver of.

    Do you know how this is happening?

    Rosie_0-1695157579580.png

     

    Thanks

    Rosie

  • Michael E. Gernaey Profile Picture
    53,932 Moderator on at

    Hello,

     

    The solution I provided details how to send specifically to a single approver.

     

    It seems the part you are missing is getting the unique list of approvers themselves.
    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Michael E. Gernaey Profile Picture
    53,932 Moderator on at

    Hi,

     

    That is what the answer does. You end up with a single list, and then the emails are only sending the single approvers list, not everyone.
    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Rosie Profile Picture
    295 on at

    Hi @FLMike ,

    I seem to be stuck trying to make a list of approvers.

    I can get the list but the Apply to each treats it like a string.

    Doesn't seem to matter what I do I can't make the list into individual values referenced by the apply to each.

    I can turn the values into an HTML table but that still doesn't work in the Apply to each loop.

    Rosie_0-1695592994093.png

     

    Thanks

    Rosie

     

     

     

  • Michael E. Gernaey Profile Picture
    53,932 Moderator on at

    No worries, lets get you passed that.

     

    My wife and I are about to watch a movie but ill be back later or early AM tomorrow. But we will move you forward.

    Can you share your whole flow, so I can review what you are doing to make sure we are on the same page and then I can help you get what you need.


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard