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:
My input parameters are no longer prompted (and I get the error below)
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", .... };
}