Green API icon

Green API

Send WhatsApp messages via Green API

Message → Send File By URL

AI-generated

Overview

This node operation sends a file to a specified WhatsApp chat using a file URL via the Green API. It allows users to specify the chat ID, the URL of the file to send, the file name, and an optional caption. This is useful for automating the sending of media files hosted online without needing to upload them manually. For example, sending an image or document link directly to a contact or group chat.

Use Case Examples

  1. Sending an image from a public URL to a WhatsApp group with a caption.
  2. Automating the delivery of PDF files to clients by sending the file URL to their chat ID.

Properties

Name Meaning
Chat ID The identifier of the chat to which the file will be sent. For private chats, use phone@c.us format; for group chats, use chatId@g.us format.
File URL The URL of the file to be sent to the chat.
File Name The name to assign to the file being sent.
Caption An optional caption to accompany the file.
Quoted Message ID Optional ID of a message to quote in the chat when sending the file.

Output

JSON

  • sentFileResponse - Response object from the Green API after sending the file by URL, containing details about the sent message.

Dependencies

  • Green API credentials including instance ID and API token

Troubleshooting

  • Ensure the file URL is accessible and publicly reachable; otherwise, the API call will fail.
  • Verify that the chat ID is correctly formatted and corresponds to an existing chat.
  • Check that the Green API credentials (instance ID and API token) are valid and have the necessary permissions.
  • Common error messages include failures to send the file due to network issues or invalid parameters; the node error messages include the data sent for easier debugging.

Discussion