OpenWA icon

OpenWA

Interact with OpenWA WhatsApp API Gateway

Actions164

Message → Send Text

AI-generated

Summary

Send a text message from the chosen WhatsApp session to a chat. Optionally quote an earlier message, control URL previews, attach a Baileys-only custom preview card, and @mention recipients. Supports an optional Idempotency Key on OpenWA 0.25.0 or later to safely retry sending the same message without duplication.

Inputs

  • Session Name or ID (required) — The ID of the session to send from. Choose from the list, or specify an ID using an expression.
  • Chat Name or ID (required) — The recipient chat ID, such as 628123456789@c.us for personal or ...@g.us for groups. The picker lists only the first 1000 chats; use an expression for others.
  • Idempotency Key — Optional key of 1-255 visible ASCII characters without spaces. On OpenWA 0.25.0 or later, retrying the same request with the same key within 24 hours returns the first result without sending again. Keys are unique per session; use distinct keys per message and reuse only for retries. Different body or route with same key returns 422; in-progress or uncertain send returns 409. Older servers ignore this header.
  • Message (required) — The text message to send. Leading and trailing whitespace are preserved; objects are rejected.
  • Quoted Message ID — Optionally quote an earlier message so a reply can carry media, a location, a contact or a poll, not just text. Leaving empty sends without quoting. An unresolved ID fails the send rather than going out unquoted. Baileys can only quote stored messages.
  • Link Preview — Whether a URL in the message renders a preview card. Engine Default sends nothing, so the session's Link Preview setting applies when it has one (OpenWA 0.30.3 or later), and otherwise the engine decides: whatsapp-web.js builds one unless told not to, while on Baileys previews are opt-in. Choosing Generate a Preview on Baileys makes the server fetch the first URL in the message before sending, which stalls the send on a slow or dead link.
  • Custom Link Preview — Baileys only: attach a custom preview card with URL and title (both required), optional description, and optional thumbnail URL or Base64 (requires OpenWA 0.27.0 or later). The URL must also appear literally in the message text. whatsapp-web.js returns 501 if this option is used.
  • Mentions — Full WhatsApp IDs including domain (e.g. 628123456789@c.us) to @mention, as a comma-separated list, JSON array, or an expression resolving to an array. The message text or caption must contain matching @-mention tokens for them to render.

Output shape

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

The node's output item shape depends on the endpoint response. The source does not specify a fixed response schema for Send Text.

Links

Discussion