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

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,501 on at

    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.

  • noorfar Profile Picture
    52 on at

    @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

     

     

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 386

#2
Valantis Profile Picture

Valantis 342

#3
Haque Profile Picture

Haque 336

Last 30 days Overall leaderboard