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 / Office Script with Inp...
Power Automate
Unanswered

Office Script with Input Parameters and Object Outup

(0) ShareShare
ReportReport
Posted on by 206

Hi,

I am using Office Scripts to return data to power automate, they work great if the return data type is string or number. When I try to return an object, (eg JSON), the script goes crazy and my input parameters are no longer recognized. If i stringify the JSON and return as string it works. Do you know if this is a known issue with Object responses? or am I doing something wrong

 

My script receives 2 JSON parameters, then process this data and returns something back to me in Power Automate.

 

This works:

function main(workbook: ExcelScript.Workbook, projectsJSON: ProjectsInterface[], tasksJSON: TasksInterface[]😞 string {
Power Automate prompts properly my parameters and runs with no issues, returns string perfectly

mgrachii_1-1635185005777.png

 

 
This makes my script parameters to desapear from Power Automate interface:
function main(workbook: ExcelScript.Workbook, projectsJSON: ProjectsInterface[], tasksJSON: TasksInterface[]): object {
mgrachii_2-1635185019450.png

My input parameters are no longer prompted (and I get the error below)

mgrachii_3-1635185077086.png

 

 

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

    Hi mgrachii,

    Try to NOT define the return type of your function and return whatever you should. It works for me.

    (workbook: ExcelScript.Workbook, projectsJSON: ProjectsInterface[], tasksJSON: TasksInterface[]) {
    ...
     return { "whatever" : "whatever", .... };
    }

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 589

#3
Haque Profile Picture

Haque 522

Last 30 days Overall leaderboard