Skip to main content

WhatsApp Automation

Automate WhatsApp messaging with OpenCompany. Receive messages, process them, and send responses.

Prerequisites

Takes: ~15 minutes. You need: OpenCompany running, one AI key (Add your AI key), a WhatsApp account on your phone, and npm available (the WhatsApp bridge installs itself on first use). Pairing uses one of your WhatsApp “linked devices” slots and drops if the service stops.
Want a simpler first messaging bot? The Telegram tutorial needs only a free token — no phone pairing.

Understanding WhatsApp Nodes

Connecting your WhatsApp account is done through the Credentials modal (WhatsApp panel), not a workflow node.

Step 1: Connect WhatsApp

  1. Click the WhatsApp icon in the toolbar to open the WhatsApp panel
  2. A modal appears with a QR code
  3. Open WhatsApp on your phone > Settings > Linked Devices > Link a Device
  4. Scan the QR code
  5. Wait for “Connected” status
Keep the WhatsApp service running. If it stops, you’ll need to re-scan the QR code.

Step 2: Create a Message Responder

Let’s build a workflow that auto-replies to incoming messages.

Add WhatsApp Receive Trigger

  1. Drag WhatsApp Receive from the WhatsApp category
  2. Configure the trigger:

Filter Options

Step 3: Add an AI Response

  1. Drag AI Agent from the AI Agents palette section onto the canvas
  2. Connect WhatsApp Receive’s output to the AI Agent’s main input (top-left handle)
  3. Click the agent and configure:
Model dropdown empty? Add your provider key first — key icon (API Credentials) in the toolbar.

Step 4: Send the Response

  1. Drag WhatsApp Send onto the canvas
  2. Connect the AI Agent’s output to WhatsApp Send’s input
  3. Configure:

Complete Workflow

Step 5: Start it

  1. Press the green Start button in the top toolbar
  2. Send a message to your linked WhatsApp number from another phone
  3. The workflow triggers and sends an AI response

Available Data from WhatsApp Receive

Group Message Handling

For group messages, use:

Example: Keyword-Based Response

Set up different responses based on keywords:

Configuration

AI Prompt

Example: Group Bot

Reply only in specific groups:

Troubleshooting

  • Ensure the WhatsApp service is running (default port 9400)
  • Open the WhatsApp panel from the toolbar and click Restart to relaunch the connection
  • Check the Terminal tab for WhatsApp service logs
  • Verify the workflow is started (Start pressed, not just saved)
  • Check “Ignore Own Messages” setting
  • Ensure filters aren’t too restrictive
  • Verify phone number format (include country code)
  • Check WhatsApp connection status
  • Ensure recipient hasn’t blocked you

Tips

Use Simple Memory with WhatsApp for context-aware conversations. Set Session ID to {{whatsappReceive.sender_phone}} for per-contact memory.
Test with your own number first before deploying to production.

Next Steps

Android Automation

Control Android devices

WhatsApp Node Reference

Full node documentation