ZAppwrite icon

ZAppwrite

Use Appwrite's API from inside N8N, updated by @ZachHandley

Overview

The node integrates with Appwrite's Storage service, allowing users to interact with files stored in Appwrite buckets. Specifically, the Get File operation retrieves a file from a specified storage bucket by its ID. This is useful when you want to fetch and use files stored in Appwrite within your n8n workflows, such as downloading images, documents, or other media for further processing or distribution.

Practical examples:

  • Downloading a user-uploaded profile picture stored in an Appwrite bucket.
  • Retrieving a document file to attach it to an email or process its content.
  • Accessing media files stored in Appwrite for integration with other services.

Properties

Name Meaning
Bucket ID The unique identifier of the storage bucket where the file is located.
File ID The unique identifier of the file to retrieve from the specified bucket.

Output

The output contains the JSON representation of the retrieved file's metadata and details as returned by the Appwrite Storage API. This typically includes information such as file ID, bucket ID, filename, MIME type, size, creation date, and URLs or download links.

If the node supports binary data output (not explicitly shown here), it would represent the actual file content fetched from Appwrite. However, based on the code, the output is primarily JSON metadata about the file.

Dependencies

  • Requires an active connection to an Appwrite instance via an API key credential configured in n8n.
  • The node uses the official Appwrite SDK (node-appwrite) to communicate with the Appwrite Storage API.
  • Necessary credentials include:
    • Appwrite endpoint URL
    • Project ID
    • API key with permissions to access storage buckets and files

Troubleshooting

  • Common issues:

    • Invalid or missing Bucket ID or File ID parameters will cause the operation to fail.
    • Insufficient permissions or incorrect API key may result in authorization errors.
    • Network connectivity issues to the Appwrite server can cause timeouts or connection failures.
  • Error messages:

    • Errors thrown by the Appwrite SDK will be surfaced, such as "File not found" if the File ID does not exist in the specified bucket.
    • Authorization errors indicating invalid credentials or lack of access rights.
  • Resolutions:

    • Verify that the Bucket ID and File ID are correct and exist in your Appwrite project.
    • Ensure the API key used has appropriate permissions for storage operations.
    • Check network connectivity and Appwrite server status.

Links and References

Discussion