Workflow Triggered Workflow block is returning empty object, but running succesfully?

I have a workflow that is triggered from another workflow and is running successfully , however the response from the triggered workflow is showing an empty data object after running.

How do you access the data from the completed workflow in the original workflow?

Is something missing?


Hi Trevor, you will need to add a response block in the child workflow for it to work.

Hi @ehe , I am running into the same problem as the OP. Can you elaborate on your suggestion please?

I looked at response blocks but they are documented as responses to webhooks? I didn't know if that was the same concept as you are referring to.

In any event, I tried adding the response, with the "body" just having the previousStep.data, but I still see an empty object as the result in the "parent" workflow.

Hi, @ghost-ap - not sure if OP solved the issue but I will try to explain the solution to his problem. To add to @ehe 's comment: it looks like TestWorkflow (the child workflow) isn’t returning any data because there’s no Response block. Without it, workflow1 (the parent workflow) receives an empty object. Try adding a Response block at the end of TestWorkflow, setting the "Body" to return {{ code1.data }}. This should ensure workflow1 gets the expected data!

Let me know if that solves your problem! :slight_smile:

Hi @Bob_Engelen , I did try that (see the last part of the message). I am even trying to send back hardcoded data (similar to the placeholder JSON in the body field) and am still seeing an empty object.

Here's the simplest example I can create to reproduce, using almost exactly the format as in the example placeholder value:

Workflow 1, just return a hardcoded response:

Workflow 2 calls workflow 1, empty object is returned:

Hi @ghost-ap, this should work as long as we have deployed the new changes on the child WF.

Here is a similar example:

ChildWF:

ParentWF:

1 Like

Hi @Paulo - thanks for the response. That was indeed one of the issues. However, now I'm seeing one of the child workflows still fail, even though the child runs ok on its own. The child wf has both non-error and error response blocks.

Could you share a screenshot of the child WF? In addition, how is it failing?

Can I share with you in a DM? I don't think I can show the workflow in a public forum.

Definitely! :slightly_smiling_face: