Actions29
- Chat Actions
- Contact Actions
- Group Actions
- Message Actions
- Status Actions
Message → Send File By Upload
AI-generatedOverview
This node operation sends a file to a specified WhatsApp chat by uploading the file data directly. It supports sending files either from binary data obtained from a previous node or from a file path on the system. Optional parameters include setting a custom file name and adding a caption to the file message. This operation is useful for automating the sending of documents, images, or other media files to WhatsApp contacts or groups via the Green API.
Use Case Examples
- Sending a PDF document stored as binary data from a previous node to a WhatsApp contact with a caption.
- Uploading an image file from a local file path and sending it to a WhatsApp group with a custom file name.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the WhatsApp chat to which the file will be sent. It can be a private chat (phone@c.us) or a group chat (chatId@g.us). This is a required field. |
| Input Data Type | Specifies the source of the file to send. It can be either 'Binary Data' from a previous node or a 'File Path' on the system. |
| Binary Property | The name of the binary property that contains the file data when using binary data as the input source. |
| File Path | The path to the file on the system when using file path as the input source. |
| File Name | An optional custom file name with extension to use when sending the file. |
| Caption | An optional caption text to include with the file message. |
| Override Credentials | Allows overriding the default API credentials (instance ID and API token) for this specific operation. |
Output
JSON
sentMessage- The response from the Green API after sending the file by upload, containing details about the sent message.
Dependencies
- Green API service with instance ID and API token credentials
Troubleshooting
- Ensure the file path is correct and accessible when using 'File Path' input data type to avoid file read errors.
- Verify that the binary property name matches the property containing the file data in the input when using 'Binary Data' input type.
- Check that the API credentials (instance ID and API token) are valid and have the necessary permissions.
- Common error messages include failures to read the file, invalid input data type selection, and API request failures. These can be resolved by correcting the input parameters and verifying network/API access.