How to get results from a csv from a sub-workflow

Describe the problem/error/question

I have a sub-workflow that call some API and gets a csv file. Now I am trying to figure out how to get that csv file up the ladder, to its parent worklfow

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Josip_Sare,

See these similar topics:

In your case I think storing and retrieving the binary file is the best solution.
You can erase the file at the end of the workflow, so the file name can always be the same.

Alternative solution - might be easier than the above ones

In most cases the sub-workflow returns the data executed by the last node.
The position of the node in the canvas matter for the order of the execution, when you have multiple branches, like yours.

The nodes in the branch above will execute first, and the lowest branch will execute last, returning its output to the parent workflow.

In your case this is the last executed node:

So if you want your binary file to be returned, make sure it’s the last node being executed in the subworkflow.

:point_right: If my reply answers your question, please remember to mark it as a solution.

Thank you Solomon,

I am trying to figure out a best way to send that binary data up the ladder because the calling module is an AI agent and I want to be able to “talk” with that csv file. I am curious have you had any experience in doing something like this

Hey @Josip_Sare

I’ve just explained above how you can do it.
Do you have any specific questions?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.