Actions50
- Account Actions
- Call Actions
- Chat Actions
- Contact Actions
- Group Actions
- Instance Actions
- Media Actions
- Message Actions
- Session Actions
- User Actions
Overview
The node integrates with the WSAPI WhatsApp API to send a link preview message to a specified WhatsApp contact or group. It is useful for automating the sharing of URLs within WhatsApp conversations, such as sending product links, event invitations, or informational resources directly through WhatsApp chats.
Practical examples include:
- Sending a promotional webpage link to customers in a WhatsApp group.
- Sharing a news article URL with individual contacts automatically.
- Distributing event registration links to multiple recipients.
Properties
| Name | Meaning |
|---|---|
| To | The WhatsApp contact ID or group ID to which the link will be sent. For contacts, use the phone number followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net). For groups, use the group ID followed by @g.us. |
| URL | The HTTP or HTTPS URL to send as a link preview message. WhatsApp will automatically generate a preview from this URL. |
| Mentions | (Advanced Option) Comma-separated list of phone numbers (without @) to mention in the message. |
| Reply To Message ID | (Advanced Option) The ID of an existing message to which this link message should reply. |
| Is Forwarded | (Advanced Option) Boolean flag indicating whether the message should be marked as forwarded. |
Output
The node outputs JSON data representing the result of the send link operation. This typically includes metadata about the sent message such as message ID, status, timestamps, and recipient information.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the WSAPI WhatsApp API service.
- Requires configuration of an API key credential for authentication with the WSAPI endpoint.
- The base URL for the WSAPI must be set in the node credentials.
Troubleshooting
- Invalid "To" format: Ensure the recipient ID follows the correct format (
phone@s.whatsapp.netfor contacts orgroup@g.usfor groups). Missing country codes or incorrect suffixes will cause errors. - Invalid URL: The URL must be a valid HTTP or HTTPS address. Invalid URLs may cause the message to fail or not display a preview.
- Authentication errors: Verify that the API key credential is correctly configured and has sufficient permissions.
- Message sending failures: Check network connectivity and WSAPI service status if messages do not send.
- Reply to non-existent message: If specifying a reply message ID, ensure the ID exists in the chat context.
Links and References
- WhatsApp Link Preview Documentation
- WSAPI WhatsApp API Official Documentation (replace with actual URL)