Getting Null response with my "When executed by another workflow", any help?

Describe the problem/error/question

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.

Please share your workflow

Workflow 2 : n8n.io - Workflow Automation

Workflow 1 : n8n.io - Workflow Automation


Share the output returned by the last node

Output of the first node "“When executed by another workflow” :

[
{
“command”: null
}
]

Information on your n8n setup

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

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.

1 Like

Hey Mookie, thanks a lot for your feedback! Really helpful.

Based on what you said, I won’t need any “When Executed by another workflow” trigger, but any type of trigger might work?

Here are the JSON

JSON WORKFLOW 1

JSON WORKFLOW 2

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).

But:

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.

2 Likes

Seems to work! Thanks Mookie! :slight_smile:

1 Like

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