Actions90
- Sessions Actions
- Messages - Sending Actions
- Chats Actions
- Messages - Actions Actions
- Groups Actions
- List Groups
- Group Info
- Get Invite Link
- Revoke Invite Link
- Join via Link
- Preview via Link
- Create Group
- Delete Group
- Update Group Description
- Toggle Announcement Mode
- List Participants
- Add Participants
- Remove Participants
- Demote Participants
- Approve Join Request
- Reject Join Request
- List Join Requests
- Get Group Picture
- Set Group Picture
- Delete Group Picture
- Leave Group
- Update Group Name
- Lock Group Edits
- Promote Participants
- Profile Actions
- Server Actions
- Miscellaneous Actions
Overview
This node operation sends a document message via the WARest WhatsApp REST API. It allows users to specify a session, recipient, and document to send, supporting both URL/path and binary data inputs. Additional options include setting a caption, custom filename, and message-related fields like replying to a message or marking it as forwarded. This node is useful for automating document sharing on WhatsApp, such as sending invoices, reports, or contracts directly from workflows.
Use Case Examples
- Sending a PDF invoice to a customer by specifying the session, recipient phone number, and document URL.
- Sending a locally stored document as a binary file with a custom filename and caption to a WhatsApp contact.
- Replying to a specific message with a forwarded document attachment.
Properties
| Name | Meaning |
|---|---|
| Session | The WhatsApp session to use for sending the document, selected from existing sessions or entered manually. |
| Recipient / Chat (to) | The phone number or JID of the recipient or chat to send the document to. |
| Binary File | Toggle to enable sending the document from a binary property instead of a URL or path. |
| Document | The URL, local path, or base64 data URI of the document to send when not using binary input. |
| Document Binary Property | The name of the binary property containing the document data when using binary input mode. |
| Caption | Optional caption text to include with the document message. |
| Custom Filename | Enable to override the default filename for the uploaded document. |
| Filename | The custom filename to use for the document upload when overriding is enabled. |
| Additional Fields | Extra message options such as sending typing indicators, replying to a specific message ID, or marking the message as forwarded. |
Output
JSON
json- The JSON response from the WARest API containing details about the sent document message.
Dependencies
- WARest WhatsApp REST API
Troubleshooting
- Ensure the session ID is valid and active; invalid sessions will cause authentication errors.
- If using binary mode, verify the binary property name matches the input data exactly.
- Document URL or path must be accessible and correctly formatted; invalid URLs or paths will cause upload failures.
- When overriding filename, ensure the filename is a valid string; empty or invalid filenames may cause errors.
- If replying to a message, the replyMessageId must be a valid message ID in the chat context.
Links
- WARest API - Send Document - Official documentation for sending document messages using the WARest WhatsApp REST API.
