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
The "Create A User" operation in the Lark Contacts node allows you to add a new user to your organization's contact list within the Lark platform. This node is useful for automating user management tasks such as onboarding new employees, synchronizing user data from other systems, or bulk-creating users with specific attributes.
Typical use cases include:
- Automatically creating user profiles when new employees join.
- Syncing user information from HR systems into Lark contacts.
- Setting up user roles, departments, and notification preferences programmatically.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
Avatar Key | Key identifying the user's avatar image. |
City | The city where the user is located. |
Country | The country where the user is located. |
Custom Attrs | Custom attributes for the user; accepts multiple JSON objects defining additional user-specific data. |
Department Ids | List of department IDs the user belongs to. |
Description | A textual description or notes about the user. |
The user's email address. | |
Employee No | Employee number or identifier. |
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 | Enterprise email address associated with the user. |
Gender | Numeric code representing gender. |
Idp Type | Identity provider type string. |
Job Title | User's job title or position name. |
Join Time | Timestamp (number) representing the user's joining time. |
Leader User Id | User ID of the leader or manager of this user. |
Mobile | User's mobile phone number. |
Mobile Visible | Boolean indicating if the mobile number is visible to others. |
Name | Full name of the user. |
Need Send Notification | Boolean indicating whether to send a notification upon user creation. |
Nickname | User's nickname. |
Notification Option | Notification preferences including language and channels (multiple values allowed). |
Orders | Ordering information for departments and users, including department order and user order numbers. |
Positions | Position details within departments, including major status, leader position codes, and position names. |
User Id | Unique identifier for the user. |
Work Station | User's workstation or location within the office. |
Custom Body | Allows sending a fully custom JSON body for the request instead of using individual fields. Useful for advanced scenarios or when the standard properties do not cover all required data. |
Options > Use Custom Body | Boolean flag to toggle between using the standard input fields or providing a custom JSON body. |
Output
The node outputs JSON data representing the response from the Lark API after attempting to create the user. This typically includes:
- Confirmation of the created user's details.
- Any metadata returned by the API such as user ID, status, or error messages if creation failed.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the Lark Suite API.
- Authentication must be provided either via a Tenant Token or OAuth2 credentials configured in n8n.
- The node sends requests to
https://open.larksuite.com/open-apis
.
Troubleshooting
- Authentication errors: Ensure that the correct authentication method is selected and valid credentials are provided.
- Invalid input data: Missing required fields like
user_id
oremail
may cause the API to reject the request. Verify all mandatory fields are correctly filled. - API rate limits: Creating many users in a short time might hit API rate limits; consider adding delays or batching requests.
- Custom Body usage: When using the custom body option, ensure the JSON structure matches the API specification exactly to avoid malformed request errors.
- Error messages from API: Typically include validation errors or permission issues. Review the error message details and adjust inputs or permissions accordingly.