Actions16
Overview
This node enables sending and managing WhatsApp messages via a WebSocket API (WSAPI). Specifically, the "Send Link" operation allows users to send a link message with an optional preview to a specified WhatsApp contact or group. This is useful for automating sharing URLs with contextual text and metadata in WhatsApp conversations.
Common scenarios include:
- Sharing product links with customers automatically.
- Sending event invitations with clickable URLs.
- Broadcasting news articles or blog posts with rich previews.
Example: Automatically send a promotional URL with a custom title and description to a customer after they complete a purchase.
Properties
| Name | Meaning |
|---|---|
| Recipient | WhatsApp ID of the recipient (phone number with @s.whatsapp.net for contacts, or group ID with @g.us for groups) |
| Link Text | Text message that accompanies the shared link |
| URL | The actual URL to share |
| Link Title | Optional title shown in the link preview |
| Link Description | Optional description shown in the link preview |
| Advanced Options | Additional options including: - Mentions: Comma-separated WhatsApp IDs to mention in the message - Reply To Message ID: ID of the message this is replying to - Is Forwarded: Mark message as forwarded (boolean) |
Output
The node outputs JSON data representing the response from the WSAPI after sending the link message. This typically includes details about the sent message such as message ID, status, timestamps, and any metadata returned by the API.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the WSAPI service with valid credentials including:
- Base URL of the WSAPI endpoint.
- An API key credential.
- An instance identifier credential.
- The node uses HTTP POST requests to the WSAPI endpoints.
- Proper configuration of these credentials in n8n is necessary for successful operation.
Troubleshooting
- Invalid Recipient Format: Ensure the recipient ID is correctly formatted as a phone number with
@s.whatsapp.netor a group ID with@g.us. - Missing Required Fields: The "Link Text" and "URL" fields are mandatory; missing them will cause errors.
- Authentication Errors: Verify that the API key and instance ID credentials are correct and have not expired.
- Network Issues: Check connectivity to the WSAPI base URL.
- API Rate Limits: If sending many messages rapidly, you may hit rate limits imposed by the WSAPI provider.
- Error Messages: The node returns error messages from the WSAPI in the output JSON under an
errorfield if the request fails. Review these messages for specific issues.
Links and References
- WhatsApp Business API Documentation
- WSAPI service documentation (refer to your WSAPI provider's official docs for detailed API usage)