Describe the problem/error/question
I am trying to use a Human-in-the-loop setup with an n8n chat agent and a Google Sheets tool. However, the agent is not calling the Google Sheets tool with chat HITL node, even after I tried adjusting the system prompt. Does anyone have an idea of how to implement this, or any suggestions for what I should look at in my current setup? Thank you in advance!
Please share your workflow
Share the output returned by the last node
the other tools that connect to the agent is working perfectly fine except the google sheet one that connect to HITL node
The agent isn’t calling that tool for three fixable reasons, and they compound.
-
Tool names with spaces and special characters. customer address checking, Append row in sheet in Google Sheets, and the Call ‘add_to_cart’ style names all hurt tool-calling. The model sees the node name as the tool name, and spaces plus quotes make it unreliable, especially on lighter models. Give every tool a clean, consistent name with no spaces or punctuation. Half your tools already do this (product_catalog_query, address_lookup), so match that: save_customer_address, confirm_address_with_customer, add_to_cart, view_cart, remove_from_cart.
-
The prompt never names the address-save or confirmation step. Your system prompt walks through address_lookup and shipping, but it never tells the agent to call the confirmation/save tool at all. Models call tools far more reliably when the prompt names each tool explicitly and gives always/never rules and an ordered checkout sequence. I rewrote that section below.
-
The model. Your active model is google/gemini-3-flash-preview on OpenRouter (your OpenAI and Gemini nodes aren’t connected to the agent, so they’re inert). Flash-tier models are weak at picking the right tool from a large set. Move to GPT-5 (not mini) or Sonnet 4.5/4.6. That alone usually fixes half of “the agent won’t call my tool.”
Two smaller things I noticed: your HITL message was {{ $tool.parameters.district }}, but the wrapped tool has no district field (it’s district_th), so the confirmation would render blank. I fixed it to show the full address. And once you’ve done the above, if the agent still won’t fire it, connect save_customer_address directly to the agent and drive the approval from the prompt as a fallback.
Here’s your workflow with the renames, the rewritten prompt, GPT-5 wired in, and the HITL message fixed. Import and reconnect your credentials:
Además, veo que este es tu primer post… ¡bienvenido! @Theeranop_Laohade
Hola @Theeranop_Laohade
La única herramienta que nunca se dispara es la que está detrás del contenedor de revisión humana, así que el contenedor es donde buscar, no el razonamiento del agente. Abre tu última ejecución, haz clic en el subnodo del modelo de chat y lee su entrada: esa es la lista exacta de herramientas que recibió el modelo. Si la herramienta de Google Sheets no está en esa lista, el modelo nunca tuvo la opción de llamarla y ningún prompt cambiará eso.
Para un cliente confirmando su propia dirección en el chat, la forma compatible es dos herramientas simples en el agente en lugar del contenedor de revisión:
- Nodo Chat conectado como herramienta, Operación
Send and Wait for Response, Tipo de respuesta Approval.
- Herramienta de Google Sheets conectada directamente al agente.
El agente solicita confirmación con la primera, y añade la fila con la segunda una vez que el cliente aprueba. Esto requiere el Chat Trigger en modo de respuesta “Using Response Nodes”, que ya tienes. Mantén ambas herramientas en el flujo de trabajo principal: el nodo Chat no funciona dentro de un subflujo de trabajo, incluyendo un subflujo de trabajo usado como herramienta de agente, así que la guardada no puede moverse a una herramienta Call n8n Workflow como tus carros.
Chat | Nodes | n8n Docs