ZAppwrite icon

ZAppwrite

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

Overview

This node interacts with Appwrite's Document service to retrieve multiple documents from a specified database and collection. The "Get All" operation fetches all documents matching optional query filters, enabling users to list documents efficiently.

Common scenarios include:

  • Retrieving all records from a specific collection for reporting or processing.
  • Filtering documents based on attributes such as date ranges, status, or text search.
  • Paginating through large datasets using cursor or offset queries.

Practical example:

  • Fetching all user profiles stored in a "users" collection within a database, optionally filtering by active status or creation date.

Properties

Name Meaning
Database ID The identifier of the database where the documents reside. This is required to specify the scope of the document retrieval.
Collection ID The identifier of the collection within the database from which to list documents. Required to target the correct set of documents.
Additional Fields - Queries Optional filters to narrow down the documents returned. Users can add multiple queries with different types such as: Between, Contains, Cursor After/Before (for pagination), Ends With, Equal, Greater Than, Less Than, Limit, Offset, Order Ascending/Descending, Search, Select, Starts With, Is Null, Is Not Null, Not Equal. These queries allow fine-grained control over which documents are retrieved.

Output

The output is a JSON array containing the documents retrieved from the specified collection. Each item in the array represents a document object with its attributes as stored in Appwrite.

  • The json field contains the full document data.
  • No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Appwrite server.
  • Needs configuration of the Appwrite endpoint URL and project ID in the node credentials.
  • Uses the official Appwrite SDK internally to communicate with the Appwrite API.

Troubleshooting

  • Common issues:

    • Incorrect or missing Database ID or Collection ID will cause the request to fail.
    • Invalid or expired API key credential will result in authentication errors.
    • Improperly formatted queries may lead to empty results or API errors.
    • Pagination queries (cursor_after, cursor_before) require valid resource IDs; invalid values will cause errors.
  • Error messages:

    • Authentication errors: Check that the API key and project ID are correctly configured.
    • Resource not found: Verify that the database and collection IDs exist and are accessible.
    • Query errors: Ensure query parameters conform to Appwrite's filtering syntax and supported operators.

Links and References

Discussion