Wuzapi Session icon

Wuzapi Session

Manage WhatsApp sessions in Wuzapi

Overview

This node manages WhatsApp sessions using the Wuzapi service. It allows you to connect and disconnect from WhatsApp servers, retrieve QR codes for pairing devices, check connection status, configure proxy settings, and manage storage and messaging configurations such as S3 and RabbitMQ. The "Connect" operation specifically establishes a connection to WhatsApp servers and can subscribe to various event types related to WhatsApp activity.

Common scenarios where this node is beneficial include:

  • Automating WhatsApp session management in workflows.
  • Monitoring WhatsApp connection events and statuses.
  • Integrating WhatsApp messaging with other systems via event subscriptions.
  • Configuring media storage and message queueing for scalable WhatsApp integrations.

Practical example: Use the "Connect" operation to establish a WhatsApp session and subscribe to incoming message events and presence updates, enabling real-time processing of messages and user online status changes within an automation workflow.

Properties

Name Meaning
Wait for Connection Whether to wait for the actual WhatsApp connection status before returning or return immediately.
Subscribe to Events Event types to subscribe to; options include all events or specific ones like Message, Connected, Disconnected, QR code generation, etc.

The "Subscribe to Events" property supports multiple selections from a comprehensive list of WhatsApp-related event types, such as:

  • All (subscribe to all event types)
  • App State changes
  • Call events (accept, offer, terminate)
  • Chat presence and typing indicators
  • Connection status events (Connected, Disconnected, Connect Failure)
  • Message events (incoming messages, read receipts, delivery receipts)
  • Group notifications
  • Privacy and profile updates
  • And many more detailed WhatsApp event categories

Output

The node outputs JSON data representing the response from the Wuzapi API corresponding to the requested operation. For the "Connect" operation, the output includes details about the connection attempt and subscribed events.

If the node handles binary data (e.g., when retrieving a QR code in other operations), it encodes the image in base64 format with appropriate MIME type and file extension metadata. However, for the "Connect" operation specifically, the output is purely JSON without binary content.

Dependencies

  • Requires an API key credential for authenticating with the Wuzapi service.
  • Depends on the Wuzapi API endpoints to manage WhatsApp sessions.
  • No additional environment variables are explicitly required for the "Connect" operation.
  • Network connectivity to Wuzapi's API endpoints must be available.

Troubleshooting

  • Connection failures: If the node returns errors related to connection attempts, verify network access and correct API credentials.
  • Subscription issues: Ensure that the selected event types are valid and supported by the Wuzapi service.
  • Timeouts: If "Wait for Connection" is enabled, long delays may occur if the WhatsApp server is slow to respond; consider disabling this option for immediate returns.
  • API errors: Errors returned from the Wuzapi API will be included in the node output; review error messages for guidance.
  • Credential problems: Invalid or missing API authentication tokens will prevent successful connections.

Links and References

  • Wuzapi Official Documentation (replace with actual URL if available)
  • WhatsApp Business API documentation for understanding event types and session management concepts.
  • n8n documentation on creating and managing custom nodes and credentials.

Discussion