Skip to main content
Skip to article

#MoltFlow + n8n: No-Code WhatsApp Automation

What if you could automate WhatsApp without writing a single line of code?

You can. And you probably should.

n8n is an open-source workflow automation tool that connects apps and services together. Think Zapier but self-hosted and way more flexible. When you connect it to MoltFlow's WhatsApp API, you unlock automation workflows that would normally take days to build — lead notifications, appointment reminders, CRM syncs, all without touching your code editor.

Here's the thing: most businesses treat WhatsApp like a manual chat app. They reply by hand, lose track of leads, and miss opportunities because someone was busy. That's ridiculous in 2026. You've got tools like n8n sitting right there, ready to automate the entire pipeline.

This guide shows you exactly how to wire up MoltFlow and n8n. You'll build your first automation in under 30 minutes.

What is n8n?

n8n (pronounced "nodemation") is a workflow automation platform. You connect different services — APIs, databases, webhooks — using a visual editor. No code required, but you can write JavaScript when you need custom logic.

The killer feature? It's open source and self-hosted. You control your data. You're not paying per workflow execution like with Zapier.

n8n runs on your own server (Docker, npm, or their cloud platform n8n.cloud). For WhatsApp automation, self-hosting makes sense — your message data never leaves your infrastructure.

Why n8n + MoltFlow?

MoltFlow gives you a WhatsApp Business API connection. You can send and receive messages programmatically. But managing workflows — if this message contains "pricing", then add to CRM and send auto-reply — gets complex fast.

That's where n8n comes in. It handles the workflow logic while MoltFlow handles the WhatsApp connection. Together, they're a complete automation platform.

You can:

  • Forward every WhatsApp lead to your CRM automatically
  • Send appointment reminders based on Google Calendar
  • Auto-reply to common questions
  • Log messages to Google Sheets for analytics
  • Trigger workflows when specific keywords appear

All without maintaining a backend server or writing auth flows.

Setting Up MoltFlow for n8n

First, you need a MoltFlow API key. This authenticates your n8n workflows so they can send WhatsApp messages on your behalf.

Step 1: Create Your API Key

Log into MoltFlow Dashboard and navigate to Settings → API Keys. Click "Create API Key" and give it a descriptive name like "n8n Workflows". Select the Outreach preset (or choose messages:send, sessions:read, bulk-send:manage individually) — only grant the scopes your workflows actually need.

Copy the key immediately — you won't see it again. It looks like this:

text
mf_live_abc123xyz789example

Store it somewhere safe. You'll add it to n8n in a minute.

Step 2: Set Up Your WhatsApp Session

If you haven't already, create a WhatsApp session in MoltFlow. Go to Sessions → New Session. Give it a name like my-session and scan the QR code with your WhatsApp mobile app.

Wait until status shows "WORKING". This means your session is authenticated and ready to send/receive messages.

Your session name becomes part of the API endpoint: /api/v2/sessions/my-session/messages

Connecting MoltFlow to n8n

Now let's wire up n8n. I'm assuming you've already got n8n running (either self-hosted or on n8n.cloud). If not, check out n8n's installation guide.

Configure the HTTP Request Node

n8n talks to MoltFlow via HTTP requests. You'll use the "HTTP Request" node for sending WhatsApp messages.

Here's how to configure it:

Authentication:

  • Auth Type: Header Auth
  • Name: X-API-Key
  • Value: Your MoltFlow API key (the one you copied earlier)

Request Settings:

  • Method: POST
  • URL: https://apiv2.waiflow.app/api/v2/sessions/{session_name}/messages
  • Content Type: application/json

Replace {session_name} with your actual session name (e.g., my-session).

Body (JSON):

json
{
  "chatId": "[email protected]",
  "text": "Hello from n8n!"
}

The chatId format matters:

  • Individual contacts: {phone_number}@c.us (include country code, e.g., [email protected])
  • Groups: {group_id}@g.us (get this from MoltFlow's group monitoring)

Your First Workflow: Send a WhatsApp Message

Let's build something real. This workflow sends a WhatsApp message whenever someone submits a form on your website.

Workflow Structure

text
Webhook Trigger → Set Node → HTTP Request (MoltFlow)

Here's what each node does:

  1. Webhook Trigger: Receives form submission from your website
  2. Set Node: Formats the data (extracts phone number and message)
  3. HTTP Request: Sends WhatsApp message via MoltFlow API

Complete n8n Workflow JSON

You can import this directly into n8n. Just copy the JSON below, go to n8n editor, and paste it:

json
{
  "name": "Send WhatsApp on Form Submission",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "form-submission",
        "responseMode": "lastNode",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [250, 300],
      "webhookId": "your-webhook-id"
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "chatId",
              "value": "={{ $json.phone }}@c.us"
            },
            {
              "name": "message",
              "value": "Thanks for reaching out, {{ $json.name }}! We got your message: {{ $json.message }}"
            }
          ]
        },
        "options": {}
      },
      "name": "Format Message",
      "type": "n8n-nodes-base.set",
      "position": [450, 300]
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "https://apiv2.waiflow.app/api/v2/sessions/my-session/messages",
        "options": {
          "bodyContentType": "json"
        },
        "bodyParametersJson": "={\n  \"chatId\": \"{{ $json.chatId }}\",\n  \"text\": \"{{ $json.message }}\"\n}"
      },
      "name": "Send WhatsApp Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [650, 300],
      "credentials": {
        "httpHeaderAuth": {
          "name": "MoltFlow API"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Format Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Message": {
      "main": [
        [
          {
            "node": "Send WhatsApp Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Important: Replace my-session in the URL with your actual MoltFlow session name. And make sure you've added your API key to n8n credentials as "MoltFlow API".

Testing the Workflow

Activate the workflow in n8n. You'll get a webhook URL that looks like:

text
https://your-n8n-instance.com/webhook/form-submission

Test it with curl:

bash
curl -X POST https://your-n8n-instance.com/webhook/form-submission \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "16505551234",
    "name": "John Doe",
    "message": "I want to learn more about your product"
  }'

You should receive a WhatsApp message within seconds. Check your phone!

Receiving WhatsApp Messages in n8n

Sending messages is just half the story. What about incoming messages? Like when a lead replies to your automated message?

You need to configure a webhook in MoltFlow that forwards messages to n8n.

Step 1: Create Webhook in MoltFlow

Go to MoltFlow Dashboard → Webhooks → Create Webhook.

Webhook URL: Your n8n webhook URL (e.g., https://your-n8n.com/webhook/whatsapp-messages)

Events to Subscribe:

  • message (incoming messages)
  • message.any (includes outbound messages too — useful for logging)

Webhook Secret: Optional but recommended for security. n8n can verify the signature.

Step 2: Build n8n Receive Workflow

Here's a simple workflow that logs every incoming WhatsApp message to Google Sheets:

text
Webhook → Parse Message → Google Sheets (Append Row)

The webhook receives data from MoltFlow in this format:

json
{
  "event": "message",
  "session": "my-session",
  "payload": {
    "from": "[email protected]",
    "body": "Hi, what are your prices?",
    "timestamp": "2026-01-28T15:30:00Z"
  }
}

Use a Set node to extract the fields you care about:

json
{
  "timestamp": "={{ $json.payload.timestamp }}",
  "from": "={{ $json.payload.from }}",
  "message": "={{ $json.payload.body }}",
  "session": "={{ $json.session }}"
}

Then connect it to a Google Sheets node that appends a row with this data.

Building Blocks for WhatsApp Automation

Now that you've got the basics down, here are key n8n nodes you'll use constantly:

If Node: Conditional Logic

Use this to route messages based on content. Example: if message contains "pricing", send to sales team; if it contains "support", create a ticket.

javascript
// In If node expression
{{ $json.body.toLowerCase().includes('pricing') }}

Switch Node: Multi-Way Routing

Like If but for multiple conditions. Perfect for keyword-based auto-replies.

Mode: Rules

Rules:

  • Rule 1: {{ $json.body.includes('demo') }} → Route to demo booking flow
  • Rule 2: {{ $json.body.includes('cancel') }} → Route to cancellation handler
  • Rule 3: {{ $json.body.includes('help') }} → Send FAQ auto-reply

Code Node: Custom JavaScript

When you need complex logic, drop in a Code node. You get full JavaScript access.

Example: Extract email from WhatsApp message:

javascript
const message = $input.first().json.body;
const emailRegex = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/;
const match = message.match(emailRegex);

return {
  email: match ? match[0] : null,
  hasEmail: !!match
};

Delay Node: Rate Limiting

WhatsApp can ban accounts that spam. Use Delay nodes between messages to avoid looking like a bot.

Settings:

  • Wait Time: 2-5 seconds
  • Resume On: After specific time

Three Workflow Ideas to Try

1. Lead Notification Pipeline

Trigger: Incoming WhatsApp message with keyword "interested"

Flow:

  1. Parse message for contact info
  2. Add lead to CRM (Airtable, HubSpot, Salesforce)
  3. Send auto-reply: "Thanks! Our team will reach out within 2 hours."
  4. Notify sales team via Slack

Why it works: Captures leads instantly, before they forget about you.

Related guide: Build a WhatsApp Lead Pipeline with n8n and MoltFlow

2. Appointment Reminder System

Trigger: Google Calendar event 24 hours before appointment

Flow:

  1. Fetch event details from Google Calendar
  2. Extract attendee phone number
  3. Send WhatsApp reminder via MoltFlow
  4. Log reminder sent to spreadsheet

Why it works: Reduces no-shows by 40%+ (people check WhatsApp way more than email).

3. Order Confirmation Auto-Reply

Trigger: Shopify order created webhook

Flow:

  1. Get order details from Shopify
  2. Format confirmation message with order number and tracking
  3. Send WhatsApp message to customer
  4. Mark order as "notification sent" in Shopify

Why it works: Customers love instant confirmation. WhatsApp has 98% open rate vs 20% for email.

What's Next?

You've got the foundation. MoltFlow + n8n unlocks serious automation potential without maintaining custom code.

Quick start guides:

Advanced workflows:

Additional resources:

Ready to build no-code WhatsApp automation? Start your 14-day free trial — 1,000 messages included, no credit card required. Get your API key and connect to n8n in under 5 minutes.

Common Mistakes to Avoid

Forgetting country code in phone numbers: Use [email protected] not [email protected]. The country code (1 for US) is required.

Not handling webhook retries: MoltFlow retries failed webhooks up to 3 times. Make sure your n8n webhook is idempotent (safe to run multiple times).

Sending messages too fast: WhatsApp rate limits vary by account age. Start with 2-3 second delays between messages. Ramp up gradually.

Hardcoding session names: Use n8n environment variables for session names and API keys. Makes it easy to switch between dev and production.

Ignoring error responses: Always add an error handler node. Log failed messages so you can retry manually.

Conclusion

n8n + MoltFlow gives you enterprise-grade WhatsApp automation without the enterprise complexity. No backend servers to maintain, no auth flows to debug, no deployment pipelines.

Just workflows.

Start with the simple form-to-WhatsApp example above. Once that's working, expand into lead pipelines, appointment reminders, and CRM syncs. Each workflow builds on the last.

Questions? Join the MoltFlow Discord or check out the full API documentation.

Now go automate something.

> Try MoltFlow Free — 100 messages/month

$ curl https://molt.waiflow.app/pricing

bash-5.2$ echo "End of post."_