Upload WhatsApp Media
Description
Uploads the contents of a File reference to WhatsApp Business and returns a Media ID for sending that media in a message.
Configuration
Select a tested WhatsApp connection and configure:
| Input | Description |
|---|---|
| Connection Name | Required WhatsApp connection. |
| File | Required file reference from an upstream file-producing activity. Base64 text is not accepted in this input. |
| MIME Type | Optional override; otherwise taken from the file metadata. Supply it if the metadata has no content type. |
| File Name | Optional override; otherwise taken from the file metadata. |
| Caption | Optional caption submitted with the upload request. Configure the message caption separately when sending the media. |
The source file's storage provider must be accessible when the activity executes. File bytes are read for the upload; the source file is not removed.
Outputs
| Output | Description |
|---|---|
| Media ID | Identifier assigned to the uploaded media. |
| Raw JSON Response | WhatsApp upload response. |
Example: Upload and send a document
- Obtain a PDF File from a storage or document activity.
- Bind it to File and select the WhatsApp connection. Set MIME Type to
application/pdfif the file metadata does not supply it. - Add Send WhatsApp Message, select Document, and bind this activity's Media ID to that activity's Media ID.
- Set To, Filename, and the optional message Caption, then run with a test recipient.
Use media formats and sizes accepted by the connected WhatsApp Business account. Handle rejected uploads through On Error.