Hey Celso BR friend!
I was experiencing something similiar earlier today and bumped to this old thread.
This first video helped me a lot: How to return objects from plugins (SSA, CSA, Element Update & Element Workflow Actions)
I’ll try to summarize the steps, but they are a bit confuse and I won’t spend much time on it since I don’t know if you are still in this project.
Plugin:
- Define the data type that you want to return. To achieve this, create a dummy API call and define the response manually with the datatype that I want to return from my function.
- Use this data type at the plugin Action: Create an Action. You will need to receive this data type from your App (“New Field” > “Editor = App Type”).
- Your Action will return in this data type: (“Returned values” > “New key” > “Key Type = as [key_created_step_2]”)
- The action code will return the format of the object defined at step 1.
At your App:
- Your app will receive from plugin the data type defined at step 1.
- You will pass this data type to your plugin workflow (Action).
- Your plugin will return this data type.
Let me know if you need any help, I would be more than happy to help you for free (it is always good to expand the network, hahaha).
Best Regards,