Actions2
- Message Actions
Overview
This node enables sending WhatsApp messages using a session authenticated via QR code. Specifically, the Send Text operation under the Message resource allows users to send plain text messages to specified phone numbers through WhatsApp.
Common scenarios where this node is beneficial include:
- Automating customer notifications or alerts via WhatsApp.
- Sending personalized messages in marketing campaigns.
- Integrating WhatsApp messaging into workflows for support or sales teams.
For example, you can configure the node to send a "Hello from n8n!" message to a customer's phone number automatically when a new order is placed.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The recipient's phone number without the plus sign or country code (e.g., 1234567890). |
| Message | The text content of the message to be sent. |
Output
The output JSON object contains details about the sent message:
messageId: Unique identifier of the sent message.to: The phone number the message was sent to.message: The text content that was sent.timestamp: The time when the message was sent (in milliseconds since epoch).success: Boolean indicating if the message was successfully sent.sessionName: The name of the WhatsApp session used.sessionStatus: Current status of the WhatsApp session.isSampleResponse(optional): Indicates if the output is a sample response (used during manual execution or when the session is not ready).note(optional): Additional information about the sample response.
No binary data is output for the Send Text operation.
Dependencies
- Requires an active WhatsApp session authenticated via QR code.
- Needs credentials containing:
- A session name.
- Webhook URL.
- Optional browser executable path for running the WhatsApp client.
- Depends on an external WhatsApp service utility to manage sessions and send messages.
- Requires Chrome/Chromium installed if running in environments that need a browser for WhatsApp automation.
Troubleshooting
Common Issues
- Session Not Ready: The WhatsApp session must be created and authenticated before sending messages.
- Browser Not Installed or Misconfigured: The underlying WhatsApp service requires Chrome or Chromium; missing or incorrect paths cause failures.
- Network Connectivity Problems: Internet access is required for WhatsApp communication.
- Permission Issues: Insufficient permissions to run the browser or access files may block operations.
Error Messages and Resolutions
"Session not found. Please create a session first."
Create and authenticate a WhatsApp session before attempting to send messages.Errors related to browser executable path or launching the browser:
Verify that Chrome/Chromium is installed and the path is correctly set in credentials."Session not ready"errors when fetching contacts or chats:
Wait until the session is fully authenticated and ready.Sample responses are returned during manual executions or when the session is not ready; these do not represent actual message sends.
