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 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,484 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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard