WeChat Enhanced icon

WeChat Enhanced

WeChat Enhanced Node - Suporte completo para Mini Programs, Official Accounts, WeChat Pay e WeChat Work

WeChat Work → Get User List

AI-generated

Overview

The "WeChat Enhanced" node integrates multiple WeChat services into n8n workflows, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically, for the WeChat Work resource with the Get User List operation, this node fetches a list of users within a specified department in a WeChat Work organization.

This operation is useful for automating user management tasks such as syncing user data, generating reports on department members, or triggering notifications to groups of users based on their department membership.

Practical example:
A company using WeChat Work can automate the retrieval of all users in the Sales department (by specifying its department ID) to update an internal CRM system or send targeted messages.

Properties

Name Meaning
Department ID The numeric ID of the department from which to retrieve the user list.
Fetch Child Boolean flag indicating whether to include users from child (sub) departments recursively.

Output

The output is a JSON object containing the user list retrieved from the specified department in WeChat Work. The structure typically includes user details such as user IDs, names, and other profile information as provided by the WeChat Work API.

If the operation fails and "Continue On Fail" is enabled, the output will contain an error message under the error field.

No binary data output is produced by this operation.

Dependencies

  • Requires valid credentials for accessing the WeChat Work API via an external service referred to generically here as "an API key credential" or "a required API authentication token".
  • The node attempts to validate the subscription and API key against an external validation endpoint before executing operations.
  • Proper configuration of these credentials in n8n is necessary for successful execution.

Troubleshooting

  • Invalid Subscription or API Key:
    Error message: "N8N Tools API: Invalid subscription or API key. Please check your credentials."
    Resolution: Verify that the API key credential is correctly configured and active.

  • Unsupported Operation Error:
    If an unsupported operation is requested, the node throws an error like "Unsupported WeChat Work operation: <operation>".
    Resolution: Ensure the operation name matches one of the supported operations listed in the node's properties.

  • API Request Failures:
    Network issues or incorrect parameters may cause failures. Check the department ID and fetchChild flag values for correctness.

  • Empty User List:
    If no users are returned, verify that the department ID exists and contains users.

Links and References


This summary focuses on the "WeChat Work" resource and the "Get User List" operation as requested.

Discussion