WhatsApp API icon

WhatsApp API

Integração com WhatsApp API para envio de mensagens e gerenciamento

Overview

This node integrates with a WhatsApp API to send various types of messages and manage related entities such as contacts, tickets, sessions, and opportunities. Specifically for the Message - Send Text operation, it sends a plain text message to a specified WhatsApp number. This is useful in scenarios where automated notifications, alerts, or customer support messages need to be sent via WhatsApp.

Practical examples include:

  • Sending order confirmations or shipping updates to customers.
  • Delivering appointment reminders.
  • Notifying users about system alerts or status changes.

Properties

Name Meaning
Phone Number The recipient's WhatsApp number in international format (e.g., 5511999999999).
Message Text The content of the text message to be sent.
External Key A unique key from your system to identify this message transaction.
Close Ticket Boolean flag indicating whether to close the associated ticket after sending the message.

Output

The node outputs a JSON object containing the response from the WhatsApp API after attempting to send the message. This typically includes details about the message status, any identifiers returned by the API, and confirmation of success or failure.

If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

No binary data is output by this operation.

Dependencies

  • Requires configuration of an API authentication credential (an API key or token) for the WhatsApp API.
  • The node uses the base URL and instance ID from these credentials to construct API requests.
  • The WhatsApp API service must be accessible and properly configured to accept requests from this node.

Troubleshooting

  • Common Issues:

    • Invalid phone number format: Ensure the phone number is in the correct international format without symbols or spaces.
    • Missing or incorrect API credentials: Verify that the API key/token and instance ID are correctly set up.
    • Network connectivity problems: Confirm that the n8n instance can reach the WhatsApp API endpoint.
    • API rate limits or restrictions: Check if the WhatsApp API enforces limits on message sending frequency.
  • Error Messages:

    • Errors returned from the API will be included in the output under an error field if "Continue On Fail" is enabled.
    • Common errors might include authentication failures, invalid parameters, or quota exceeded messages.
  • Resolution Steps:

    • Double-check all input parameters for correctness.
    • Validate API credentials and permissions.
    • Review API documentation for specific error codes.
    • Enable "Continue On Fail" during testing to capture detailed error information.

Links and References

Discussion