Actions12
Overview
The node integrates with the Coze AI platform, enabling users to perform various operations on different resources such as workspaces, chats, workflows, files, and audio. Specifically, for the File - Retrieve operation, it allows users to fetch a file by its unique ID from the Coze platform.
This node is beneficial in scenarios where automated workflows need to access or process files stored or managed within the Coze AI environment. For example, you might use this node to retrieve a document or media file for further processing, analysis, or storage in another system.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with the Coze API. Options: • Service Token • OAuth2 |
| File ID | The unique identifier of the file to retrieve from the Coze platform. This is required. |
Output
The node outputs JSON data representing the retrieved file's details. The exact structure depends on the Coze API response but typically includes metadata about the file such as its ID, name, type, size, and possibly URLs or content references.
If the file contains binary data (e.g., images, audio), the node may also output this binary data for downstream nodes to consume, though this is not explicitly detailed in the provided code.
Dependencies
- Requires an active connection to the Coze AI platform via either:
- A service token credential, or
- An OAuth2 authentication flow.
- The base URL for API requests is
https://api.coze.cn. - Proper credentials must be configured in n8n to authenticate API requests.
Troubleshooting
Common issues:
- Invalid or expired authentication tokens will cause request failures.
- Providing an incorrect or non-existent File ID will result in errors or empty responses.
- Network connectivity problems can prevent successful API calls.
Error messages:
- Errors returned from the Coze API are propagated; typical messages include authorization failures or "file not found".
- To resolve, verify that the authentication credentials are valid and that the File ID exists in the target workspace.
Links and References
- Coze AI Platform Documentation (official API base URL, consult for detailed API specs)
- n8n documentation on Credentials and HTTP Request Node for understanding authentication setup and API interaction patterns.