Wappfy icon

Wappfy

Interact with WhatsApp through Wappfy API

Overview

This node interacts with WhatsApp via the Wappfy API, enabling various operations on WhatsApp entities such as sessions, messages, chats, contacts, groups, statuses, channels, profiles, linked IDs, and files. Specifically, for the Contact resource and the Get Profile Picture operation, it retrieves the profile picture of a specified contact from WhatsApp.

Common scenarios where this node is beneficial include:

  • Fetching a contact's current profile picture to display in a CRM or customer support system.
  • Refreshing cached profile pictures to ensure up-to-date visuals.
  • Automating workflows that require contact image verification or display.

Practical example:

  • A user wants to automatically update their internal database with the latest profile pictures of WhatsApp contacts. Using this node with the "Get Profile Picture" operation, they can fetch and store these images regularly.

Properties

Name Meaning
Contact ID The unique identifier or phone number of the contact whose profile picture is to be fetched.
Refresh Boolean option to specify whether to refresh the profile picture from the server (true) or use cached data (false).

Output

The node outputs JSON data representing the response from the Wappfy API for the requested operation. For the "Get Profile Picture" operation on a contact, the output JSON typically includes information about the profile picture URL or related metadata.

If the profile picture is returned as binary data (e.g., an image file), the node would handle it accordingly, but based on the code, it returns JSON with the picture URL or related info rather than raw binary data.

Example output JSON structure might look like:

{
  "profilePictureUrl": "https://example.com/path/to/profile-picture.jpg",
  "lastUpdated": "2024-06-01T12:00:00Z"
}

(Note: Actual fields depend on the Wappfy API response.)

Dependencies

  • Requires access to the Wappfy API service.
  • Needs an API key credential configured in n8n for authentication.
  • Requires configuration of the base URL and instance name for the Wappfy API in the credentials.
  • Network connectivity to the Wappfy API endpoint.

Troubleshooting

  • Common issues:

    • Invalid or missing Contact ID: Ensure the Contact ID or phone number is correctly provided.
    • Authentication errors: Verify that the API key credential is valid and properly configured.
    • Network or API endpoint unreachable: Check network connectivity and correct base URL configuration.
    • Rate limiting or quota exceeded on the Wappfy API side.
  • Error messages:

    • Errors returned by the Wappfy API will be propagated; typical messages may include "Contact not found," "Unauthorized," or "Invalid parameters."
    • If the node fails due to request errors, enabling "Continue On Fail" allows processing subsequent items without stopping the workflow.
  • Resolution tips:

    • Double-check input parameters for correctness.
    • Confirm API credentials and permissions.
    • Review API documentation for limits and error codes.
    • Use the "Refresh" property to force fetching the latest picture if stale data is suspected.

Links and References

Discussion