N8N Tools - Uazapi icon

N8N Tools - Uazapi

Complete Uazapi integration - Premium WhatsApp API with advanced messaging and automation

Overview

This node integrates with the Uazapi WhatsApp API, enabling users to manage and interact with a WhatsApp instance programmatically. Specifically, the Instance - Get Status operation retrieves the current connection status of the WhatsApp instance. This is useful for monitoring whether the WhatsApp service is connected and operational.

Common scenarios include:

  • Checking if the WhatsApp instance is online before sending messages.
  • Monitoring the health of the WhatsApp connection in automation workflows.
  • Triggering alerts or alternative actions if the instance is disconnected.

Example use case:

  • Before sending bulk notifications via WhatsApp, the workflow checks the instance status to ensure messages will be delivered successfully.

Properties

Name Meaning
Additional Fields Optional extra parameters to customize the request. Options include:
- Reply to Message ID: ID of message to reply to
- Delay (seconds): Delay before sending message
- Disable Link Preview: Whether to disable link previews in messages (true/false)
- Mention Users: Comma-separated phone numbers to mention in the message

Output

The output JSON contains the response from the Uazapi API endpoint /v1/instance/status. It typically includes details about the WhatsApp instance's connection state, such as whether it is connected, disconnected, or in another status.

The exact structure depends on the API but generally provides:

  • Connection status
  • Instance identifier
  • Possibly timestamps or error messages if disconnected

No binary data is returned by this operation.

Example output snippet (illustrative):

{
  "status": "connected",
  "instance": "your-instance-id",
  "lastSeen": "2024-06-01T12:00:00Z"
}

Dependencies

  • Requires an active Uazapi WhatsApp API account.
  • Needs credentials including:
    • An API key credential for authentication.
    • API URL endpoint.
    • API token for bearer authorization.
    • Instance ID identifying the WhatsApp instance.
  • The node uses an internal proxy service (https://n8ntools.io/api/v1/proxy/uazapi) to forward requests securely.
  • Proper configuration of these credentials in n8n is mandatory.

Troubleshooting

  • Common issues:

    • Invalid or expired API token causing authentication failures.
    • Incorrect instance ID leading to "instance not found" errors.
    • Network connectivity problems preventing access to the Uazapi service.
    • Insufficient permissions on the API key.
  • Error messages:

    • "Unauthorized" or "Invalid token": Check API token validity and update credentials.
    • "Instance not found": Verify the instance ID is correct and active.
    • "Network error" or timeouts: Ensure network connectivity and that the proxy service is reachable.
  • Resolution tips:

    • Re-authenticate or regenerate API tokens if expired.
    • Confirm instance ID from your Uazapi dashboard.
    • Test connectivity outside n8n using tools like curl or Postman.
    • Enable "Continue On Fail" in the node settings to handle intermittent errors gracefully.

Links and References

Discussion