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 allows updating a user's information comprehensively within the Lark Contacts system. It is designed to modify all relevant user details in one operation, making it useful for synchronizing user profiles or performing bulk updates in organizational directories.
Common scenarios include:
- Updating employee records after changes in HR systems.
- Synchronizing user profile data from external databases.
- Managing organizational structure changes by updating department and position info.
For example, you can update a user's name, email, job title, department memberships, and custom attributes all at once, ensuring the contact information remains current across integrated platforms.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
User Id | The unique identifier of the user to update. Must match the user ID type specified in query parameters. |
Avatar Key | Key representing the user's avatar image. |
City | User's city of residence. |
Country | User's country of residence. |
Custom Attrs | A collection of custom attributes for the user. Each item is a JSON object that can contain nested structures such as generic user info, option IDs, URLs, and text fields. |
Department Ids | List of department IDs the user belongs to. |
Description | Additional description or notes about the user. |
User's email address. | |
Employee No | Employee number or code assigned to the user. |
Employee Type | Numeric code representing the employee type. |
En Name | User's English name. |
Ent Email Password | Password for the enterprise email account. |
Enterprise Email | User's enterprise email address. |
Gender | Numeric code representing gender. |
Idp Type | Identity provider type string. |
Is Frozen | Boolean indicating if the user account is frozen (disabled). |
Job Title | User's job title or position name. |
Join Time | Timestamp (number) representing the user's join date/time. |
Leader User Id | User ID of the leader or manager of this user. |
Mobile | User's mobile phone number. |
Mobile Visible | Boolean indicating whether the mobile number is visible. |
Name | User's full name. |
Nickname | User's nickname. |
Orders | Collection of order objects specifying department and user ordering with fields: department_id (string), department_order (number), user_order (number). |
Positions | Collection of position objects describing user's positions with fields: department_id, is_major (boolean), leader_position_code, leader_user_id, position_code, position_name. |
Work Station | User's work station or location. |
Custom Body | Allows sending a fully custom JSON body for the update request, overriding individual fields. Useful for advanced or less common update scenarios. |
Options > Use Custom Body | Boolean flag to indicate whether to use the custom JSON body instead of individual properties. |
Output
The node outputs the response from the Lark Contacts API after attempting to update the user information. The output JSON typically contains confirmation of the update operation, including updated user details or error messages if the update failed.
If binary data were involved (e.g., avatar images), it would be handled accordingly, but this operation focuses on JSON data representing user profile fields.
Dependencies
- Requires an active connection to the Lark Suite Open APIs.
- Needs authentication via either a Tenant Token credential or OAuth2 credential configured in n8n.
- The base URL for API requests is
https://open.larksuite.com/open-apis
. - Proper permissions/scopes must be granted to the API credentials to allow user updates.
Troubleshooting
- Invalid User Id: If the provided user ID does not exist or does not match the expected format, the API will return an error. Verify the user ID correctness.
- Authentication Errors: Using incorrect or expired tokens will cause authentication failures. Ensure valid credentials are used.
- Permission Denied: Insufficient permissions for the authenticated user may prevent updates. Check API scopes and roles.
- Malformed Custom Body: When using the custom JSON body option, invalid JSON or missing required fields can cause errors. Validate JSON syntax and completeness.
- Field Validation Errors: Some fields like email or department IDs may have format or existence constraints. Confirm values conform to expected formats and exist in the system.