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 / Excel Connector - Run ...
Power Automate
Unanswered

Excel Connector - Run Script Operation / using custom value for Script

(0) ShareShare
ReportReport
Posted on by 4

I am trying to use the run-script operation from the Excel-Online (Business) connector with a dynamic script reference.

 

guenthi_1-1648793507873.png

 

I have tried to use the One-Drive for Business connector with the Get file metadata using Path and use the Id of the script-file and pass it as script value and unfortunately it did not work  

guenthi_3-1648794027707.png

message""Script identifier format was invalid.\r\nclientRequestId: ...",

 

I highly appreciate feedback and support 

best regards, guenther

Categories:
I have the same question (0)
  • Cyris Lai Profile Picture
    15 on at

    Hi!

     

    May I know how you can get the 'Document Library' ID? from Peek Code it is different from the GUID of the Document Library in SharePoint.

  • Yutao Huang Profile Picture
    Microsoft Employee on at

    The id returned from the "Get file metadata using path" action is in this format "b!ZwIX*******.01FSU****" but we only need the part after ".". You can use the split() expression to extract the second part and prefix it with "ms-officescript%3A%2F%2Fonedrive_business_itemlink%2F". The final script id should look something like this: "ms-officescript%3A%2F%2Fonedrive_business_itemlink%2F01FSU****".

     

    For @Cyris_Lai 's question regarding the document library, I myself used the technique described in this post: https://powerusers.microsoft.com/t5/Building-Flows/Get-drive-id-for-Doc-Library-selection/td-p/85653....

     

    Basically, I used the "Send an HTTP request to SharePoint" action (within the SharePoint connector):

    Yutao_0-1650048861495.png

     

    This returns a JSON string with an array of { "id": "...", "name": "..." }, representing all the document libraries on that SharePoint site. I then used a few different Data Operation actions (Parse JSON, Filter array, Compose) to parse this JSON string, filter it based on the name of the document library I needed, and extract the id field. This id field is what you need to provide for the "Document Library" field on the "Run script" action.

     

    But I'm wondering if there could be other better solutions. @guenthi do you mind sharing how you managed to get the dynamic reference to the document library?

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 604

#2
Valantis Profile Picture

Valantis 502

#3
Vish WR Profile Picture

Vish WR 417

Last 30 days Overall leaderboard