Skip to content

Automation agencies and WhatsApp assistants

Private customer support with n8n

Download the workflow, connect your Rota key and test a message.

Your first n8n workflow

The file uses only built-in n8n nodes. Start with the fictional example. Then connect your support workflow.

  1. Import the file In the n8n editor, open the three-dot menu, select Import from File, then select the downloaded JSON file.
  2. Connect your key In Consultar Rota Nacional, create a Bearer Auth credential and paste only your mmk_… or sk-rota-… key, without the Bearer prefix. Keep privacy enabled in your Rota organization. The workflow uses rota/rapido. An external route requires your consent in the dashboard.
  3. Run the example Click Execute Workflow. The fictional message goes through validation and Rota, then reaches Resposta para o atendimento. This node returns reply and model. The workflow does not send WhatsApp messages.
  4. Connect your support workflow After the test, publish this workflow in n8n with Publish. In the workflow that receives WhatsApp messages, use Execute Sub-workflow and send one item per message. Wait for completion and use reply in the response. On error, route to your team. Do not retry automatically: this can duplicate charges or messages.

Input from the other workflow

{
  "message": "Qual é o horário de atendimento?"
}

Accepts text with 1 to 8,000 characters. The reply has up to 256 tokens. The workflow stops if the reply is empty or incomplete. It does not query a calendar, confirm purchases or run customer instructions in other systems.

If the call fails

  • 401: check the key in the credential. 402: check the balance in the dashboard. 403: check the model, organization and consent for external routing.
  • 422: the policy blocked personal data. Do not disable the barrier to retry. 429: wait for the reported limit. 503 or timeout: route to your team and check the service before you retry.
  • The JSON disables saved history for successful, failed and manual executions. Keep these settings in the calling workflow too. n8n keeps temporary data until automatic pruning: check database and backup retention. Do not pin real data in nodes or log messages or keys. The editor shows the current execution.

Create a Rota key · API quotas and prices

Why this matters to people who build assistants

The assistant of a clinic or an office receives names, CPF numbers, addresses and sometimes health data. The agency that builds the flow processes this data on behalf of its client.

With privacy enabled, the barrier processes detected personal data before it calls the model. Detection has limits. Check the results with fictional messages from your support use case.

To understand the intent of a message, answer questions and point to the next step, the model does not need the customer's documents.

Example with fictitious data

Before Rota

Oi, aqui é o Rafael Costa Lima. Quero marcar uma limpeza de pele para sexta à tarde. Meu CPF é 529.982.247-25 e meu e-mail é rafael.lima@example.com.

After Rota

Oi, aqui é o [PESSOA_1]. Quero marcar uma limpeza de pele para sexta à tarde. Meu CPF é [CPF_1] e meu e-mail é [EMAIL_1].

Fictitious text in Portuguese, processed by the API engine on 6 October 2026, with the placeholder policy.

How to integrate

The supplied workflow uses HTTP Request for POST /v1/chat/completions, with Bearer Auth and a JSON response without streaming. It does not depend on the OpenAI node or the Responses API.

POST /v1/chat/completions

curl https://rota-nacional.ia.br/v1/chat/completions \
  -H "Authorization: Bearer $ROTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "rota/rapido", "messages": [{"role": "user", "content": "Oi, aqui é o Rafael Costa Lima. Meu CPF é 529.982.247-25."}]}'

Good to know

  • Audio and images from the conversation first go through the transcription and document reading routes.
  • For high volume, the team agrees the limit with you.

FAQ

Frequently asked questions

Direct answers about this use. Did not find yours? Talk to the team.

Does it work in n8n?

Yes. Download the workflow from this page and import it into n8n. It uses built-in nodes, a Bearer Auth credential and Rota's chat API. It includes a fictional example and an input for another workflow. Your agency's workflow handles the WhatsApp connection and delivery.

How does the assistant call the customer by name?

The agency's flow adds the name afterwards, with the data that it already has from WhatsApp. The model works with placeholders such as [PESSOA_1].

How do I pay?

By Pix, in reais, from R$ 10, in the dashboard. The balance covers every key of the organization, and the 30-day trial is free with no card.

Talk to the team

Other solutions

See all solutions

Looking for something else?DocumentationContact