Lark Attendance icon

Lark Attendance

Lark Attendance Management

Overview

The node "Lark Attendance" provides functionality to manage attendance statistics within the Lark platform. Specifically, the "Update Statistics Settings" operation under the "Attendance Statistic" resource allows users to update the configuration of attendance statistics views for employees.

This node is useful in scenarios where an organization wants to customize or modify how attendance data is aggregated and displayed for different employee groups or types. For example, HR teams can update the statistical views to reflect new attendance policies or metrics without manually adjusting reports.

Practical examples:

  • Updating the view settings to include new attendance metrics.
  • Changing the employee type filter for attendance statistics.
  • Customizing the JSON body sent to the API for advanced configurations.

Properties

Name Meaning
Authentication Method of authentication to use: either "Tenant Token" or "OAuth2".
Employee Type The type of employee ID used for filtering or identification in the attendance statistics (e.g., employee number, email).
User Stats View Id Required. The unique identifier of the user statistics view to update. This ID is obtained from querying existing statistics settings.
View A JSON object representing the new view configuration for the attendance statistics. It contains nested items and child items that define the structure and content of the statistics view.
Custom Body A fully customizable JSON body to send with the request instead of using the standard "View" property. This allows advanced users to specify any valid payload supported by the API.
Options > Use Custom Body Boolean flag indicating whether to use the "Custom Body" JSON instead of the standard "View" property.

Output

The node outputs JSON data reflecting the response from the Lark Attendance API after updating the statistics settings. The json output typically includes confirmation of the updated settings or error details if the update failed.

No binary data output is involved in this operation.

Dependencies

  • Requires access to the Lark Open API endpoint at https://open.larksuite.com/open-apis.
  • Requires authentication via either a Tenant Token or OAuth2 credentials configured in n8n.
  • The user must have appropriate permissions to query and update attendance statistics settings in Lark.

Troubleshooting

  • Common issues:

    • Invalid or missing User Stats View Id: The operation requires a valid view ID; ensure it is correctly obtained from the query statistics settings API.
    • Malformed JSON in the "View" or "Custom Body" fields: Ensure JSON syntax is correct and matches expected API schema.
    • Authentication errors: Verify that the selected authentication method is properly configured and tokens are valid.
    • Insufficient permissions: The authenticated user must have rights to update attendance statistics.
  • Error messages:

    • "Invalid user_stats_view_id": Check that the provided ID exists and is correctly formatted.
    • "Unauthorized" or "Authentication failed": Recheck API credentials and token validity.
    • "Malformed request body": Validate JSON input in "View" or "Custom Body".

Links and References

Discussion