Wechat Work Node icon

Wechat Work Node

Wechat Work Node

Overview

This node integrates with Wechat Work to manage organizational departments. Specifically, the "删除部门" (Delete Department) operation allows users to remove a department from their Wechat Work organization by specifying its unique department ID. This is useful for automating cleanup or restructuring tasks within an organization's directory.

Practical examples include:

  • Automatically deleting obsolete or merged departments during HR system synchronization.
  • Removing test or temporary departments created during onboarding processes.

Properties

Name Meaning
部门ID The unique numeric ID of the department to delete. This is a required field.

Output

The node outputs JSON data representing the result of the delete operation. Typically, this will include confirmation of success or details about any error encountered during the deletion process.

If the operation fails and "Continue On Fail" is enabled, the output will contain an error message associated with the specific item that failed.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Wechat Work API.
  • The node makes HTTP requests to the Wechat Work API endpoint to perform operations.
  • Proper configuration of credentials including base URL, corporate ID, and secret is necessary.
  • The node depends on internal helper methods for request handling and metadata construction.

Troubleshooting

  • Common Issues:

    • Invalid or missing department ID will cause the operation to fail.
    • Incorrect or expired API credentials will prevent successful authentication.
    • Network connectivity issues can cause request failures.
  • Error Messages:

    • Errors thrown during the delete call will be reported with the message returned from the API or the underlying HTTP request.
    • If "Continue On Fail" is disabled, the node execution will stop at the first error.
    • To resolve errors, verify the department ID exists, check API credentials, and ensure network access to the Wechat Work API.

Links and References

Discussion