> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wppfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n

> Automate WhatsApp in n8n with the official WppFy nodes.

The [`n8n-nodes-wppfy`](https://www.npmjs.com/package/n8n-nodes-wppfy) package adds two nodes to n8n:

<CardGroup cols={2}>
  <Card title="WppFy" icon="paper-plane">
    Every route in this documentation as an operation: send messages, manage chats, groups, channels, labels, CRM, catalog and more.
  </Card>

  <Card title="WppFy Trigger" icon="bolt">
    Starts a workflow when messages and other WhatsApp events arrive. The webhook is created and removed automatically.
  </Card>
</CardGroup>

## Installation

<Tabs>
  <Tab title="From the UI">
    1. In n8n, go to **Settings → Community Nodes**.
    2. Click **Install**.
    3. Enter `n8n-nodes-wppfy`, accept the notice and click **Install**.
  </Tab>

  <Tab title="Self-hosted (CLI / Docker)">
    ```bash theme={null}
    cd ~/.n8n/nodes
    npm install n8n-nodes-wppfy
    # restart n8n
    ```

    With Docker, run the command inside the container (or in the `~/.n8n/nodes` volume) and restart it.
  </Tab>
</Tabs>

## Credential

Create a **WppFy API** credential:

| Field | Value |
| - | - |
| **Instance Token** | Your instance token, available in the [WppFy dashboard](https://wppfy.com/dashboard) |
| **Base URL** | `https://api.wppfy.com` (default) |

When you save it, n8n tests the credential with `GET /instance/status`. Each credential maps to one instance: create one per number.

## Sending messages (WppFy node)

1. Add the **WppFy** node to the workflow.
2. Pick the **Resource** (for example *Send Message*) and the **Operation** (for example *Send text message*).
3. Fill in the required fields. Optional fields are under **Additional Fields → Add Field**.

| Parameter | Example |
| - | - |
| Resource | Send Message |
| Operation | Send text message |
| Number | `5511999999999` or a group ID ending in `@g.us` |
| Text | `Hello {{ $json.name }}!` |

<Tip>
  Fields with lists or objects (menu choices, carousel cards, group participants) accept JSON. Type the JSON directly or use an expression such as `{{ JSON.stringify($json.participants) }}`.
</Tip>

<Note>
  WppFy placeholders such as `{{name}}` and `{{first_name}}` work in plain text fields. Inside an n8n expression, write `{{ "{{name}}" }}` so n8n does not try to evaluate them.
</Note>

## Receiving events (WppFy Trigger node)

1. Add the **WppFy Trigger** node and select the credential.
2. In **Events**, choose the events that start the workflow (default: *Messages*).
3. In **Ignore Messages**, keep **Sent by API** if the workflow replies with the WppFy node, so your own replies don't trigger the workflow again.
4. Activate the workflow.

On **activation**, the node adds a webhook to the instance pointing to n8n. On **deactivation**, that webhook is removed. Webhooks you already have on the instance are not changed.

Each event becomes one item with the event payload (`EventType`, `message`, `chat`, `owner`...). The instance token included in the payload is removed by default; to keep it, enable **Options → Include Instance Token**.

<Warning>
  n8n must be reachable from the internet to receive events: n8n Cloud, or self-hosted with a public `WEBHOOK_URL`. An n8n running only on `localhost` does not receive events.
</Warning>

## AI agents

The **WppFy** node can be used as a tool by an **AI Agent**. Add WppFy as a tool, choose the operation the agent may use (for example *Send text message*) and let the model fill the fields with `$fromAI()`.

## Available operations

The node follows the groups of the [API Reference](/en/api-reference/start-here): Instance, Proxy, Profile, Business, Calls, Send Message, Async Message, Message Actions and Search, Chats, Contacts, Blocklist, Labels, Groups and Communities, Newsletters and Channels, Quick Replies, CRM and Chatwoot Integration. The full list of operations is on the [npm package page](https://www.npmjs.com/package/n8n-nodes-wppfy).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.