Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Unanswered

data type error

(0) ShareShare
ReportReport
Posted on by 52

Hello..

I'm facing this error:

error: The 'inputs.parameters' of workflow operation 'Run_script' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'ScriptParameters/grand_total' is required to be of type 'Number'. The source type/format 'Array' of the value '[{"grand_total":"\"293\""}]' is not convertible to type/format 'Number'.

 

this is my flow:

noorfar_0-1663691145815.jpeg

 

these are the details:

noorfar_1-1663691145404.jpeg

 

noorfar_2-1663691145419.jpeg

 

noorfar_3-1663691145413.jpeg

 

 

I'm trying to run this script just to test the flow:

excel script is :
//Main sheet
function main(workbook: ExcelScript.Workbook,
grand_total: number
) {
let selectedSheet = workbook.getActiveWorksheet();
// Set range D6 on selectedSheet
selectedSheet.getRange("D6").setValue(grand_total);

 

the whole thing is to fill a set of cells arranged the same as the image below:

 

1.png

  • noorfar Profile Picture
    52 on at
    Re: data type error

    @Sundeep_Malik the outputs('Select')[0] option didn't work and give this error:

    The template language expression 'outputs('Select')[0]' cannot be evaluated because property '0' cannot be selected. Object properties can only be selected by names.

     

    adding apply to each action gave the following error:

    Input parameter 'ScriptParameters/grand_total' is required to be of type 'Number'. The source type/format 'Object' of the value '{"grand_total":293}' is not convertible to type/format 'Number'.

    noorfar_0-1663702983412.png

     

    finally, adding variable and pass it to the apply each worked but couldn't see the output on excel and the output code for some reason can't be shown

     

    noorfar_1-1663703280159.png

     

     

    noorfar_2-1663703294165.png

     

    noorfar_3-1663703383114.png

     

     

     

  • Sundeep_Malik Profile Picture
    6,482 on at
    Re: data type error

    Hey @noorfar 

    As you are using the select action, its making grand total an array. But it only accepts integer/Number.

     

    So, you can use an apply to each and add the outputs of select in it and pass the value one by one in the grand total.

    Or either save the output of select in an array and the use apply for each loop and one by one add the grand total.

     

    Or if grand total contains only one value, you can directly write in grand total in expression:

    outputs('Select')[0]

     

    I hope this helps.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics