App Logo
web.whatsapp.com

Send WhatsApp message or attachment

Automatically send WhatsApp message or attachment on web.whatsapp.com. Send a WhatsApp message to a chat, given by its `chatId` from get_inbox, or to a phone number in international format that has no chat yet. The message is a text, an image, a video or a document with an optional caption, or a saved contact's card. Returns the new message's id, which delete_message and react_to_message take, with the time, the delivery status and the account that sent it. The run succeeds only when WhatsApp's server has acknowledged the message, and fails if WhatsApp marks it as failed. With dry_run, the chat is opened and the message prepared, and nothing is sent. Confirm the recipient with the user before sending. If WhatsApp Web is open in another tab of the same browser, the run stops and asks to close that tab.

Input

kind required

What to send: a text, an attached file of that kind, or a saved contact's card.

text optional

The message text, for kind text.

phone optional

Recipient phone in international format, for a number with no chat yet, e.g. "+33 6 12 34 56 78" or "0033612345678". Confirm the number with the user before sending. Give this or `chatId`.

chatId optional

The chat to send to, as get_inbox returns it in `chatId`. Give this or `phone`.

caption optional

Optional caption for an image, video or document.

dry_run optional

When true, everything runs up to the send and stops: the chat is opened and checked, the text typed or the file accepted by WhatsApp's editor, the contact found. Nothing is sent.

filename optional

Name the file is sent under, e.g. report.pdf. WhatsApp shows it on documents.

attachment optional

The file to send, for kind image, video or document.

contactName optional

Saved name of the contact whose card to send, exactly as the address book shows it, for kind contact.

Output

kind required
sent required

True once WhatsApp's server acknowledged the message. False on a dry run.

chatId required

The chat the message went to.

at optional

When it was sent, ISO datetime.

id optional

The new message's id, usable by delete_message, react_to_message and the other message scripts. Null on a dry run.

status optional

Delivery status when the run ended.

dry_run optional
recipient optional

Chat title, as the chat list shows it.

account_used optional

Phone number of the WhatsApp account that sent it, read from the live session.

FAQ

Send a WhatsApp message to a chat, given by its `chatId` from get_inbox, or to a phone number in international format that has no chat yet. The message is a text, an image, a video or a document with an optional caption, or a saved contact's card. Returns the new message's id, which delete_message and react_to_message take, with the time, the delivery status and the account that sent it. The run succeeds only when WhatsApp's server has acknowledged the message, and fails if WhatsApp marks it as failed. With dry_run, the chat is opened and the message prepared, and nothing is sent. Confirm the recipient with the user before sending. If WhatsApp Web is open in another tab of the same browser, the run stops and asks to close that tab.
Ask an AI agent connected to Reduck to run reduck/web.whatsapp.com/send_message, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/web.whatsapp.com/send_message
You do not need one. "Send WhatsApp message or attachment" drives the real web.whatsapp.com pages in a browser, so it works whether or not web.whatsapp.com offers an API for this.
Required: kind. Optional: text, phone, chatId, caption, dry_run, filename, attachment, contactName.
It returns at, id, kind, sent, chatId, status, dry_run, recipient, account_used.
Yes. It acts as you on web.whatsapp.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the web.whatsapp.com cookies saved by the Reduck extension.
It makes changes on web.whatsapp.com, like sending, posting, booking or buying something.
Ask an AI agent connected to Reduck to run reduck/web.whatsapp.com/send_message, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/web.whatsapp.com/send_message
It is part of Reduck's official curated catalogue.

Start building not clicking