Hello guys,
So I’m new to the n8n community and I’m facing an issue.
Scenario : I have a workflow (00) that is triggered by a Telegram message. It identifies my request and forwards it to the specialised agent who is responsible for handling it and who can call on sub-workflows or other specialised agents.
Pratical case : My Telegram message contains a URL and a company name, and it is forwarded to the prospecting agent (02), who then calls on the audit agent (01) using the execute workflow node. The audit agent carries out the analysis and must send the report back to the prospecting agent (02) to continue the workflow, but at this point, it do not send back the correct data.
At the end of the audit sub-workflow (01), I have a node “set” that add to the previous the output the chat ID, the URL and a report “text to send” field (summary). I can see that the output of the last node in my audit subworkflow (01) contains all the information needed, but in the first node following the ‘execute workflow’ node (which executes the audit sub-workflow (01) with the Wait For Sub-Workflow Completion option enabled), the data is simply the chat ID, the company name and the URL, but without the audit (which, as a reminder, is located at the end of the sub-workflow and seems to dissapear when we go back to the parent workflow).
I’ve tried adding a code node at the end of the subworkflow to force the transfert of the data but it’s not working and at this point, I’m stuck.. My parent workflow can’t receive the data it needs to complete the next steps..
The workflow is this : workflow 00 execute workflow 02 then => code JS that retrieve the chat id => execute subworkflow 01 and inside this one : extract URL => http request to check the code => LLM retrieve the site version in the code and extract it => code to give some context that all the dates previous today’s date are past (sometimes the LLM return the version isn’t out yet even if it was a few months old) => LLM that check the security breaches associated to the version => set node that change the general output and send the chat id + the report => code to change the markdown => send message and wait for answer (possibility to add more information manually) => code that reinject original informations such as chatid, url, etc. => LLM that gives a full report => set data final that changes the full report and add the chat id, the name, the url and the condensed report.
I’m thinking about adding an if before the”send message and wait for response” so if I decide to add the manual information, it continues and if no, it skips all the steps and just send the data to the parent workflow (02)
Thanks for the help.