Actions28
- File Actions
- Multipart Upload File Actions
- Permission Member Actions
- Permissionpublic Actions
- Statistic Actions
- Media Actions
- Multipart Upload Media Actions
- Comment Actions
- Subscription Actions
- Document Import Actions
Overview
The node "Lark Files" provides functionality to manage files within the Lark (Feishu) ecosystem. Specifically, the Document Import - Create An Import Task operation allows users to create a task that imports a document file into Lark's document management system.
This operation is useful when you want to programmatically upload and import documents into Lark Docs from external sources or automate bulk document imports. For example, you might use this node to import reports generated by another system directly into Lark Docs for team collaboration or archival.
Properties
Name | Meaning |
---|---|
Authentication | Method of authentication to use: either "Tenant Token" or "OAuth2". |
File Extension | The extension of the file being imported (e.g., "pdf", "docx"). |
File Name | The name of the file to be imported. |
File Token | A token representing the uploaded file in Lark's system, used to identify the file to import. |
Point | An object specifying where to mount the imported document, containing: |
- mount_key (string): Identifier key for the mount point. |
|
- mount_type (number): Type indicator for the mount point. |
|
Type | The type/category of the import task. |
Custom Body | JSON input allowing full customization of the request body sent to the API instead of using individual fields. |
Use Custom Body | Boolean flag indicating whether to send the custom JSON body instead of the standard properties. |
Output
The node outputs JSON data representing the response from the Lark API after creating the import task. This typically includes details about the created import task such as its ID, status, and any metadata returned by the API.
If the node supports binary data output (not explicitly shown here), it would represent file content or related binary payloads, but for this operation, the output is primarily JSON describing the import task.
Dependencies
- Requires an active connection to Lark's Open API.
- Needs either a Tenant Token or OAuth2 credentials configured in n8n for authentication.
- The base URL for API requests is
https://open.larksuite.com/open-apis
. - No additional external dependencies are indicated.
Troubleshooting
- Authentication errors: Ensure that the correct authentication method is selected and valid credentials are provided.
- Invalid file token: The
file_token
must correspond to a previously uploaded file; otherwise, the import task creation will fail. - Missing required fields: Make sure all required properties (
file_name
,file_extension
,file_token
,point
, andtype
) are correctly set unless using a custom body. - API rate limits or network issues: These can cause failures; check API quotas and network connectivity.
- Custom Body usage: If using the custom JSON body, ensure the JSON structure matches the API expectations exactly to avoid malformed request errors.
Links and References
- Lark Open API Documentation
- Lark Docs File Management API (for detailed API parameters and examples)