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

Notifications

Announcements

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,865 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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard