Actions33
- Mini Program Actions
- WeChat Pay Actions
- Official Account Actions
- WeChat Work Actions
Overview
The "WeChat Enhanced" node integrates with various WeChat services, including Mini Programs, Official Accounts, WeChat Pay, and WeChat Work. Specifically, for the WeChat Work resource and the Get Department List operation, this node retrieves a list of departments within a specified department ID in a WeChat Work organization.
This operation is useful for organizations managing their internal structure via WeChat Work, allowing automation workflows to fetch department hierarchies or details dynamically. For example, an HR system could use this node to synchronize department data from WeChat Work or trigger actions based on department changes.
Properties
| Name | Meaning |
|---|---|
| Department ID | The ID of the department to retrieve the list from. Typically, 1 represents the root department. |
Output
The output JSON contains the response from the WeChat Work API's "Get Department List" endpoint. This typically includes an array of department objects with details such as department IDs, names, parent IDs, and other metadata describing the organizational structure.
The node does not output binary data for this operation.
Example output structure (simplified):
{
"department": [
{
"id": 2,
"name": "Marketing",
"parentid": 1,
"order": 10
},
{
"id": 3,
"name": "Sales",
"parentid": 1,
"order": 20
}
]
}
Dependencies
- Requires valid credentials configured in n8n to authenticate with the WeChat Work API.
- Uses an external API service ("N8N Tools API") for subscription and API key validation before making requests.
- The node depends on the bundled
wechat-apimodule that handles the actual API calls to WeChat Work.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that the API key credential is correctly set up and active.
- Unsupported operation error: Ensure the selected operation matches the supported operations for the chosen resource.
- Network or authentication errors: Confirm network connectivity and that the WeChat Work credentials have sufficient permissions to access department information.
- JSON parsing errors: When providing JSON input parameters (not applicable for this operation), ensure the JSON is well-formed.
Links and References
- WeChat Work Official API Documentation - Department Management
- n8n Documentation - Creating Custom Nodes
- WeChat Work Developer Guide
This summary focuses exclusively on the WeChat Work resource and the Get Department List operation as requested.