ZAppwrite icon

ZAppwrite

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

Overview

The node integrates with Appwrite's Storage service to manage storage buckets and files. Specifically, the "Create Bucket" operation allows users to create a new storage bucket with customizable settings such as permissions, file security, encryption, compression, antivirus scanning, and file restrictions.

This node is beneficial in scenarios where you want to programmatically organize and control file storage within Appwrite, for example:

  • Creating isolated buckets for different projects or clients.
  • Enforcing security policies on stored files.
  • Limiting file types and sizes uploaded to a bucket.
  • Applying compression or encryption automatically to stored files.

Practical example: Automatically creating a secure bucket with read/write/delete permissions enabled, file size limits, and antivirus scanning before uploading user-generated content.

Properties

Name Meaning
Name The name of the bucket to create.
Permissions Permissions to set on the bucket. Options: Read, Write, Delete.
File Security Whether to enable file security on the bucket (boolean).
Enabled Whether to enable the bucket (boolean).
Maximum File Size Maximum allowed file size in bytes (number).
Allowed File Extensions Comma-separated list of allowed file extensions (string).
Compression Compression method to use on the bucket. Options: Gzip, None, Zstd.
Encryption Whether to enable encryption on the bucket (boolean).
Antivirus Whether to enable antivirus scanning on the bucket (boolean).

Output

The output JSON contains the response from the Appwrite API after creating the bucket. This typically includes details about the newly created bucket such as its unique ID, name, permissions, and configuration settings.

If the operation succeeds, the output will be an array with one object representing the created bucket's metadata.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to an Appwrite server.
  • Needs credentials including the Appwrite endpoint URL, project ID, and an API key credential with permissions to manage storage buckets.
  • The node uses the official Appwrite SDK internally to perform API calls.

Troubleshooting

  • Common issues:
    • Invalid or missing API credentials can cause authentication failures.
    • Providing invalid permission values or malformed file extension lists may result in API errors.
    • Trying to create a bucket with a name that already exists might cause conflicts.
  • Error messages:
    • Authentication errors: Verify API key and project ID are correct.
    • Validation errors: Check that all required fields are provided and formatted correctly.
    • Network errors: Ensure the Appwrite server URL is reachable from n8n.

Links and References

Discussion