N8n Subworkflow doesn't trigger

Whenever I tell that AI Agent to draft an email, it only outputs said draft into the telegram chat, but never goes into the sub-workflow to draft it. It can access tools and other sub-workflows.

Output returned by the last node:

[
{
“ok”: true,
“result”: {
“message_id”: 166,
“from”: {
“id”: 7604993655,
“is_bot”: true,
“first_name”: “rafaels personal bot”,
“username”: “rafaels_personal_bot”
},
“chat”: {
“id”: 7436356715,
“first_name”: “Rafael”,
“username”: “ragrinenko”,
“type”: “private”
},
“date”: 1740587864,
“text”: “- Recepients email: [email protected]\n- Subject line: Frage zur Installation des neuesten iOS Updates\n\n- Body:\n\nSehr geehrte Damen und Herren,\n\nich habe eine Frage bezüglich der Installation des neuesten iOS Updates auf meinem iPhone Modell, z.B. iPhone 14 Pro. Ich bin mir unsicher, wie ich vorgehen muss.\n\nKönnten Sie mir bitte eine detaillierte Anleitung zukommen lassen oder mich auf eine entsprechende Seite auf Ihrer Website verweisen?\n\nVielen Dank im Voraus für Ihre Unterstützung.\n\nMit freundlichen Grüßen,\n\nRafael”,
“entities”: [
{
“offset”: 20,
“length”: 17,
“type”: “email”
}
]
}
}
]

Information on your n8n setup

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

Hey @Rafaelnko Welcome to community! I can see that your Email Agent has name ResearchAgent and vice versa.

Maybe a stupid question but are your sub-workflows enabled?

You were right. I fixed that, and it worked, however, I have the same problem again. Also, the output of the parent workflow doesn’t go through to the sub-workflow for some reason:

And here is the Email Agent:

No, they aren’t activated. I can’t activate a sub wokflow by itself. Also, it worked when they were all disabled and I just clicked “Test Workflow” on the parent workflow.

The Email agent has two triggers, with one needing an active workflow. Consider moving the Text Classifier to its own workflow.

Did that. It’s super odd, when I tried for the first time after that, it called the workflow, but had an error. Afterwards it didn’t call that workflow at all.

Parent:

Email Agent:

The behavior of your agent largely depends on the model you use, and google/gemini-2.0-flash-exp:free wasn’t particularly great in this regard. You might want to try a different model. By the way, which provider do you use for AI? I noticed that you’re using the OpenAI Chat model alongside google/gemini-2.0-flash-exp:free.

I‘m using openrouter, and filtered by models that can use tools. I’ll try a different model, thank you a lot for your support thus far!

No worries, for openrouter there in a node was recently introduced.

1 Like

Thanks. Still doesn’t work. In the Email Agent, the input data mode is defined by the field “query”, but it always returns null. Again the main workflow only called the sub-workflow once after I updated, then never again.

Hey @ Rafaelnko
Probably you have but did you check execution log of your parent (AI agent) when it finishes without calling the Email writer?

Usually the agent outputs a message about it’s reasoning and plan for action. Maybe this will give you more insights on why it doesn’t call the tool or what confuses it.

Here is my Email agent take a look:

2 Likes

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