WhatsWeb: Login (QR)

Pair a WhatsApp account via QR and save the session

Overview

This node facilitates pairing a WhatsApp account via QR code scanning and saving the session for subsequent use. It is useful for automating WhatsApp interactions by establishing a logged-in session without manual login each time. For example, it can be used in workflows that require sending or receiving WhatsApp messages programmatically after initial authentication.

Use Case Examples

  1. A user wants to automate sending WhatsApp messages from n8n. They use this node to scan the QR code and establish a session, which is then used by other WhatsApp nodes to send messages.
  2. A business integrates WhatsApp customer support into their workflow automation. This node handles the login process by generating a QR code for scanning and saving the session for ongoing use.

Properties

Name Meaning
Show ASCII QR in JSON Whether to include the ASCII representation of the QR code in the JSON output for easy viewing.
Wait Timeout (seconds) The maximum time in seconds to wait for the QR code scan and connection to complete before timing out. Must be between 5 and 120 seconds.

Output

Binary

Contains the QR code image in PNG format when the node outputs a QR code for scanning.

JSON

  • label - The label of the WhatsApp account or session.
  • status - The current connection status, e.g., 'connected', 'scan_qr', or 'waiting'.
  • qr - The ASCII representation of the QR code to scan (only present if 'Show ASCII QR in JSON' is enabled and QR is available).
  • lastError - Details of the last error encountered during connection or login, if any.
  • info - Additional informational message, e.g., when waiting for QR code or connection.
  • sessionDir - The directory path where the session data is stored.

Dependencies

  • Requires an API key credential for WhatsApp Web connection and license verification.

Troubleshooting

  • If the node times out waiting for the QR code, check network connectivity and session folder permissions.
  • License check failure will prevent login; ensure the license URL and key are valid and subscription is active.
  • If no QR code appears, re-run the node and verify outbound network access and session directory permissions.

Discussion