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 / Building Flow by follo...
Power Automate
Unanswered

Building Flow by following Convert CSV example from MS site and it fails on Step 10 Run Script with 'excelonlinebusiness' operation 'GetSingleScript' failed with status code 'BadRequest' "Unable to parse script reference."

(0) ShareShare
ReportReport
Posted on by

Hi Team,

Happy New Year!

I would appreciate some help...

 

I am following this example to build a Flow:

https://learn.microsoft.com/en-us/office/dev/scripts/resources/samples/convert-csv

 

when I reach step 10, Run Script, and fill in as suggested, I get the following error:

 

Failed to retrieve dynamic inputs. Error details: 'The dynamic operation request to API 'excelonlinebusiness' operation 'GetSingleScript' failed with status code 'BadRequest'. This may indicate invalid input parameters. Error response: { "status": 400, "message": "Unable to parse script reference.\r\nclientRequestId: 85dc86b9-0111-4a6f-a55b-cc0dc3aa8ab6", "error": { "message": "Unable to parse script reference." }, "source": "excelonline-ne.azconn-ne-002.p.azurewebsites.net" }'

 

selt_0-1703895728370.png

 

That error looks to me that it cannot access the script or it is not in the expected location...

 

However, I did create and save Office Script as suggested and it is visible in my OneDrive and shared within the Template.xlsx workbook as well:

selt_2-1703896082499.png

 

selt_3-1703896654992.png

 

Content:

 

selt_1-1703895934828.png

 

TIA!

Selt

Categories:
I have the same question (0)
  • Verified answer
    rameshmukka Profile Picture
    1,115 on at

    @selt 

    Please remove main function within main function. Only one main function should be present.

     

    Thanks,

    Ramesh

  • selt Profile Picture
    on at

    Thanks @RameshMukka , one more push would be appreciated though with the following error. I copied and pasted those MS example CSV and XLXS files into the folder, not sure why it is complaining. It created those files without extensions in the process and then failed.

     

    "The file format is not recognized. Please check that the selected workbook is valid.\r\nclientRequestId: 7fe0ab69-b52b-4a3d-ad2f-95286716a592",

     

    selt_0-1704149922646.png

     

  • selt Profile Picture
    on at

    sorry @RameshMukka  my bad i forgot to put .xlsx when i was re-creating the flow.

     

    Now, i got the following result:

    { "message": "We were unable to run the script. Please try again.\nCompilation error: module.ts(1,2): error TS1109: Expression expected.\r\nmodule.ts(1,12): error TS1005: ';' expected.\r\nmodule.ts(1,21): error TS1005: ';' expected.\r\nmodule.ts(1,25): error TS1005: ';' expected.\r\nmodule.ts(1,30): error TS1005: ';' expected.\r\nmodule.ts(1,35): error TS1005: ';' expected.\r\nmodule.ts(1,37): error TS1005: ';' expected.\r\nmodule.ts(1,43): error TS1005: ';' expected.\r\nmodule.ts(1,47): error TS1005: ';' expected.\r\nmodule.ts(1,51): error TS1005: ';' expected.\r\nmodule.ts(1,54): error TS1005: ';' expected.\r\nmodule.ts(1,57): error TS1005: ';' expected.\r\nmodule.ts(1,61): error TS1005: ';' expected.\r\nmodule.ts(2,2): error TS1003: Identifier expected.\r\nmodule.ts(2,4): error TS1161: Unterminated regular expression literal.\r\n\r\nclientRequestId: 77faf951-e8c6-40b5-b69d-50d327c5d2d9", "logs": [] }

    selt_1-1704150699926.pngselt_2-1704150737961.png

     

  • selt Profile Picture
    on at

    cancel that, found it after testing with giving csv example directly under main function. the comment was not properly commented out so it was trying to process it. Thanks for your help @RameshMukka 

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