ZAppwrite icon

ZAppwrite

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

Overview

The node provides integration with Appwrite's Document service, specifically supporting the "Get" operation on documents within a specified database and collection. It allows retrieving a single document by its ID, optionally applying query filters to refine the retrieval.

This node is beneficial when you want to fetch specific documents from an Appwrite database for further processing or automation workflows in n8n. For example, you might use it to retrieve user profile data stored as documents or to get configuration settings saved in a document.

Practical example:

  • Fetch a document by its unique ID from a collection of customer orders.
  • Retrieve a document filtered by certain attribute values using queries (e.g., only documents where status equals "active").

Properties

Name Meaning
Database ID The identifier of the Appwrite database where the document resides. This is required to specify the context of the document.
Collection ID The identifier of the collection within the database that contains the document. Required to locate the document.
Document ID The unique identifier of the document to retrieve. By default, a unique ID is generated but can be customized to target a specific document.
Additional Fields Optional collection of query filters to apply when retrieving the document. Supports multiple query types such as Between, Contains, Equal, Greater Than, Less Than, Limit, Offset, Order Ascending/Descending, Search, Select, Starts With, Ends With, Is Null, Is Not Null, Cursor After/Before, and Not Equal. These queries help filter or paginate the results.

Output

The output is a JSON array containing the retrieved document(s) data from Appwrite. Each item corresponds to a document object with all its attributes as stored in Appwrite.

  • The json field includes the full document data.
  • No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to an Appwrite instance via an API key credential configured in n8n.
  • Needs valid credentials including the Appwrite endpoint URL, project ID, and API key.
  • Uses the official Appwrite SDK internally to perform API calls.

Troubleshooting

  • Common issues:

    • Invalid or missing Database ID, Collection ID, or Document ID will cause errors.
    • Incorrect or expired API credentials will prevent successful API calls.
    • Query filters must be correctly formatted; invalid queries may result in no data or errors.
    • Network connectivity issues to the Appwrite server can cause timeouts or failures.
  • Error messages:

    • Errors related to "Resource not found" indicate incorrect resource or operation parameters.
    • Authentication errors suggest problems with API keys or permissions.
    • Validation errors may occur if required parameters are missing or malformed.
  • Resolutions:

    • Verify all IDs and parameters are correct and exist in your Appwrite project.
    • Ensure API credentials are valid and have sufficient permissions.
    • Review query syntax and supported query types.
    • Check network access to the Appwrite server.

Links and References

Discussion