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 / List rows present in a...
Power Automate
Answered

List rows present in a table (Excel): Dynamic Document Library

(0) ShareShare
ReportReport
Posted on by 148

I'm trying to make a reusable flow that will load data in a given Excel doc into a given SharePoint list based on user inputs (e.g. SharePoint site name, doc library name, etc.). The place that I've come to a grinding halt is working out the Document Library in the List rows present in a table action. Obviously I could manually pick a document library from the drop down, but I want the user to pass this value in as an input so that the flow can be used across SharePoint sites/libraries.

 

I manually added a document library to the field and peeked at the code to see what value is being passed. I've scoured the SharePoint APIs looking for that ID but I cannot find it anywhere.

 

image.png

 

Is there a way to do this? Or is what I'm trying to do impossible?

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @AaronRichardson 

     

    Which Power Action step is this? I am looking List Rows present in a table (Excel) connector source which is different than yours? Could you post a screenshot of your design view?

     

    Thanks

  • AaronRichardson Profile Picture
    148 on at

    It's the List rows present in a table (Excel Online Business). Here is the design:image.png

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @AaronRichardson,

     

    Unfortunately, Get rows from dynamic Excel file name and table name is impossible, currently Excel connector hasn't supported this Feature, sorry.

    This is the similar idea in the IDEA forum, you could head to vote it to make it come true in the future:

    https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Dynamic-content-in-File-amp-Table-inputs-Excel-Business/idi-p/107821

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    AaronRichardson Profile Picture
    148 on at

    Thanks for the reply. It turns out that this is definitely possible to do...but it's not simple. Here are the steps I took to make the Document Library input dynamic:

     

    First, I used the SharePoint Graph api to get the list of document libraries on my site:

    image.png

    Next I used the Parse JSON action to transform the JSON payload into an array:

    image.png

    Next, I filtered the array down to the element that contains the doc library the user passed in as an input:

    image.png

    where From = body('Transform_Drives_List_JSON_to_Array')?['value'] and the left part of the condition = item()['name']

     

    Next I set a variable with the Id of the document library:

    image.png

    where Value = body('Filter_Drives_Array_on_Document_Library')[0]['Id']

     

    And finally, I used this document library Id in the Document Library Input in the list rows present in a table action:

    image.png

     

    And with that my flow ran successfully. A lot of steps, but worth it to make the Document Library input dynamic.

     

    P.S. I had to use _api/v2.0/drives because I have multiple document libraries on my site. If I'd only had one library (the default Documents) I could have used _api/v2.0/drive and thus skipped the filter array step to be a hair more efficient. 

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @AaronRichardson,

     

    Thank you for providing this solution, it is complicated but it is worth doing if there is a branch of Excel file need to process. Thanks again for your contribution to community.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard