Output from Project Workflow

Hi there,

I wanted to create a complex workflow that I could pass some variables to it, and get its output (akin to a formula except it is really useful to have it as a complex workflow which can make REST calls etc..). It was initially a normal workflow, but as I needed to call it from multiple places I decided to convert it to a project workflow (global workflow).

I somewhat assumed that the last “Return value” in a Project Workflow would be output and accessible as a normal context.workflow['a1c75…1c4a'].result . This does not happen.

I call this Project workflow, passing some variables to it:

But then there are no outputs from it:

image

Are there no ways of having a Project Workflow output/return something?

The workaround is to create a global variable, make the project workflow update it with the desired return value, then access that value from another workflow - but that isn’t too ‘clean’.. so I am hoping that maybe the above could be feasible somehow instead.

Many thanks in advance.

It should be returning the value as you describe it. I’d probably try to debug it on your end.

1 Like

@aeynaud use an EXPLICIT return action as the last action in that workflow. It should return as you described, but just to be sure it is not from your end. Use a RETURN action as the last action in that workflow and return the data you want in that action step. Then run the workflow and see if the data comes

@Broberto and @AgentD , thanks for this! I had a DISABLED action as my last action in the workflow, which is why it returned undefined. Silly oversight - as per usual aha. Thanks