Appwrite icon

Appwrite

A comprehensive node for the Appwrite API

Overview

This node interacts with the Storage resource of the Appwrite API, specifically supporting file-related operations. The "Get File" operation retrieves metadata and details about a specific file stored in a given bucket by its unique file ID.

Common scenarios for this node include:

  • Fetching file information such as name, size, creation date, and permissions before processing or displaying it.
  • Validating that a file exists and retrieving its metadata prior to downloading or manipulating it.
  • Integrating with workflows that manage files in cloud storage buckets, enabling automation around file management.

Practical example:

  • A workflow that triggers when a new file is uploaded, then uses this node to get the file's metadata and logs or processes it accordingly.

Properties

Name Meaning
Bucket ID Unique identifier of the storage bucket containing the file. Use "unique()" to auto-generate on creation. Required for all file operations.
File ID Unique identifier of the file to retrieve. This is required to specify which file's metadata to fetch.

Output

The node outputs JSON data representing the file's metadata retrieved from the storage bucket. This typically includes properties such as file ID, name, size, creation timestamp, permissions, and other relevant attributes describing the file.

If the operation involves binary data (e.g., downloading a file), the node would output binary data under a binary property, but for the "Get File" operation, only JSON metadata is returned.

Dependencies

  • Requires an API key credential for authenticating with the Appwrite API.
  • Needs proper configuration of the Appwrite API credentials within n8n.
  • Depends on the Appwrite SDK client internally to communicate with the Appwrite Storage service.

Troubleshooting

  • Common issues:

    • Invalid or missing Bucket ID or File ID parameters will cause the operation to fail.
    • Authentication errors if the API key credential is incorrect or lacks necessary permissions.
    • File not found errors if the specified File ID does not exist in the given bucket.
  • Error messages:

    • Errors from the Appwrite API are propagated and wrapped as node errors.
    • If the node fails due to API response errors, check the error message for details such as permission denied or resource not found.
    • To resolve, verify the Bucket ID and File ID values, ensure the API key has access rights, and confirm the file exists.

Links and References

Discussion