WAHA API icon

WAHA API

Complete WhatsApp automation with WAHA API - Multi-engine support

Overview

This node integrates with the WAHA API to send WhatsApp messages, specifically supporting sending images in this context. It allows users to send image messages to individual chats or groups on WhatsApp by providing the chat ID and the image file URL or base64 data. This is useful for automating multimedia communication such as marketing campaigns, customer support with visual content, or sharing product images automatically.

For example, a business could use this node to automatically send promotional images to customers who have opted in, or a support team could send screenshots or photos directly through WhatsApp during troubleshooting.

Properties

Name Meaning
Session Name The name of the WhatsApp session to use for sending the message. Defaults to a configured default session.
Chat ID The WhatsApp chat identifier where the image will be sent. This can be a phone number with @c.us suffix or a group ID with @g.us.
File URL/Path The URL or base64-encoded data of the image file to send.
Caption Optional text caption to accompany the image.
Additional Fields A collection of optional fields:
- Filename: Custom filename for the media file.
- Mimetype: MIME type of the file.
- Link Description: Description for link preview (not used here).
- Link Title: Title for link preview (not used here).
- Contact Name: Name for contact vCard (not used here).
- Contact Number: Phone number for contact vCard (not used here).
- Reaction: Emoji reaction to send (not used here).
- Limit: Limit number of results (not used here).
- Download Media: Whether to download media files in messages (not used here).

Output

The node outputs a JSON object representing the response from the WAHA API after attempting to send the image message. This typically includes details about the message status, IDs, timestamps, or error information if the request failed.

No binary data output is produced by this operation; all responses are JSON-formatted metadata about the sent message.

Example output structure (simplified):

{
  "messageId": "string",
  "status": "sent",
  "chatId": "string",
  "timestamp": "ISO8601 string"
}

Dependencies

  • Requires an active WAHA API credential with a valid base URL and API key.
  • Optionally uses an additional API key credential for validating subscription via the n8n Tools API.
  • The WhatsApp session specified must be active and connected.
  • Network access to the WAHA API endpoints is required.

Troubleshooting

  • Invalid Subscription or API Key: If the node throws an error related to invalid subscription or API key, verify that both the WAHA API credentials and the optional n8n Tools API credentials are correctly configured and active.
  • Session Not Found or Inactive: Ensure the WhatsApp session name provided exists and is currently connected.
  • Invalid Chat ID: The chat ID must be correctly formatted (e.g., 5511999999999@c.us for individual or groupid@g.us for groups).
  • File URL Issues: The file URL must be accessible and point to a valid image file or contain valid base64 data. Invalid URLs or unsupported formats will cause failures.
  • API Request Failures: Check network connectivity and API endpoint availability. Also, ensure the API key has sufficient permissions.

Links and References


This summary focuses on the "Message" resource and "Send Image" operation as requested.

Discussion