Published 2026-06-129 min readTutorial

How to add WhatsApp to n8n.

The end-to-end recipe for catching inbound WhatsApp messages inside an n8n workflow and sending outbound replies from the same workflow. No WhatsApp Business API. No business verification. No template approval. Your customer scans one QR, the line is live, n8n triggers. Total time: under 30 minutes if n8n is already familiar.



01

Provision a Mossmoon WhatsApp line

Sign up at mossmoon.app/signup if you haven’t already. Grab an API key from Dashboard > API keys. Provision a line with one POST. You can do this in an n8n HTTP Request node, but for the tutorial let’s use curl so the line is ready before you build the workflow:

curl -X POST https://mossmoon.app/api/v1/wa/lines \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agency_external_user_id": "my_first_line"
  }'

Mossmoon returns:

{
  "line_id": "ln_8KQ9pP2nR",
  "status": "provisioned",
  "connect_url": "https://mossmoon.app/wa/connect/c_5fT9vY4tX",
  "created_at": "2026-06-12T14:30:00Z"
}

Save the line_id. We’ll pull it directly from the inbound webhook payload in n8n, so you don’t need to hard-code it.


02

Scan the QR

Open the connect_url in a browser. On your phone, open WhatsApp, tap Settings > Linked Devices > Link a Device, scan the QR.

The line transitions to ready within seconds. Mossmoon fires a line.ready webhook to your workspace URL (we’ll set that up in step 4). Billing starts: 7-day free trial on your first line, $15/mo thereafter.


03

Build the n8n workflow with a Webhook trigger

In n8n, click + New Workflow. Add the first node by clicking the canvas, search for Webhook, choose Webhook (the trigger, not the Webhook Response action).


04

Wire Mossmoon's inbound webhook to n8n

In the Mossmoon dashboard, go to Settings > Webhooks and set the workspace webhook URL to the n8n production URL from step 3. Save. Every inbound message on any line under your account now fires the n8n workflow.

To let n8n learn the inbound JSON shape, text the connected WhatsApp number from another phone. The message hits the webhook, n8n receives it, and the Webhook node now has a sample payload in its output. The shape:

{
  "event": "message.received",
  "line_id": "ln_8KQ9pP2nR",
  "message": {
    "id": "msg_3kP4vQ7nT",
    "from": "+15551234567",
    "to": "+15559876543",
    "type": "text",
    "body": "Hi, is the 3pm tour still available?",
    "received_at": "2026-06-12T14:35:22Z"
  }
}

05

Add the HTTP Request node to send the reply

After the trigger, add whatever middle nodes you want. For this tutorial we’ll add an OpenAI node that drafts a reply, then an HTTP Request node that sends it through Mossmoon.

  1. After the Webhook node, add an OpenAI > Message a Model node. Pass {{ $json.message.body }} as the user message. Give the system prompt whatever persona you want. The node returns the generated reply text.
  2. After OpenAI, add an HTTP Request node. That’s the outbound through Mossmoon.
{
  "to": "{{ $('Webhook').item.json.message.from }}",
  "type": "text",
  "body": "{{ $json.message.content }}"
}

The $('Webhook') reference pulls from the original trigger output regardless of which node you’re currently in. $json is the current node’s input (the OpenAI response in this case).

Save and activate the workflow. Send another test message from your phone. n8n triggers, OpenAI generates a reply, the HTTP Request node sends it through Mossmoon, your phone receives the response.


06

Patterns to build out from here

The two-node skeleton (Webhook trigger + HTTP outbound) handles every WhatsApp use case. Common things teams add in between:

  • CRM-routed inbound. Postgres / Airtable / HubSpot nodes that look up the inbound number against contacts and create or attach the message to a record.
  • Multi-line routing. Running multiple lines (one per client, one per agent, one per brand)? Add a Switch node that branches on line_id and runs a different downstream workflow per line.
  • Calendar booking inline. Cal.com or Google Calendar nodes that fetch available slots when the AI decides it’s booking time. Send the slot list as a WhatsApp message. Catch the user’s pick on a follow-up inbound, confirm the booking.
  • Media handling. Inbound payloads include images, voice notes, documents. Pipe images into OpenAI Vision, voice notes into Whisper, documents into your DMS. All inside the same workflow.
  • AI agent loop. n8n’s native AI Agent node makes it trivial to wire a multi-turn conversation that keeps state across messages, queries tools (calendar, CRM, knowledge base), and replies through Mossmoon.

07

Why this beats n8n's Business API integrations

n8n has a native WhatsApp Business Cloud node and several community nodes that wrap Meta’s WhatsApp Business API. Everything you build with them inherits the Business API rules: every customer onboarded through Meta business verification (days to weeks per account), template pre-approval for every outbound past the 24-hour customer service window, per-conversation pricing.

The pattern in this tutorial avoids all of that. Mossmoon connects through the customer’s actual WhatsApp on their phone, not through Meta’s server-side API. No business verification. No template approval. No 24-hour window. No per-conversation fees. For a deeper comparison of the two paths, see: WhatsApp Business API vs personal WhatsApp API.


Spin up your first line and run the workflow this afternoon.

First line free for 7 days. No Meta onboarding. One QR scan. n8n trigger fires immediately.

How to add WhatsApp to n8n: full workflow tutorial — Mossmoon