Actions21
- Message Actions
- Group Actions
- Chat Actions
- Contact Actions
Overview
This node integrates with the Green API service to send and manage WhatsApp messages and related entities such as groups, chats, and contacts. Specifically for the Message - Upload File operation, it uploads a file from the user's local system to the Green API cloud storage. This is useful when you want to store media files in the cloud before sending them via WhatsApp or managing them through the API.
Common scenarios include:
- Uploading images, videos, or documents to the Green API cloud to reuse or share later.
- Preparing files for subsequent sending operations without embedding the file data directly in the message.
- Managing media assets centrally in your automation workflows.
Example: Upload a product brochure PDF stored locally so it can be sent to customers via WhatsApp messages in later steps.
Properties
| Name | Meaning |
|---|---|
| File Path | Path to the file on your system that you want to upload (e.g., C:/path/to/file.jpg). |
Output
The node outputs a JSON array where each item corresponds to the response from the Green API after uploading a file. The exact structure depends on the API response but typically includes metadata about the uploaded file such as its ID, URL, or status.
If the input contains binary data under the key "data", the node uses this binary content for the upload instead of reading from the file path.
No binary output is produced by this node; it only returns JSON metadata about the uploaded file.
Dependencies
- Requires an active Green API account with valid credentials (instance ID and API token).
- Needs the user to provide these credentials in n8n's credential manager.
- Access to the local filesystem to read the file specified by the "File Path" property unless binary data is provided as input.
- Uses the Green API REST endpoints for file upload.
Troubleshooting
- Failed to read file: If the file path is incorrect or inaccessible, the node will throw an error indicating it cannot read the file. Ensure the path is correct and accessible by n8n.
- Failed to upload file: Network issues, invalid credentials, or API limits may cause upload failures. Check your Green API credentials and network connectivity.
- Binary data not found: If you intend to upload binary data from previous nodes but the expected binary property (
data) is missing, the node falls back to reading from the file path. Make sure the binary data is correctly passed. - Invalid file format or size: The Green API might reject unsupported file types or files exceeding size limits. Verify the file meets API requirements.
Links and References
- Green API Documentation — Official API docs for details on endpoints and parameters.
- WhatsApp Business API Media Management — General reference for WhatsApp media handling concepts.