Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Message → Send File By Upload
AI-generatedOverview
This node operation sends a file to a specified WhatsApp chat by uploading the file from the user's system. It supports adding an optional caption to the file. This is useful for scenarios where users want to share local files directly through WhatsApp, such as images, documents, or other media files, with an optional descriptive caption.
Use Case Examples
- Sending a photo from a local drive to a WhatsApp contact with a caption describing the image.
- Uploading and sending a PDF document to a group chat with an optional note.
Properties
| Name | Meaning |
|---|---|
| File Path | Path to the file on the user's system to be uploaded and sent. |
| Caption | Optional caption text to accompany the file being sent. |
Output
JSON
idMessage- ID of the sent message returned by the APIstatus- Status of the file sending operationchatId- ID of the chat where the file was senttimestamp- Timestamp of when the file was sent
Dependencies
- Requires an API key credential for Green API (instance ID and API token) to authenticate requests.
Troubleshooting
- Common issues include file read errors if the file path is incorrect or inaccessible, resulting in a 'Failed to read file' error.
- API request failures due to invalid credentials or network issues, resulting in errors like 'Failed to send file by upload'.
- Ensure the file path is correct and accessible by the n8n instance.
- Check that the API credentials (instance ID and token) are valid and have the necessary permissions.
Links
- Green API Documentation - Official documentation for the Green API used to send WhatsApp messages and files.