Actions3
- Api Reference Actions
Overview
The "Lark Approval" node enables interaction with the Lark Suite's Approval API, specifically supporting operations related to approval workflows. The "Approval Preview" operation allows users to preview an approval instance or task by providing relevant identifiers and parameters.
This node is beneficial in scenarios where you want to programmatically fetch and review approval details within automated workflows, such as:
- Previewing approval forms before submission.
- Retrieving approval task details for auditing or processing.
- Integrating approval data into other systems or dashboards.
For example, a company could use this node to automatically fetch and display approval form previews for pending tasks assigned to a user, helping streamline approval management.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
Approval Code | The unique code identifying the approval template or process to preview. |
Department Id | Identifier of the department related to the approval instance. |
Form | The form content or identifier associated with the approval. |
Instance Code | Unique code representing a specific approval instance. |
Locale | Locale or language preference for the approval preview content. |
Task Id | Identifier of the approval task to preview. |
User Id | Identifier of the user related to the approval instance or task. |
Custom Body | A JSON object allowing the user to specify a custom request body instead of using predefined fields. |
Options > Use Custom Body | Boolean flag indicating whether to send the custom JSON body instead of standard properties. |
Output
The node outputs JSON data containing the response from the Lark Approval API's preview endpoint. This typically includes detailed information about the approval instance or task previewed, such as form fields, status, approvers, and other metadata.
If binary data were involved (not indicated here), it would be summarized accordingly, but this node focuses on JSON responses.
Dependencies
- Requires access to the Lark Suite Open APIs.
- Needs either a Tenant Token credential or OAuth2 authentication configured in n8n.
- The base URL for API requests is
https://open.larksuite.com/open-apis
. - Proper permissions on the Lark Suite side to access approval data.
Troubleshooting
- Authentication Errors: Ensure that the selected authentication method is correctly configured with valid credentials. Expired or invalid tokens will cause failures.
- Missing Required Fields: Some operations require specific identifiers like
approval_code
ortask_id
. Omitting these may result in errors or empty responses. - API Rate Limits: Frequent calls might hit rate limits imposed by Lark Suite APIs; handle such errors by implementing retries or backoff.
- Incorrect Custom Body Format: When using the custom body option, ensure the JSON structure matches the API expectations to avoid validation errors.
- Network Issues: Connectivity problems can cause request failures; verify network access to the Lark Suite endpoints.
Links and References
- Lark Suite Open API Documentation
- Lark Approval API Reference (for detailed API specs)