Skip to main content

WhatsApp & Social Nodes

Automate WhatsApp messaging and multi-platform social communication.

Available Nodes

NodeTypePurpose
WhatsApp SendAction / AI ToolSend text, media, location, contact, or sticker messages
WhatsApp DBAction / AI ToolQuery chats, contacts, groups, and newsletter channels
WhatsApp ReceiveTriggerWait for incoming messages
WhatsApp Send and WhatsApp DB are dual-purpose: they work as standalone workflow nodes and as AI Agent tools when connected to an agent’s tools handle.

Setup Requirements

  1. WhatsApp service running (starts automatically with machina start)
  2. WhatsApp account for pairing
  3. Scan QR code to link device

Connecting

There is no “connect” workflow node. Pairing is managed from the Credentials panel:
  1. Open the Credentials modal and select the WhatsApp panel
  2. Scan the displayed QR code with your WhatsApp mobile app
  3. Go to WhatsApp > Settings > Linked Devices > Link a Device

WhatsApp Receive

Trigger node that fires when messages arrive.

Parameters

message_type_filter
select
default:"all"
Filter by message type: all, text, image, video, audio, document, location, contact
filter
select
default:"all"
Sender filter mode: all, self, any_contact, contact, group, channel, keywords
phone_number
string
Specific phone number, digits only, no + prefix (when filter = contact)
group_id
select
Specific group JID (when filter = group)
sender_number
string
Optional: filter group messages to a specific member (when filter = group)
channel_jid
select
Newsletter channel JID; leave empty to match any channel (when filter = channel)
keywords
string
Comma-separated keywords, case-insensitive (when filter = keywords)
forwarded_filter
select
default:"all"
Forwarded message handling: all, only_forwarded, ignore_forwarded
ignore_own_messages
boolean
default:"true"
Skip messages sent by yourself
include_media_data
boolean
default:"false"
Download base64 media data with the event

Filter Options

FilterDescription
All MessagesReceive everything
From SelfNotes-to-self chat only
From Any ContactNon-group messages only
From Specific ContactMatch phone number
From Specific GroupMatch group (optionally a specific member)
From ChannelMatch newsletter channel
Contains KeywordsMatch keywords in message

Output

{
  "message_id": "ABC123",
  "sender": "1234567890@s.whatsapp.net",
  "sender_phone": "+1234567890",
  "chat_id": "1234567890@s.whatsapp.net",
  "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": "123456789@g.us",
    "sender_jid": "1234567890@s.whatsapp.net",
    "sender_phone": "+1234567890",
    "sender_name": "John Doe"
  }
}

Example: Reply to Specific Keywords

Filter: Contains Keywords
Keywords: help, support, question

WhatsApp Send

Send messages to yourself, individual contacts, groups, or newsletter channels. Works as a workflow node or an AI Agent tool.

Parameters

recipient_type
select
default:"self"
Where to send: self (connected phone), phone (individual), group, or channel (newsletter)
phone
string
Recipient phone number, digits only, no + prefix (when recipient_type = phone)
group_id
select
Group JID, format 123456789@g.us (when recipient_type = group)
channel_jid
select
Newsletter channel JID, format 120363…@newsletter; admin/owner role required (when recipient_type = channel)
message_type
select
default:"text"
Type of message: text, image, video, audio, document, sticker, location, contact. Channels only support text, image, video, audio, document.
message
string
Text content (when message_type = text). Supports template variables.
format_markdown
boolean
default:"true"
Convert markdown (bold, italic, code, lists) to WhatsApp-native formatting (when message_type = text)
media_source
select
default:"base64"
Source of media data: base64, file, or url (for image / video / audio / document / sticker)
media_url
string
HTTPS URL to download media from (when media_source = url)
caption
string
Optional caption for image, video, or document
Location messages use latitude / longitude / location_name / address. Contact messages use contact_name / vcard. Quote a message with is_reply + reply_message_id.

Output

{
  "message_id": "XYZ789",
  "sent": true
}

Example: Auto-Reply

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

Example: Forward to Admin

Recipient Type: phone
Phone: 1987654321
Message: New message from {{whatsappReceive.push_name}}: {{whatsappReceive.text}}

WhatsApp DB

Query the WhatsApp database: chat history, contacts, groups, and newsletter channels. Works as a workflow node or an AI Agent tool.

Parameters

operation
select
default:"chat_history"
Operation to perform (see table below)
The remaining fields depend on the selected operation (e.g. phone, group_id, query, channel_jid, limit, offset, include_media_data).

Operations

OperationPurpose
chat_historyRetrieve messages from an individual or group chat (with pagination and optional media download)
search_groupsSearch groups by name
get_group_infoGet group details with participant names and phone numbers
get_contact_infoGet full contact info (name, phone, profile picture)
list_contactsList all contacts with saved names
check_contactsCheck WhatsApp registration status for phone numbers
list_channelsList subscribed newsletter channels
get_channel_infoGet channel details (name, description, subscribers)
channel_messagesGet channel message history with filters and pagination
channel_statsGet channel subscriber/view statistics
channel_follow / channel_unfollowFollow or unfollow a newsletter channel
channel_createCreate a new newsletter channel
channel_muteMute or unmute a channel
channel_mark_viewedMark channel messages as viewed
newsletter_reactReact to a channel message with an emoji
newsletter_live_updatesSubscribe to live view/reaction counts
contact_profile_picGet profile picture for a contact or group

Example: Look Up a Contact

Operation: get_contact_info
Contact Phone: 1234567890

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:
Recipient Type: phone
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

The WhatsApp service (whatsapp-rpc) starts automatically with machina start and listens on port 9400. Restart all services if the QR code doesn’t appear:
npx machina stop
npx machina start
  • 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

Social Nodes

Unified messaging nodes for multi-platform communication. Supports WhatsApp, Telegram, Discord, Slack, Signal, SMS, Webchat, Email, Matrix, Teams.

Social Receive

Normalizes messages from any platform trigger into a unified format. Output Fields:
  • channel - Platform name
  • message_id, sender_id, sender_name
  • text, message_type, timestamp
  • media - Platform-specific media data

Social Send (Dual-Purpose)

Send messages to any supported platform. Works as workflow node OR AI Agent tool. Message Types: text, image, video, audio, document, sticker, location, contact, poll, buttons, list
[Social Receive] --> [AI Agent] --> [Social Send]
                          ^
                          |
                    [Social Send as Tool]

WhatsApp Tutorial

Step-by-step guide

AI Agent

Add AI-powered responses