I’ve been struggling with my workflow lately. I have 2 workflow indeed (I used this template) and it appears that my 2nd workflow, which have a “When executed by another workflow” trigger doesn’t receive any data from the 1st workflow.
What is the error message (if any)?
On my 2nd workflow “When executed by another workflow” I have command : [null]
On my 1st workflow, I have a Chat trigger then a AI Agent with a tools called “get_bases” that has an Extra Workflow Inputs with those parameters :
Name : command
Type : string
Value : get_bases
However, the Trigger of the 2nd workflow does not receive any data.
I suppose you are self-hosting an n8n instance. Unfortunately we can not access any of your workflows by the URL’s you provided. Instead copy your workflows JSON and paste into the ‘Preformatted text’ field.
But I understood your problem. The template you provided has an ‘When executed by another workflow’ node just for show. Since the template is basically two workflows, they added that node to identify which one is the second workflow. So you don’t have to use that trigger specifically, you can use any trigger and it would work.
Create a second workflow and paste the lower part of the template, use a manual trigger for now (can be changed)
In your first workflow check every tool one by one and set the correct name of the second workflow.
Note: ‘When executed by another workflow’ node only works if an ‘Execute workflow’ node exists somewhere and set up correctly.
Yes any type of trigger works in this exact case. As I mentioned above too, the trigger you are using right now in your second workflow is called ‘When executed by another workflow’ and this trigger only works if an ‘Execute workflow’ node exists (Refer to the image below).
Since the way you call an another workflow is by an AI Agent, it doesn’t matter what trigger you are using in your second workflow; it will always execute when called by the AI Agent.
Note: I’m confident about this but if I had to be honest I’m not sure if there are exceptions. You can use a manual trigger right now since it definitely works.