Agent-AI and Whatsapp tool (to send menssages)

I’m trying to create my first agent using n8n and whatsapp business; my initial project is a bot to ask the user for some specific information. I set my system prompt to instruct the bot and added Whatsapp Send Message as a tool; I was expecting the LLM to use this tool to write the user and ask for the missing information; but it never uses it.

Instead, it writes the message asking for more information but this message is in the output key of the AI Agent node.

This was my plan; but it never calls the Whatsapp Send Message tool

Instead, in all other templates and examples, I see people putting a ‘send whatsapp message’ node AFTER the AI Agent node:

I did this, and it works but I’m not sure if this is the best way to do it.

I’m running N8n Cloud Pro plan.

Hi @Martin_Sarsale1

This behavior is expected with the current AI Agent design in n8n.

The AI Agent does not execute external actions (such as sending WhatsApp messages) by itself. Even when a tool is attached, the Agent’s role is to reason and generate the response, not to control workflow execution.

That’s why the Agent generates the message correctly but only returns it in its output instead of calling the WhatsApp tool.

The recommended and supported pattern is:

WhatsApp Trigger > AI Agent (generate the message) > WhatsApp Send Message node (send the message using the Agent output)

This separation is intentional:

AI Agent = decision
Workflow nodes = execution

Using the WhatsApp Send Message node after the AI Agent is the correct approach for this use case.

1 Like

Hi @Martin_Sarsale1 this kind of issue i also had with gemini models that even instructed they tend to not use the tools even if we explicitly specify, have you tried using OpenAI models? they work great and i am using them with everything specified in system prompts and it all works fine, hope this helps!

Thanks

I was fooled by the AI assistant that created the initial workflow using the WhatsApp send message tool (that made a lot of sense)

No, this is not the case. @tamy.santos answer is the correct one.

LOL @Martin_Sarsale1

I’m really happy to hear this helped :blush:
If this solution solved the issue for you, please consider leaving a like or marking the reply as the solution ( it helps others find the answer more easily and also supports community contributors.)

Hi,

Interesting enough, n8n just released an option to do something similar with the chat tool -

There might be am option to use a WhatsApp message tool eventually.

In the meantime, Tamy’s advice is spot on.