Actions38
- User Actions
- Department Actions
- User Group Actions
- User Group Member Actions
- Unit Actions
- Workforce Type Actions
- Custom User Field Actions
- Contact Scope Actions
Overview
This node, named "Lark Contacts," is designed to manage contacts within the Lark platform. Specifically, the operation "Obtain User Id Via Email Or Mobile Number" allows users to retrieve user IDs by providing either email addresses or mobile phone numbers. This functionality is useful in scenarios where you have contact information but need to programmatically obtain the corresponding user identifiers for further automation or integration tasks.
Practical examples include:
- Synchronizing user data between systems by matching emails or phone numbers to user IDs.
- Automating workflows that require user identification based on contact details.
- Validating and enriching contact lists with user IDs from Lark.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
Emails | A collection of email addresses to look up user IDs for. |
Mobiles | A collection of mobile phone numbers to look up user IDs for. |
Custom Body | A JSON object allowing a custom request body to be sent instead of using the predefined emails/mobiles. |
Use Custom Body | Boolean option to decide whether to send the custom JSON body or use the standard emails/mobiles fields. |
Details on properties:
- Authentication: Choose between two authentication methods to authorize API requests.
- Emails: Add one or more email strings; the node will query user IDs associated with these emails.
- Mobiles: Add one or more mobile number strings; the node will query user IDs associated with these numbers.
- Custom Body: When enabled, this JSON input overrides the standard emails and mobiles inputs, allowing full control over the request payload.
- Use Custom Body: Toggles whether the node uses the custom JSON body or the structured emails/mobiles collections.
Output
The node outputs JSON data containing the results of the user ID lookup. The structure typically includes user information matched by the provided emails or mobile numbers. The exact schema depends on the Lark API response but generally includes user IDs and related metadata.
If binary data were involved (not indicated here), it would represent files or attachments, but this node focuses solely on JSON user data.
Dependencies
- Requires access to the Lark Open API at
https://open.larksuite.com/open-apis
. - Needs an API key credential configured either as a Tenant Token or OAuth2 token.
- Proper permissions/scopes must be granted to the API credentials to perform user lookups.
Troubleshooting
Common issues:
- Invalid or expired authentication tokens will cause authorization errors.
- Providing empty or incorrectly formatted emails/mobiles may result in no matches or API errors.
- Using the custom body option incorrectly (malformed JSON) can lead to request failures.
Error messages:
- Authorization errors: Check that the API credentials are valid and have required scopes.
- Validation errors: Ensure emails and mobiles are correctly formatted strings.
- API rate limits: If too many requests are made, wait or adjust usage accordingly.
Links and References
- Lark Open API Documentation
- Lark Contacts API Reference (for user lookup endpoints)