Hey everyone ![]()
I’m building an automation in n8n Cloud (v1.116.2) where an AI agent (Isabela) handles appointment scheduling for a clinic.
Everything works fine until the moment it should register a pre-appointment in the database — and that’s where I’m stuck.
Goal
When the patient confirms all details (name, email, phone, date, service, professional, etc.), the agent should:
-
Send a summary message for confirmation, and
-
At that same exact moment, trigger the node
registrar_pre_agendamento(which saves the structured data to Supabase).
Then, after the patient replies “yes”, it should:
-
Call
obter_pre_agendamentoto retrieve the saved record, -
Send it to the node
Chamando_Secretaria, -
And notify the user that the secretary will confirm the appointment.
Problem
The agent only calls registrar_pre_agendamento after the confirmation message, not when the summary message is sent.
Because of that, when it later calls obter_pre_agendamento, the record doesn’t exist yet — breaking the logic.
Expected Behavior
-
The
registrar_pre_agendamentonode should be triggered immediately when the confirmation summary is sent. -
The “yes” response should only trigger the retrieval and secretary call, not the registration.
-
The agent shouldn’t try to find tools dynamically; all tools (
registrar_pre_agendamento,obter_pre_agendamento,Chamando_Secretaria) are predefined in the workflow.
Setup Overview
-
n8n Cloud 1.116.2
-
Nodes:
-
HTTP Request →
registrar_pre_agendamento(writes to Supabase) -
HTTP Request →
obter_pre_agendamento -
HTTP Request →
Chamando_Secretaria
-
-
LLM Agent using JSON prompt configuration to manage conversation and tool calls
What I’ve Tried
-
I modified the agent’s prompt to include an “IMMEDIATE EXECUTION RULE” inside both
FLUXO_DE_AGENDAMENTOandPROTOCOLO_DE_AGENDAMENTO_SIMPLIFICADO. -
The rule explicitly says:
“The registration must occur at the exact same moment the summary message is sent — never before or after.”
-
Despite that, the agent still delays the tool call until after the user’s confirmation.
Question
How can I make sure that, in an LLM Agent setup, the tool registrar_pre_agendamento is called at the same time the confirmation summary is sent to the user?
Is there a way to enforce or script simultaneous actions in one response message, instead of sequential tool calls after the output?
Any tips, node examples, or even design suggestions would be amazing ![]()