n8n
n8n copied to clipboard
Sub workflow as a tool for AI agent returns intermediary data instead of the last node data to the AI Agent in the main workflow
Describe the problem/error/question
I am using the AI Agent node with sub workflow as a tool. The problem is, that this sub workflow returns some data to the AI Agent before it finishes. and returns some intermediary step results instead of last step result
All the steps are described here: https://youtu.be/lSwMtsm6oDU?t=2104&si=fCjONL71G1mQsTvo, the image generation workflow...
I am using the online version of n8n
What is the error message (if any)?
There is no error message, its just that the main workflow does not wait for the sub workflow to finish.
Please share your workflow/screenshots/recording
(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.)
Sub workflow

Main workflow
