send_group_file
Send one real file — a document such as a PDF, an image, or a video — from the workspace's WhatsApp number into one WhatsApp group, after the user confirms. Every member of that group receives it and it cannot be recalled. file_url must be a DIRECT url to the file: if the file is a Google Drive / Dropbox share link, or only exists as bytes you generated, call upload_file first (pass the link as source_url) and use the url and filename it returns. Works on a number connected by QR code, and on an official green-tick Cloud API number (not Coexistence) for groups created with Meta's Groups API (their chat_id contains letters). Identify the group with "group_id", set to the group's "chat_id" from get_groups (e.g. 120363041234567890@g.us); "chat_id" is accepted as an alias. Group names are not accepted. One group per call: not a broadcast tool. For text only, use send_group_message.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_url": "<file_url>",
"confirm": "<confirm>"
},
"name": "send_group_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caption | No | Optional text shown with the file in the group. | |
| chat_id | No | Alias of "group_id", accepted because get_groups calls this value "chat_id". Pass the group in "group_id" OR "chat_id", not both. | |
| confirm | Yes | Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to post this file into the group. | |
| file_url | Yes | Direct https url of the file — typically the `url` returned by upload_file. Not a Drive/Dropbox/OneDrive share page. | |
| filename | No | Display name INCLUDING the extension (e.g. "proposal.pdf") — pass the `filename` upload_file returned. WhatsApp uses the extension to pick the file type, so a name without one arrives as an unopenable "BIN" attachment and is refused. Required whenever file_url has no filename in its path. | |
| group_id | No | The group's "chat_id" exactly as returned by get_groups (e.g. 120363041234567890@g.us), for ONE group. The digits without @g.us are also accepted. Group names and the numeric "id" field are refused. This is the preferred argument. | |
| media_type | No | How WhatsApp shows it: "document" (default — a downloadable file with its name, right for PDFs and office files), "image" (shown inline; jpg/png/webp) or "video" (played inline; mp4). |