OpenWA icon

OpenWA

Interact with OpenWA WhatsApp API Gateway

Actions138

Message → Send Document

AI-generated

Summary

Send a document to a WhatsApp chat through the selected OpenWA session. Choose the document source as a URL, base64 data, or an incoming binary property; optionally set its filename, caption, quoted message, and mentions.

Inputs

  • Session Name or ID (required) — Session to send from; choose a listed session or provide its ID.
  • Chat Name or ID (required) — Recipient chat, such as a personal chat ID ending in @c.us or a group ID ending in @g.us; use an expression for IDs not listed.
  • Document Source — Choose URL, Base64, or Binary Data. Defaults to URL.
  • Document URL (required) — URL of the document; shown when Document Source is URL.
  • Base64 Data (required) — Base64-encoded document content; shown when Document Source is Base64.
  • MIME Type (required) — MIME type for base64 content, such as application/pdf; shown when Document Source is Base64.
  • Binary Property (required) — Name of the incoming binary property containing the document; shown when Document Source is Binary Data.
  • Filename — Filename shown to the recipient. If cleared, the node uses the binary file's name or a plausible filename at the end of the URL; otherwise it uses document.pdf.
  • Caption — Optional caption accompanying the document.
  • Quoted Message ID — Optionally reply to an earlier message by quoting its ID. The ID must be resolvable by the engine, and Baileys can quote only messages it has stored.
  • Mentions — WhatsApp IDs to mention, entered as a comma-separated list, JSON array, or expression resolving to an array. The caption must also contain matching @-mention tokens for the mentions to render.

Output shape

A single output item containing the send endpoint's response.

The source converts binary input to base64 and supplies a MIME type, defaulting to application/pdf if the binary item has none. A blank Filename falls back to a detected filename or document.pdf.

Links

Discussion