WhatMaster icon

WhatMaster

Integração com a API WhatMaster para envio de mensagens

Overview

This node integrates with the WhatMaster API to send WhatsApp messages, specifically supporting multiple message types including text, files, stickers, and locations. The "Enviar Arquivo URL" operation under the "Mensagem" resource allows users to send a file by providing its URL directly, without uploading the file content.

Common scenarios for this node include automating WhatsApp communications such as sending notifications, alerts, or media files hosted online to customers or contacts. For example, a business can automatically send product brochures or invoices hosted on their server via WhatsApp by specifying the file URL.

Properties

Name Meaning
Número do WhatsApp The recipient's WhatsApp number in international format (e.g., 5511999999999).
Mensagem The text message body to accompany the file being sent.
External Key An optional external key to associate with the message for tracking or referencing.
URL do Arquivo The URL of the file to be sent via WhatsApp. This is required for the "Enviar Arquivo URL" operation.

Output

The node outputs JSON data representing the response from the WhatMaster API after attempting to send the message. The structure depends on the API response but generally includes confirmation details about the sent message.

No binary data output is produced by this operation since the file is referenced by URL rather than uploaded.

Example output snippet (conceptual):

{
  "messageId": "abc123",
  "status": "sent",
  "number": "5511999999999",
  "body": "Your message text here",
  "mediaUrl": "https://example.com/file.pdf"
}

Dependencies

  • Requires configuration of WhatMaster API credentials, including:
    • A Bearer token for authorization.
    • An external code identifier used in the API endpoint URL.
  • The node makes HTTP POST requests to the WhatMaster API endpoint:
    https://back.whatmaster.com.br/v1/api/external/{externalCode}

Troubleshooting

  • Missing Credentials: Errors like "No credentials found" or missing bearer token/external code indicate that the WhatMaster API credentials are not properly configured. Ensure credentials are set up in n8n before running the node.
  • Required Parameters Missing: If the WhatsApp number, message body, or media URL is empty or invalid, the node will throw errors indicating which parameter is mandatory.
  • Unsupported Operation: Using an operation not supported for the "Mensagem" resource will result in an error.
  • Network or API Errors: Failures in HTTP requests to the WhatMaster API may occur due to network issues or invalid tokens; check connectivity and credential validity.

Links and References

Discussion