WeChat Enhanced icon

WeChat Enhanced

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

WeChat Work → Delete User

AI-generated

Overview

The "WeChat Enhanced" node provides comprehensive integration with various WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically, for the WeChat Work resource, it supports operations such as managing users (create, update, delete), sending messages, and handling departments.

The Delete User operation under the WeChat Work resource allows you to remove a user from your WeChat Work organization by specifying their User ID. This is useful in scenarios where an employee leaves the company or when cleaning up inactive accounts.

Practical example:
You can automate the removal of users from your WeChat Work directory when they are offboarded from your HR system, ensuring your organization's communication channels remain up-to-date and secure.


Properties

Name Meaning
User ID The unique identifier of the user to be deleted in WeChat Work.

Output

The output of the Delete User operation is a JSON object representing the response from the WeChat Work API after attempting to delete the specified user. Typically, this will include success confirmation or error details if the deletion failed.

No binary data output is involved in this operation.

Example output structure (conceptual):

{
  "errcode": 0,
  "errmsg": "deleted"
}

Where errcode 0 indicates success.


Dependencies

  • Requires an API key credential for accessing the external N8N Tools API service that acts as a proxy or helper for WeChat API calls.
  • The node internally uses a helper class (WeChatApi) to interact with WeChat Work endpoints.
  • Proper configuration of credentials with valid API keys and subscription to the external service is necessary.
  • Network access to the WeChat Work API via the configured proxy service.

Troubleshooting

  • Invalid subscription or API key error:
    If the node throws an error indicating invalid subscription or API key, verify that the API key credential is correctly set up and active.

  • User not found or deletion failure:
    If the specified User ID does not exist or cannot be deleted, the API will return an error message. Confirm the User ID is correct and that the authenticated account has sufficient permissions.

  • Network or timeout issues:
    Ensure that the n8n instance has network connectivity to the external API service and that no firewall rules block outgoing requests.

  • JSON parsing errors:
    When providing JSON input parameters (not applicable for Delete User but relevant for other operations), ensure the JSON is well-formed.


Links and References


This summary focuses exclusively on the WeChat Work - Delete User operation as requested.

Discussion