b-ub
March 22, 2025, 7:46pm
1
Hey everyone,
my AI agent is able to trigger the “Call n8n Workflow Tool,” but I keep getting an error. The screenshots show an agent that should generate an image. It works with a Telegram trigger, but not via the AI tool.
Settings:
Input: Agent should use the tool
Tool: Source = “Database,” correct workflow selected
Trigger: “Executed by another Workflow” with “Accept all data”
Naming: Request and nodes are correctly named
Version: Using the cloud version
Any idea what might be causing the issue? Thanks a lot in advance!
It is good practice to specify the input your subworkflow is going to accept.
“Accept all data” leaves it open for all kinds of structure that could lead to errors.
Try something like this:
AI Agent
Subworkflow
.
See how I have limited the type of data that gets into the subworkflow?
Also notice the $fromAI
function I’ve used in the tool.
If my reply answers your question, please remember to mark it as a solution.
b-ub
March 24, 2025, 6:15am
3
solomon:
See how I have limited the type of data that gets into the subworkflow?
Also notice the $fromAI
function I’ve used in the tool.
If my reply answers your question, please remember to mark it as a solution.
Hi Solomon,
Thanks so much for your support! Unfortunately, the sub-workflow still isn’t being triggered. Any other idea what might be causing it?
Hey @b-ub ,
I see you are not using an expression in that field.
Instead you are using a Fixed text.
To enable the expression, hover over the text field and you will see two small tabs that pop-up:
Click expression to enable it
b-ub
March 24, 2025, 1:33pm
5
solomon:
I see you are not using an expression in that field.
Instead you are using a Fixed text.
To enable the expression, hover over the text field and you will see two small tabs that pop-up:
Click expression to enable it
It’s still not working, unfortunately – but I think we’re on the right track! Do you have another idea we could try? Thanks a lot!
The error message indicates that the workflow executed twice—once for each item. On the second item, however, the Telegram Trigger didn’t fire.
This suggests that you are passing more items downstream than the Telegram Trigger is actually triggering.
b-ub
March 24, 2025, 3:23pm
7
solomon:
The error message indicates that the workflow executed twice—once for each item. On the second item, however, the Telegram Trigger didn’t fire.
This suggests that you are passing more items downstream than the Telegram Trigger is actually triggering.
The multiple trigger issue is fixed – yay!
But the tool still isn’t being triggered. Any other idea we could try? Thanks a lot!
Can you please go into the execution that triggered the error and see where it’s happening, please?
You have to enter the subworkflow and check its executions.
1 Like
b-ub
March 26, 2025, 6:55am
9
Thanks to your last message, I found and fixed the issue. Really appreciate it!
1 Like
system
Closed
April 2, 2025, 6:55am
10
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.