NAppwrite icon

NAppwrite

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

Overview

This node integrates with Appwrite's Storage service to manage files within storage buckets. Specifically, the "Create File" operation allows users to upload a new file into a specified bucket in Appwrite's cloud storage.

Common scenarios for this node include:

  • Automating file uploads from workflows, such as saving generated reports, images, or documents directly to Appwrite storage.
  • Integrating external data sources or applications that produce files needing centralized storage.
  • Managing user-generated content by programmatically adding files to storage buckets.

For example, after generating a PDF report in an automation workflow, you can use this node to upload the report file to a designated Appwrite bucket for later retrieval or sharing.

Properties

Name Meaning
Bucket ID The identifier of the storage bucket where the file will be uploaded.
File Name The name to assign to the newly created file in the bucket.
File The actual file content to upload.
Mime Type The MIME type of the file being uploaded (e.g., application/pdf, image/png).

Output

The node outputs a JSON object representing the created file's metadata as returned by the Appwrite API. This typically includes details such as the file ID, bucket ID, file name, size, MIME type, creation date, and any other relevant attributes provided by Appwrite.

No binary data is outputted by this node; it only returns metadata about the uploaded file.

Dependencies

  • Requires an active Appwrite project with configured storage buckets.
  • Needs an API key credential with permissions to access and modify storage buckets.
  • The node depends on the official Appwrite SDK (node-appwrite) bundled within the node implementation.
  • Proper configuration of the Appwrite API endpoint URL, project ID, and API key must be set in the node credentials.

Troubleshooting

  • Invalid Bucket ID: If the bucket ID does not exist or is incorrect, the node will fail to upload the file. Verify the bucket ID is correct and accessible.
  • File Content Issues: Ensure the file content provided is valid and correctly formatted. Passing an empty or malformed file string may cause errors.
  • MIME Type Mismatch: Providing an incorrect MIME type might lead to improper handling or rejection by Appwrite. Use standard MIME types matching the file content.
  • Authentication Errors: If the API key or project credentials are invalid or lack necessary permissions, the node will throw authentication errors. Confirm credentials are correct and have storage access.
  • File Size Limits: Uploading files larger than the bucket's maximum allowed size will result in errors. Check bucket settings and file size constraints.

Links and References

Discussion