Actions67
- Account Actions
- Action Actions
- Analytics Actions
- Block Number Actions
- Campaign Actions
- Campaign Group (Release Group) Actions
- Direct Message Actions
- Group Actions
- Media Actions
- Message Template Actions
- Template Folder Actions
- Variable Actions
- Verification Actions
- Workflow (Preset) Actions
Action → Send Document Message
AI-generatedSummary
Send a document to selected groups in a campaign
Inputs
- releaseId (required) — Identifier of the campaign; can be a static ID or a dynamic expression.
- accountId — WhatsApp account to use for sending; optional — if omitted, default accounts are used.
- chooseSpecificGroups — When true, only groups listed in 'groupIds' are targeted; otherwise all campaign groups receive the message.
- groupIds — Array of group IDs to target when 'chooseSpecificGroups' is true; loaded based on the selected campaign.
- documentUrl (required) — Public URL of the document (PDF, image, etc.) to be sent.
- fileName (required) — Filename displayed to recipients (e.g., 'contrato.pdf').
- documentOptions — Additional options for the document message, such as caption, scheduling, and shipping speed settings.
Output shape
a single record representing the sent document message
The response contains the API result (typically includes messageId and status); optional shipping parameters affect delivery speed but do not alter the returned shape.
Examples
Example 1: Send a contract PDF to a specific group within a campaign using the default account
releaseId: '12345'; documentUrl: 'https://example.com/contract.pdf'; fileName: 'contrato.pdf'; chooseSpecificGroups: true; groupIds: ['group_987']; documentOptions: { caption: 'Confirmação', shippingSpeed: 'normal' }
Example 2: Schedule a document message for future delivery with custom speed limits
releaseId: '67890'; documentUrl: 'https://example.com/report.pdf'; fileName: 'report.pdf'; chooseSpecificGroups: false; documentOptions: { scheduledTo: '2025-12-31T10:00:00Z', shippingSpeed: 'custom', customSpeedMin: 5, customSpeedMax: 15 }
Example 3: Send the same document to all groups of a campaign using a specific account
releaseId: '54321'; accountId: 'account_1122'; chooseSpecificGroups: false; documentUrl: 'https://example.com/brochure.pdf'; fileName: 'brochure.pdf'; documentOptions: { caption: 'Promoção', shippingSpeed: 'fast' }
