Skip to main content

WhatsApp Nodes

Automate WhatsApp messaging with three specialized nodes.

Available Nodes

NodeTypePurpose
WhatsApp ConnectActionCheck connection status
WhatsApp ReceiveTriggerWait for incoming messages
WhatsApp SendActionSend messages

Setup Requirements

  1. WhatsApp service running (included in Docker setup)
  2. WhatsApp account for pairing
  3. Scan QR code to link device

Connecting

  1. Click Android/WhatsApp icon in toolbar
  2. Scan displayed QR code with WhatsApp mobile app
  3. Go to WhatsApp > Settings > Linked Devices > Link a Device

WhatsApp Receive

Trigger node that fires when messages arrive.

Parameters

messageTypeFilter
select
default:"all"
Filter by message type: all, text, image, video, audio, document, location, contact
filter
select
default:"all"
Sender filter mode
phone_number
string
Specific phone number (when filter = contact)
group_id
select
Specific group (when filter = group)
keywords
string
Comma-separated keywords (when filter = keywords)
forwardedFilter
select
default:"all"
Forwarded message handling: all, only_forwarded, ignore_forwarded
ignoreOwnMessages
boolean
default:"true"
Skip messages sent by yourself

Filter Options

FilterDescription
All MessagesReceive everything
From Any ContactNon-group messages only
From Specific ContactMatch phone number
From Specific GroupMatch group
Contains KeywordsMatch keywords in message

Output

{
  "message_id": "ABC123",
  "sender": "[email protected]",
  "sender_phone": "+1234567890",
  "chat_id": "[email protected]",
  "message_type": "text",
  "text": "Hello!",
  "timestamp": "2024-01-15T10:30:00Z",
  "is_group": false,
  "is_from_me": false,
  "push_name": "John Doe",
  "is_forwarded": false,
  "forwarding_score": 0,
  "group_info": null
}

Group Message Output

When is_group is true:
{
  "group_info": {
    "group_jid": "[email protected]",
    "sender_jid": "[email protected]",
    "sender_phone": "+1234567890",
    "sender_name": "John Doe"
  }
}

Example: Reply to Specific Keywords

Filter: Contains Keywords
Keywords: help, support, question

WhatsApp Send

Send messages to contacts or groups.

Parameters

phone_number
string
required
Recipient phone number with country code (e.g., +1234567890)
message
string
required
Message content. Supports template variables.

Output

{
  "success": true,
  "message_id": "XYZ789",
  "timestamp": "2024-01-15T10:35:00Z"
}

Example: Auto-Reply

Phone Number: {{whatsappReceive.sender_phone}}
Message: Thanks for your message! I'll get back to you soon.

Example: Forward to Admin

Phone Number: +1987654321
Message: New message from {{whatsappReceive.push_name}}: {{whatsappReceive.text}}

WhatsApp Connect

Check WhatsApp connection status and device info.

Output

{
  "connected": true,
  "device_id": "abc123",
  "phone_number": "+1234567890",
  "platform": "android",
  "push_name": "My Business"
}

Use Case

Check connection before sending:
[WhatsApp Connect] --> [Python Executor] --> [WhatsApp Send]
                           (check status)

Common Workflows

Auto-Responder

[WhatsApp Receive] --> [OpenAI Chat] --> [WhatsApp Send]
AI Prompt:
Respond to this customer message: {{whatsappReceive.text}}
Be helpful and professional.
Send Config:
Phone: {{whatsappReceive.sender_phone}}
Message: {{openaiChatModel.response}}

Group Monitor

[WhatsApp Receive] --> [Python Executor] --> [Webhook/Database]
     (group filter)        (log message)
Filter Config:
Filter: From Specific Group
Group: [Select your group]

Keyword Bot

[WhatsApp Receive] --> [Python Executor] --> [WhatsApp Send]
   (keywords: help)      (select response)
Python Code:
text = input_data.get("text", "").lower()

if "hours" in text:
    response = "We're open 9am-5pm, Mon-Fri"
elif "price" in text:
    response = "Please visit our website for pricing"
else:
    response = "How can I help you?"

output = {"response": response}

Tips

Use {{whatsappReceive.sender_phone}} to reply to the sender automatically.
Combine with Simple Memory for context-aware conversations per contact.
Set Session ID: {{whatsappReceive.sender_phone}} in Simple Memory for per-user history.
Respect WhatsApp’s terms of service. Don’t send spam or bulk unsolicited messages.

Troubleshooting

Check WhatsApp service status:
docker-compose logs whatsapp
Restart if needed:
docker-compose restart whatsapp
  • Verify workflow is deployed (not just saved)
  • Check filter settings aren’t too restrictive
  • Confirm ignoreOwnMessages setting
  • Include country code in phone number
  • Check WhatsApp connection status
  • Verify recipient hasn’t blocked you
  • Check internet connectivity
  • Ensure phone stays online
  • Don’t use WhatsApp Web simultaneously