Lark Attendance icon

Lark Attendance

Lark Attendance Management

Overview

This node integrates with the Lark Attendance system to create or modify attendance groups. It allows users to manage group configurations related to employee attendance, such as binding departments and users, setting punch-in/out rules, defining locations and machines for attendance tracking, and specifying special day rules.

Common scenarios where this node is beneficial include:

  • Automating the setup or update of attendance groups in a company’s HR system.
  • Synchronizing attendance group settings from an external system into Lark Attendance.
  • Managing complex attendance policies programmatically, including exceptions and special schedules.

Practical example:

  • A company wants to create a new attendance group that includes specific departments and users, sets up allowed punch locations and devices, and configures special days when punching is required or not. This node can be used to send all these configurations in one operation.

Properties

Name Meaning
Authentication Method of authentication to use: either "Tenant Token" or "OAuth2".
Employee Type Specifies the type of user ID used (e.g., employee ID format).
Dept Type Specifies the type of department ID used.
Group JSON object describing the attendance group configuration. Includes fields like:
- bind_dept_ids: Departments included.
- bind_user_ids: Users included.
- except_dept_ids / except_user_ids: exclusions.
- free_punch_cfg: Free punch time settings.
- group_leader_ids: IDs of group leaders.
- locations: Allowed punch locations.
- machines: Allowed punch devices.
- need_punch_special_days / no_need_punch_special_days: Special day rules.
- punch_day_shift_ids: Shift IDs for punch days.
Custom Body Allows sending a fully custom JSON body for the request, overriding the standard group property. Useful for advanced or less common configurations.
Options > Use Custom Body Boolean flag to indicate whether to use the Custom Body property instead of the standard Group property.

Output

The node outputs JSON data representing the response from the Lark Attendance API after creating or modifying the attendance group. This typically includes confirmation details about the group created or updated, such as group ID, status, and any relevant metadata returned by the API.

No binary data output is indicated.

Dependencies

  • Requires access to the Lark Suite Open APIs.
  • Requires authentication via either a Tenant Token or OAuth2 credentials configured in n8n.
  • The base URL for API requests is https://open.larksuite.com/open-apis.
  • Proper permissions on the Lark Attendance API to create or modify attendance groups.

Troubleshooting

  • Authentication errors: Ensure that the correct authentication method is selected and that the provided credentials are valid and have sufficient permissions.
  • Invalid JSON in Group or Custom Body: The Group and Custom Body properties expect valid JSON. Malformed JSON will cause request failures.
  • Missing required fields: The API may reject requests missing mandatory fields in the group configuration. Verify that essential fields like group_name, bind_user_ids, or others required by the API are present.
  • API rate limits or network issues: Temporary failures might occur due to rate limiting or connectivity problems. Retrying after some time or checking network settings may help.
  • Conflicting options: If "Use Custom Body" is enabled but the JSON structure does not match API expectations, errors will occur. Validate the custom JSON carefully.

Links and References

Discussion