WAHA API icon

WAHA API

Complete WhatsApp automation with WAHA API - Multi-engine support

Overview

This node integrates with the WAHA API to automate WhatsApp interactions. Specifically, the "Get Contact Photo" operation under the "Contact" resource retrieves the profile photo of a specified WhatsApp contact. This is useful in scenarios where you want to display or process a contact's profile image within your workflow, such as syncing contact photos to a CRM, generating reports, or personalizing messages.

Practical example:

  • Automatically fetch and store the profile pictures of new contacts added to your WhatsApp session for use in customer profiles.
  • Use the contact photo to enrich notifications or alerts sent via other channels.

Properties

Name Meaning
Session Name The name of the WhatsApp session to use (defaults to a configured default session).
Chat ID The WhatsApp chat ID of the contact whose photo you want to retrieve (e.g., phone number with @c.us).
Additional Fields Optional extra parameters; for this operation, no specific additional fields are required.

Output

The output JSON contains the response from the WAHA API for the contact photo request. Typically, this will include metadata about the contact's profile photo and possibly a URL or base64 data representing the image itself.

If the API returns media content, it may be included as a downloadable link or encoded data depending on the API response format.

Dependencies

  • Requires an active WAHA API credential with a valid base URL and API key.
  • Optionally uses an additional API key credential for N8N Tools API validation.
  • The node requires proper configuration of the WhatsApp session identified by the "Session Name".
  • Network access to the WAHA API endpoints.

Troubleshooting

  • Invalid Credentials: If the node throws errors related to authentication, verify that both the WAHA API and optional N8N Tools API credentials are correctly set up and have valid keys.
  • Unknown Resource or Operation: Errors indicating unknown resources or operations suggest misconfiguration of the "Resource" or "Operation" properties.
  • Chat ID Format: Ensure the Chat ID is correctly formatted (e.g., 5511999999999@c.us).
  • Session Issues: If the session is not active or incorrectly named, the API call will fail. Confirm the session exists and is running.
  • API Rate Limits or Downtime: Temporary failures might occur due to API limits or service downtime; retry after some time.

Links and References

Discussion