0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Storage → Permanent Storage for Simple Files

AI-generated

Overview

This node provides permanent file storage operations within n8n workflows. It allows users to add, retrieve, delete, and list simple files in a persistent storage system via the "Permanent Storage for Simple Files" operation under the "Storage" resource. This is useful for automating document management, archiving workflow outputs, or sharing files between different workflow executions.

Practical examples:

  • Uploading generated reports or documents for later retrieval.
  • Fetching previously stored files for further processing.
  • Deleting outdated files from storage.
  • Listing all files to manage or audit stored content.

Properties

Name Meaning
Choose a File Storage Operation Selects the action to perform:
- Add a New File
- Get a Gstored File
- Delete a Stored File
- List All Your Files
Binary File Data (For "Add a New File") The file data to store, provided as a base64-encoded string.
File ID (For "Get a Gstored File" or "Delete a Stored File") The unique identifier of the file. Obtainable via the "list" operation.
URL (For "Get a Gstored File") Whether to return the file as a downloadable URL instead of raw data.

Output

The output structure depends on the selected operation:

  • Add a New File:
    Returns a JSON object with details about the newly stored file, typically including its unique file ID and metadata.

  • Get a Gstored File:

    • If "URL" is true: Returns a JSON object containing a URL to download the file.
    • If "URL" is false: Returns the file data, likely as a base64-encoded string or binary field.
  • Delete a Stored File:
    Returns a confirmation JSON object indicating successful deletion (e.g., status or deleted file ID).

  • List All Your Files:
    Returns an array of JSON objects, each representing a stored file with properties such as file ID, name, and possibly other metadata.

Note: If binary data is returned, it represents the contents of the stored file.

Dependencies

  • External Service: Requires access to the CodeKit API for file storage operations.
  • Credentials: Needs a configured codeKitApi credential in n8n for authentication.

Troubleshooting

Common issues:

  • Invalid or missing File ID: When retrieving or deleting a file, ensure the correct File ID is used. Use the "List All Your Files" operation to find valid IDs.
  • Incorrect file data format: For uploading, ensure the file is base64-encoded as required.
  • Authentication errors: Make sure the codeKitApi credentials are correctly set up in n8n.
  • File not found: Attempting to get or delete a non-existent File ID will result in an error.

Error messages and resolutions:

  • "File ID not found": Double-check the File ID using the "list" operation.
  • "Invalid file data": Ensure the uploaded file is properly base64-encoded.
  • "Authentication failed": Verify that your API credentials are correct and active.

Links and References

Discussion