Overview
This node facilitates logging into the Zalo messaging platform using a QR code. It generates a QR code image that users can scan with their Zalo app to authenticate and obtain login credentials. The node supports using existing credentials or performing a fresh login via QR code scanning. After successful login, it can automatically save new credentials through an API if configured.
Common scenarios for this node include:
- Automating Zalo account authentication in workflows without manual password entry.
- Integrating Zalo login into custom automation pipelines.
- Managing multiple Zalo accounts by generating and storing credentials programmatically.
Practical example:
- A user wants to automate sending messages on Zalo. They use this node to log in via QR code, then subsequent nodes send messages using the authenticated session.
Properties
| Name | Meaning |
|---|---|
| Proxy | HTTP proxy URL (e.g., https://user:pass@host:port) to route Zalo API requests through. |
Output
The node outputs one item containing:
json:
success: Boolean indicating if the QR code was generated successfully.message: Informational message about the login process status.fileName: The filename of the QR code image (zalo-qr-code.png).usingExistingCredential: Boolean indicating if existing credentials were used.credentialInstructions: Instructions related to credential usage or creation.- Additional fields depending on credential source, such as credential name, ID, type, or file path for saved credentials.
autoCreateApiandautoCreateScript: Notes about automatic credential creation via API or script.
binary:
data: The QR code image data in PNG format encoded as binary, ready for further use or display.
Dependencies
- Requires access to the Zalo API, either via existing credentials or by scanning the QR code to generate new ones.
- Optionally requires an API key credential for n8n's own API to automatically create and store new Zalo credentials after login.
- Supports configuring an HTTP proxy for network requests.
- Uses external libraries including:
- A Zalo SDK wrapper for handling login and events.
- Axios for HTTP requests to n8n API.
- No internal credential names are exposed; credentials are referenced generically.
Troubleshooting
- Timeout generating QR code: If the QR code generation times out (default 30 seconds), check network connectivity and proxy settings.
- No credentials provided: If no credentials are supplied, the node falls back to QR code login but cannot reuse existing sessions.
- Credential creation failures: Errors creating credentials via the n8n API may occur if the API key or URL is incorrect or unavailable. Verify API credentials and endpoint accessibility.
- QR code expired or declined: The node logs these events; users should rescan or retry login.
- Proxy issues: Incorrect proxy URLs or authentication failures can block API requests.
- To resolve errors, ensure correct proxy configuration, valid credentials, and stable network connection.
Links and References
- Zalo Official Website
- n8n Documentation
- Axios HTTP Client
- Zalo SDK (third-party) (Note: actual repo not specified in code)