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 / Combining Excel Worksh...
Power Automate
Suggested Answer

Combining Excel Worksheets - Error in Power Automate

(0) ShareShare
ReportReport
Posted on by
To give fair warning - I am useless with this kind of stuff, but I enjoy stumbling my way through.
 
Essentially I have a block of reports that get exported out of a system every day and what I want is to automate the process of adding the worksheets from this export to a workbook containing the calculations to give me a usable result.
 
I have attempted to use the guide: https://learn.microsoft.com/en-us/office/dev/scripts/resources/samples/combine-worksheets-into-single-workbook however, when I put the second script into Power Automate I am getting this error:
 
Flow
save failed with code 'OpenApiOperationParameterValidationFailed' and
message 'Input parameter 'ScriptParameters' validation failed in
workflow operation 'Run_script_1': The parameter with value
'"@outputs('Run_script')?['body/result']"' in path
'ScriptParameters/worksheetInformation/0' with type/format 'Array' is
not convertible to type/format 'Object'.'.
 
---
 
I presume I am missing something stupid, so if anyone could push me in the right direction it would be appreciated.
 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    rzaneti Profile Picture
    4,483 Super User 2026 Season 1 on at
    Hi @bindycroak,
     
    According to the error message, you are passing an array (the result from Run script) as input to Run script 1, when an object is expected. To fix it, you need to ensure that your second script is expecting an array as ScriptParameters. For example, in the provided documentation, the script is expecting a parameter called worksheetInformation, which has a type of array of   (those square brackets tell you that it is an array): 
     
    To make sure that your script is correctly configured, it must look like this in Power Automate, and then you can simply click on that little "T" on the top-right corner (in yellow) to pass your output from the first script (an array) as parameter:
     
     
     
    If the instructions are not clear enough or if you need any additional help with this issue, let me know and feel free to share some screens of your current flow/scripts design. 
     
    I'm also sharing this blog post that I wrote a few months ago about how to work with data types in Office Scripts, which can be useful for you or any other users that find this thread in the future: http://digitalmill.net/2024/09/17/understanding-the-data-types-in-office-scripts/ . There are some other articles about Office Scripts at this same website. 
     
     
    Let me know if it works for you or if you need any additional help!

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Accepted Answer.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/
    https://www.linkedin.com/in/raphael-haus-zaneti/
     
     

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard