Wuzapi Session icon

Wuzapi Session

Manage WhatsApp sessions in Wuzapi

Overview

This node manages WhatsApp sessions using the Wuzapi service, providing various operations to control and configure the session. The Configure RabbitMQ operation specifically allows users to enable or disable RabbitMQ event publishing and set up detailed RabbitMQ connection parameters. This is useful for scenarios where WhatsApp events need to be published to a message broker for further processing, integration with other systems, or real-time event handling.

Practical examples include:

  • Publishing incoming WhatsApp messages or presence updates to a RabbitMQ exchange for downstream processing.
  • Configuring queues and routing keys dynamically based on user or event type placeholders.
  • Enabling durable queues and exchanges to ensure message persistence in case of broker restarts.

Properties

Name Meaning
RabbitMQ Enabled Boolean flag to enable or disable RabbitMQ publishing.
Host RabbitMQ server hostname or IP address (e.g., localhost).
Port RabbitMQ server port number (default 5672).
Username Username for authenticating with RabbitMQ.
Password Password for authenticating with RabbitMQ.
Virtual Host RabbitMQ virtual host to connect to (default /).
Exchange Name of the RabbitMQ exchange where events will be published (e.g., whatsapp.events).
Exclusive Whether the queue should be exclusive to the connection (boolean).
No Wait Whether to wait for server confirmation when declaring queues/exchanges (boolean).
Delivery Mode Message delivery mode: either Non-Persistent (1) or Persistent (2). Persistent messages survive broker restarts.
Routing Key Routing key pattern for publishing messages; supports {event_type} placeholder substitution (e.g., whatsapp.{event_type}).
Queue Queue name pattern; supports {user_id} placeholder substitution (e.g., whatsapp.user.{user_id}).
Durable Whether the exchange and queue should be durable (survive broker restarts).
Auto Delete Whether the exchange and queue should auto-delete when unused (boolean).
Events List of event types to publish to RabbitMQ. Options include: All, Chat Presence, Connected, Disconnected, Group Info, Message, Presence, QR Code, Receipt.

Output

The node outputs JSON data representing the response from the Wuzapi API after configuring RabbitMQ settings. This typically includes confirmation of the configuration status or error details if the operation failed.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Wuzapi API credential configured in n8n for authentication.
  • Depends on access to a RabbitMQ server with credentials and network connectivity as specified in the input properties.
  • The node communicates with the Wuzapi backend via HTTP requests to manage session and RabbitMQ configurations.

Troubleshooting

  • Connection failures: If the node cannot connect to RabbitMQ, verify that the host, port, username, password, and virtual host are correct and accessible from the n8n environment.
  • Authentication errors: Incorrect username or password will cause authentication failures. Double-check credentials.
  • Invalid configuration: Missing required fields like exchange name or invalid routing/queue patterns may cause errors.
  • Permission issues: Ensure the RabbitMQ user has sufficient permissions to declare exchanges, queues, and publish messages.
  • Placeholder usage: Make sure placeholders like {event_type} and {user_id} are used correctly in routing key and queue names.
  • API errors: Errors returned from the Wuzapi API will be included in the node output. Review these messages for specific issues.

Links and References

Discussion