Lark Attendance icon

Lark Attendance

Lark Attendance Management

Overview

The "Attendance Statistic" resource with the "Query Statistical Data" operation in this node allows users to retrieve attendance statistics data from Lark's Attendance Management system. This operation is useful for HR teams, managers, or administrators who want to analyze employee attendance patterns, generate reports, or integrate attendance data into other workflows.

Typical use cases include:

  • Fetching attendance summaries for a group of employees over a specific date range.
  • Analyzing attendance trends by employee type or locale.
  • Retrieving historical attendance data for audit or compliance purposes.

For example, an HR manager could use this node to query attendance statistics for all employees in their current group during the last month, filtering by employee type and locale, to prepare payroll or performance reviews.

Properties

Name Meaning
Authentication Method of authentication to use: either "Tenant Token" or "OAuth2".
Employee Type Specifies the type of employee ID used for the user IDs in the request and response.
Current Group Only Boolean flag indicating whether to restrict the query to the current group only (true/false).
End Date Numeric timestamp representing the end date for the attendance statistics query.
Locale Locale string to specify language or regional settings for the query.
Need History Boolean flag indicating whether historical attendance data should be included (true/false).
Start Date Numeric timestamp representing the start date for the attendance statistics query.
Stats Type String specifying the type of statistics to query.
User Ids Collection of user IDs (strings) for which to query attendance statistics. Multiple user IDs can be provided.
Custom Body JSON object allowing the user to provide a fully custom request body instead of using individual parameters.
Options > Use Custom Body Boolean option to toggle between using the standard input properties or sending a custom JSON body in the request.

Output

The node outputs JSON data containing the queried attendance statistics. The structure of the json output field corresponds to the response from the Lark Attendance API for statistical data queries. It typically includes fields such as user IDs, attendance metrics, dates, and possibly localized information depending on the request parameters.

No binary data output is indicated for this operation.

Dependencies

  • Requires access to Lark's Open APIs for Attendance Management.
  • Requires 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 credentials to access attendance statistics.

Troubleshooting

  • Authentication errors: Ensure that the selected authentication method is correctly configured with valid credentials and has the necessary permissions.
  • Invalid date ranges: Start Date and End Date should be valid timestamps; invalid or reversed ranges may cause errors or empty results.
  • Empty or incorrect user IDs: Providing invalid or non-existent user IDs will result in no data or errors.
  • API rate limits: Frequent or large queries might hit API rate limits; consider batching requests or adding delays.
  • Custom Body usage: When using the custom body option, ensure the JSON is well-formed and matches the expected API schema to avoid request failures.

Links and References

Discussion