Wappfy icon

Wappfy

Interact with WhatsApp through Wappfy API

Overview

This node enables sending files as messages through WhatsApp using the Wappfy API. It supports sending documents or any file type to individual or group chats by specifying the chat ID and providing the file either via a URL or as Base64-encoded data. This is useful for automating the distribution of reports, contracts, images, PDFs, or any other file types directly within WhatsApp conversations.

Practical examples:

  • Sending an invoice PDF to a customer after a purchase.
  • Sharing a product catalog document with a sales group.
  • Distributing event brochures or flyers to a WhatsApp broadcast list.

Properties

Name Meaning
Chat ID The identifier of the chat where the file will be sent. Format examples: 123456789@c.us (direct), 123456789@g.us (group).
Media Source The source of the file to send. Options: URL (provide a direct link to the file), Base64 (provide the file content encoded in Base64).
File URL The URL of the file to send. Required if Media Source is URL.
Base64 Data The Base64 encoded content of the file. Required if Media Source is Base64.
File Name The name of the file including extension (e.g., document.pdf). Used only when Media Source is Base64. Defaults to "file".
MIME Type The MIME type of the file (e.g., application/pdf, image/jpeg, video/mp4). Required.
Caption Optional caption text to accompany the file message.

Output

The node outputs JSON data representing the response from the Wappfy API after attempting to send the file. This typically includes details about the sent message such as message ID, status, timestamps, or error information if the operation failed.

No binary data output is produced by this node; it handles file sending via API calls rather than returning file content.

Dependencies

  • Requires a valid Wappfy API credential with:

    • Base URL of the Wappfy API instance.
    • Instance name identifying the WhatsApp session.
    • An API key for authentication.
  • The node makes HTTP requests to the Wappfy API endpoints to perform actions.

  • Proper network connectivity to the Wappfy API service is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing chat ID: Ensure the chat ID is correctly formatted and corresponds to an active WhatsApp chat.
    • Incorrect MIME type: Provide the correct MIME type matching the file content to avoid rejection.
    • File URL inaccessible: If using a URL, verify that the URL is publicly accessible and points directly to the file.
    • Base64 data malformed: When using Base64, ensure the data is properly encoded without extra characters or line breaks.
    • API authentication errors: Confirm that the API key and instance name are correctly configured in credentials.
  • Error messages:

    • Authentication failures usually indicate invalid API keys or expired sessions.
    • HTTP 400 errors may indicate missing required parameters or invalid input formats.
    • Network timeouts suggest connectivity issues with the Wappfy API endpoint.
  • Resolution tips:

    • Double-check all required fields before execution.
    • Test file URLs independently in a browser to confirm accessibility.
    • Validate Base64 strings with online tools.
    • Review API key permissions and regenerate if necessary.

Links and References

Discussion