Overview
This node facilitates logging into the Zalo messaging platform using a QR code. It generates a QR code that users can scan with their Zalo app to authenticate and obtain login credentials. The node supports using existing credentials or an API key credential for authentication, but if none are provided, it falls back to generating a fresh QR code login session.
Common scenarios where this node is beneficial include:
- Automating Zalo account login in workflows without manual password entry.
- Integrating Zalo login into broader automation pipelines.
- Refreshing or obtaining new Zalo API credentials programmatically.
Practical example:
- A user wants to automate sending messages via Zalo. They use this node to log in by scanning the generated QR code, which then provides the necessary credentials for subsequent API calls.
Properties
| Name | Meaning |
|---|---|
| Proxy | HTTP proxy URL (e.g., https://user:pass@host:port) to route Zalo API requests through. |
Output
The node outputs a JSON object and binary data representing the QR code image:
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.credentialName,credentialId,credentialType: Metadata about the credentials used (if any).credentialFilePath: Path to saved credentials file if credentials are saved locally.autoCreateScript: Script name for manual credential creation fallback.autoCreateApi: Information about automatic credential creation via n8n API.
binary:
data: The QR code image in PNG format encoded as binary data, ready for display or download.
Dependencies
- Requires access to the Zalo SDK library for handling login and QR code generation.
- Optionally requires credentials for:
- An API key credential to connect with Zalo API.
- An n8n account credential for managing credentials via n8n API.
- Supports configuring an HTTP proxy for network requests.
- Uses Axios for HTTP requests when creating credentials via the n8n API.
- Requires n8n environment capable of storing and retrieving credentials securely.
Troubleshooting
- Timeout generating QR code: If the QR code generation times out (default 30 seconds), check network connectivity and proxy settings.
- No credentials provided: The node will generate a QR code for manual login if no credentials are supplied; ensure you scan it promptly.
- Credential creation errors: Errors during automatic credential creation via the n8n API may require manual intervention using the provided script.
- QR code expired: If the QR code expires before scanning, rerun the node to generate a new one.
- Proxy issues: Incorrect proxy configuration may prevent successful API communication; verify proxy URL and credentials.
- SDK connection errors: Connection problems with the Zalo SDK listener will be logged; ensure stable internet and correct credentials.