Zalo QR Login icon

Zalo QR Login

Login to Zalo using QR code and automatically create credential

Overview

This node enables login to the Zalo platform using a QR code scan. It generates a QR code for the user to scan with their Zalo mobile app, waits for the user to confirm the login, and then retrieves login credentials (cookie, IMEI, user agent). It can optionally create a new Zalo API credential in n8n automatically after successful login. This node is useful for automating Zalo login processes in workflows, especially when API credentials are needed for subsequent Zalo API interactions.

Use Case Examples

  1. Automate Zalo login for a chatbot or messaging automation.
  2. Generate and display a QR code for user login in a workflow.
  3. Automatically create and store Zalo API credentials in n8n after login.

Properties

Name Meaning
Timeout (seconds) Maximum time to wait for the QR code to be scanned and login to complete, in seconds.
Auto Create Credential Whether to automatically create a Zalo API credential in n8n after successful login.

Output

Binary

If the QR code is generated successfully, it outputs the QR code image as binary data (PNG format) for use in workflows.

JSON

  • success - Boolean indicating if login was successful.
  • timestamp - ISO timestamp of when the login process completed.
  • message - Status message about the login process.
  • credentials
    • cookie - JSON stringified array of cookie objects received after login.
    • imei - IMEI string received after login.
    • userAgent - User agent string received after login.
    • cookieCount - Number of cookie items in the credentials.

Dependencies

  • Requires a Zalo API library for QR login and axios for HTTP requests.
  • Needs an n8n API credential to create new Zalo API credentials automatically.

Troubleshooting

  • Timeout error if QR code is not scanned within the specified timeout period.
  • Login declined error if user rejects login on mobile app.
  • QR code expired error if the QR code is not scanned in time; node must be run again to generate a new QR code.
  • Credential creation may fail if n8n API credential is missing or misconfigured; verify API URL, key, and permissions.
  • If QR code generation fails, check network connectivity and Zalo API availability.

Links

Discussion