Skip to main content
The official community node n8n-nodes-pilot-status brings two nodes to n8n:
  • Pilot Status — calls the public /v1 API: send messages and templates, list logs, manage numbers, templates, Flows, groups and more.
  • Pilot Status Trigger — receives your webhook events and starts a workflow.
This page shows how to set both up and gives workflows you can import and adapt: one to start with each kind of number (Pilot Status API, Evolution GO layer, Evolution v2 layer, official Meta) and five recipes. Every workflow was imported into n8n and checked against the node definitions, and its routing logic was run with sample payloads of every webhook format.

Install the node

1

Install the community node

In n8n, open Settings → Community Nodes → Install, type n8n-nodes-pilot-status and confirm. This needs a self-hosted n8n (community nodes are on by default there). On n8n Cloud, n8n decides which community nodes can be installed; if this one is not offered, use a self-hosted instance.
2

Create the credential

Add a Pilot Status API credential and paste your ps_ API key from the dashboard.Which other fields to fill in depends on the kind of key: see Choose the API key below. Leave Base URL at its default (https://pilotstatus.com.br).
3

Add a Pilot Status node

Pick a Resource (for example Message) and an Operation (for example Send). The Template ID dropdown loads the templates of the credential’s number.

Choose the API key

Pilot Status has three kinds of key (details). The credential has two optional fields, WhatsApp Number ID and Workspace ID, sent as the x-whatsapp-number-id and x-workspace-id headers. Fill them in according to the key:
  • One workflow, one number: use a number key. It can only reach that number, which keeps the damage small if the key leaks.
  • Several numbers: use a workspace key, and create one credential per number, each with its own WhatsApp Number ID (the id from Number → Get Many). Managing numbers (create, connect, remove) also needs a workspace key.
  • Account key: only when one person automates several workspaces. Without Workspace ID, every call answers 400 WORKSPACE_ID_REQUIRED, and the person behind the key must be an Owner or Admin to manage webhooks.
  • Trigger with Automatic registration works with any of the three. The webhook is created on the credential’s number, so a workspace or account key without WhatsApp Number ID fails activation with 400 NUMBER_REQUIRED.
A green credential test does not prove that sending works. For an account key without Workspace ID, n8n tests the credential on /v1/workspaces, which needs no workspace, so the test passes and the first Send fails. A workspace key without WhatsApp Number ID also passes the test and then answers 403 TENANT_SCOPE_NOT_ALLOWED on Send.

Receive events with the Trigger

1

Add the Pilot Status Trigger

Keep Registration on Manual and Event on All Events (see the warning below for why).
2

Register the URL

Copy the Production URL from the Trigger and add it as a webhook of the number on the Webhooks page of the Pilot Status dashboard. Use the Test URL instead while you click Listen for test event in the editor.
3

Sign the deliveries

Paste the webhook’s signing secret into Signing Secret. The Trigger then answers 401 to any request whose x-pilot-status-signature does not match. Without it, anyone who learns the URL can start your workflow.
4

Activate the workflow

The Production URL only receives events while the workflow is active.
The Trigger passes the delivered body through untouched: $json is exactly what Pilot Status sent.

Two webhook formats

What arrives depends on how the number was connected (details):
On an official number, pick All Events. Meta’s envelope has no event field, so a Trigger set to a specific event such as Message Reply answers 200 Ignored event to every message and the workflow never runs. For the same reason, do not use Automatic registration with a message.* event on an official number: Pilot Status drops event names the number cannot emit, so the webhook is created with an empty list and delivers nothing.
A reply arrives as message.reply, not message.received. On a QR-code number, a message that quotes another one, including a tap on a template button, fires message.reply only. A Trigger set to Message Received never sees button taps.
To avoid writing every workflow four times, the workflows below start with a Normalize Code node. It turns all four formats into the same flat item:
Normalize (Code node)

Import a workflow

  1. Copy the JSON of a recipe.
  2. In n8n, open an empty workflow and press Ctrl+V (Cmd+V on macOS) on the canvas. You can also save the JSON to a file and use ⋯ → Import from File.
  3. Open each Pilot Status, Google Sheets, OpenAI and e-mail node and select your credential.
  4. Replace the example values: template names, phone numbers, spreadsheet id, e-mail addresses.
The workflow replies from the number of the credential. Register the Trigger URL on that same number: if the webhook belongs to number A and the credential to number B, the contact writes to A and gets the answer from B.

Start with your number type

Each workflow below answers every text a contact sends with We got your message: <their text>. Import the one for your number to see events arrive, then move on to the recipes. All four use the same Pilot Status Trigger → Normalize → Inbound text? start; only the reply differs.
A number connected by QR code in the dashboard. The reply goes through the Pilot Status node (POST /v1/messages/send), with a ps_ key in the credential.
Not sure which kind your number is? GET /v1/numbers returns its provider, and the number’s card in the dashboard says how it was connected.

Recipe 1: template with buttons, reply on tap

You send an approved template with two quick-reply buttons, Confirm and Reschedule. When the contact taps one, the workflow answers with a different message for each button.
  • Start → Send template sends the template. Swap the Manual Trigger for whatever starts your flow (a form, a CRM, a schedule).
  • Pilot Status Trigger → Normalize → Which button? routes the tap by the button’s label. The label works on every kind of number; buttonId is not always reported for template buttons.
  • Reply: … answers with free text. The tap opens WhatsApp’s 24-hour service window, so a free-text reply is allowed even on an official number.
What to change: templateId (appointment_confirmation), the destination number, the variables, and the two labels in Which button?, which must match the template’s buttons exactly (case is ignored).

Recipe 2: AI agent answers inbound messages

Every text a contact sends goes to an n8n AI Agent with a per-contact memory, and the answer goes back on WhatsApp.
  • Inbound text? lets through only messages the contact sent. Without it, the echo of the agent’s own answer would start the workflow again.
  • Memory per contact uses the contact’s number as the session key, so each conversation has its own history.
  • Send answer sends $json.output, the agent’s reply, as free text. It is a reply inside the 24-hour window the contact just opened.
What to change: the system message of AI Agent, the model, and the OpenAI credential (or replace the model node with any other chat model).
Group messages arrive as message.group and are not handled here, so the agent does not answer in groups.

Recipe 3: send a template to every row of a sheet

Every day at 9:00, the workflow reads a Google Sheet, sends a template to each row that was not sent yet, and writes the time of the send back to the row. Create a tab named Contacts with these columns:
  • Not sent yet? skips rows whose sent column is filled in.
  • Send template passes name and orderId as template variables. The keys of the JSON must match the template’s variable names.
  • Idempotency Key is orderId-phone. When n8n retries the node (it is set to try 3 times), or the workflow runs again before the sheet is updated, the API returns the first response instead of sending twice. See Idempotency.
  • Mark row as sent finds the row by orderId and fills in sent.
What to change: YOUR_SPREADSHEET_ID (the id in the sheet’s URL), the template, and the variables.

Recipe 4: e-mail alert for failed messages

Every 15 minutes, the workflow lists the last 100 failed outbound messages and e-mails the team about each one it has not seen before. It polls GET /v1/messages instead of listening to message.failed, because the webhook does not cover every case: an official number never sends message.failed (failures arrive inside Meta’s statuses[]), and some failures reach no webhook at all. The log has every failure, on every kind of number.
  • One item per message splits the API’s data list into one item per message.
  • Only new failures remembers the message ids it has already seen across executions, so each failure is reported once.
  • The e-mail shows the errorCode and the reason. The error code catalog explains each code.
What to change: the SMTP credential and the two e-mail addresses. To alert on Slack or Telegram instead, replace the last node.
On the first run every failure in the list is new, so you get up to 100 e-mails. Run it once by hand with the e-mail node disabled to fill the memory first.

Recipe 5: save WhatsApp Flow answers to a sheet

Each time someone submits a WhatsApp Flow, the answers become a new row of a Google Sheet. flow.response_received keeps the Pilot Status { event, data } format even on official numbers, so here the Trigger can listen to that one event and no Normalize node is needed.
  • Answers to columns keeps the time, the contact’s number, the Flow id, and the answers as JSON text. On a Flow with a data endpoint, what the person typed is in submitted, one entry per screen; otherwise it is in response.
  • Append to sheet writes one row per submission. Create a tab named Flow answers with the columns receivedAt, phone, flowId and answers.
What to change: YOUR_SPREADSHEET_ID. To get one column per question, replace the answers field with one field per answer, for example {{ $json.data.response.nota }}.

Troubleshooting