Actions25
Overview
This node integrates with the WeChat Work (企业微信) platform to perform various operations related to enterprise communication and user management. Specifically, the "通过手机号获取用户ID" operation under the "用户管理" resource allows users to retrieve a user's unique ID within the WeChat Work system by providing their mobile phone number registered in the enterprise directory.
This functionality is useful in scenarios where you have a user's phone number but need to programmatically obtain their internal user ID for further automation tasks such as messaging, permission management, or data synchronization.
Practical example:
- You have a list of employee phone numbers and want to fetch their corresponding WeChat Work user IDs to send targeted notifications or update user profiles automatically.
Properties
| Name | Meaning |
|---|---|
| *手机号 | The mobile phone number of the user as registered in the WeChat Work enterprise address book. This is a required string input used to identify the user whose ID you want to retrieve. |
Output
The node outputs JSON data containing the user ID associated with the provided mobile phone number. The exact structure depends on the underlying API response but typically includes fields like:
{
"userid": "string"
}
This output can be used downstream in workflows to reference the user uniquely within WeChat Work.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the WeChat Work API.
- The node makes HTTP requests to the WeChat Work API endpoints, specifically to retrieve tokens and user information.
- Proper configuration of credentials including corporate ID and secret is necessary.
- Network access to the WeChat Work API base URL must be available.
Troubleshooting
Common issues:
- Invalid or expired API credentials will cause authentication failures.
- Providing a mobile number not registered in the enterprise directory will result in no user ID found or an error.
- Network connectivity problems may prevent API calls from succeeding.
Error messages:
"未实现方法: 用户管理.通过手机号获取用户ID"indicates that the requested resource-operation combination is not implemented or recognized by the node.- Authentication errors usually mention token retrieval failure; verify credentials and permissions.
- If the node throws errors about missing parameters, ensure the mobile number is provided and correctly formatted.
Resolutions:
- Double-check and update API credentials.
- Confirm the mobile number exists in the WeChat Work enterprise directory.
- Ensure the node version supports the requested operation.
- Enable "Continue On Fail" if partial processing is acceptable when some inputs fail.