Overview
This node interacts with a cloud file storage service to perform various file and directory operations. Specifically, the "Get One File" operation retrieves metadata and details of a single file or directory by its unique ID. This is useful when you need to fetch information about a specific file or folder, such as its name, size, type, or other attributes, without listing all files.
Practical examples include:
- Fetching details of a document before processing it further.
- Verifying the existence and properties of a file or directory by its ID.
- Integrating with workflows that require conditional logic based on file metadata.
Properties
| Name | Meaning |
|---|---|
| File or Directory ID | The unique identifier of the targeted file or directory to retrieve. |
Output
The node outputs an array of items where each item's json property contains the retrieved file or directory data. This typically includes metadata such as the file's ID, name, type (file or directory), size, creation date, modification date, and possibly other relevant attributes provided by the cloud storage API.
If the node supports binary data output for files, it would represent the actual file content; however, for the "Get One File" operation, the output primarily consists of JSON metadata describing the file or directory.
Dependencies
- Requires an API key credential for authenticating with the cloud file storage service.
- Depends on helper functions imported from a local module responsible for handling file operations.
- Needs proper configuration of the API credentials within n8n to access the service.
Troubleshooting
Common issues:
- Providing an invalid or empty File or Directory ID will result in errors or no data returned.
- Missing or incorrect API credentials will cause authentication failures.
- Network connectivity problems can prevent successful API calls.
Error messages:
- Errors thrown during execution include descriptive messages from the API response, which are captured and attached to the output item under
errorMessageanderrorResponse. - If the node is not set to continue on failure, these errors will stop the workflow execution.
- Errors thrown during execution include descriptive messages from the API response, which are captured and attached to the output item under
Resolutions:
- Verify the correctness of the File or Directory ID.
- Ensure the API key credential is valid and has sufficient permissions.
- Check network connectivity and API endpoint availability.
- Enable "Continue On Fail" if partial success is acceptable in your workflow.
Links and References
- Refer to the cloud file storage service's official API documentation for detailed information on file and directory metadata.
- Consult n8n documentation on how to configure API credentials and handle node errors.