Zalo Group icon

Zalo Group

Quản lý nhóm Zalo

Overview

This node interacts with Zalo's group and poll features, specifically enabling management of polls within Zalo groups. The "Poll" resource with the "Khóa bình chọn" (Lock Poll) operation allows users to lock a specific poll by its ID, preventing further voting or changes.

Typical use cases include:

  • Finalizing a poll in a Zalo group once voting is complete.
  • Preventing additional votes or edits to a poll after a deadline.
  • Automating poll lifecycle management in group communication workflows.

For example, after collecting votes for a group decision, you can use this node operation to lock the poll automatically at a scheduled time.

Properties

Name Meaning
ID bình chọn (poll_id) The numeric ID of the poll to be locked. This identifies which poll will be locked to prevent further interaction.

Output

The output JSON contains:

  • success: A boolean indicating if the lock operation was successful.
  • response: The raw response from the Zalo API regarding the lock action, typically including status details.
  • poll_id: The ID of the poll that was locked.

Example output structure:

{
  "success": true,
  "response": { /* API response object */ },
  "poll_id": 123456
}

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential to authenticate with the Zalo API.
  • The node depends on the external zca-js library to interact with Zalo services.
  • Proper configuration of credentials including cookie, IMEI, and user agent is necessary for API access.
  • The node expects valid Zalo API credentials configured in n8n under a generic API authentication token.

Troubleshooting

  • Common issues:

    • Invalid or expired credentials may cause authentication failures.
    • Providing a non-existent or incorrect poll ID will result in errors from the Zalo API.
    • Network connectivity problems can prevent API calls from succeeding.
  • Error messages:

    • "No API instance found. Please make sure to provide valid credentials."
      Means the node could not initialize the Zalo API client due to missing or invalid credentials. Verify your API key and related settings.
    • Errors related to poll ID usually indicate the poll does not exist or the user lacks permission. Double-check the poll ID value.
    • If the node throws errors about processing input parameters, ensure the poll ID is provided and is a valid number.
  • Resolution tips:

    • Confirm credentials are correctly set up and have required permissions.
    • Validate the poll ID before running the node.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully during batch executions.

Links and References

Discussion