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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard