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 / 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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard