Appwrite icon

Appwrite

Consume Appwrite API

Actions5

Overview

The "Documents - Get All" operation in this custom n8n node allows you to retrieve multiple documents from a specified collection within an Appwrite database. This is useful for scenarios where you need to list, filter, or paginate through documents stored in Appwrite, such as displaying records in dashboards, exporting data, or integrating with other systems.

Practical examples:

  • Fetching all user profiles from a "users" collection for reporting.
  • Retrieving paginated blog posts for display on a website.
  • Exporting all order records from an e-commerce application.

Properties

Name Type Meaning
Database ID String The unique identifier of the Appwrite database containing the target collection.
Collection ID String The unique identifier of the collection from which documents will be retrieved.
Options Object Additional options for customizing the query. Includes:
Limit (Number): Max number of results to return (1–1000).
Offset (Number): Number of items to skip (for pagination).
Cursor (String): Document ID to start after (efficient pagination).
Cursor Direction (String): Direction for cursor-based pagination.

Output

The output is a JSON object containing the result of the Appwrite API's "Get All Documents" call. Typically, this includes:

{
  "total": 123,
  "documents": [
    {
      "$id": "doc1",
      // ...other document fields
    },
    {
      "$id": "doc2",
      // ...other document fields
    }
    // ...
  ]
}
  • total: Total number of documents matching the query.
  • documents: Array of document objects, each representing a record in the collection.

Note: The exact structure of each document depends on your Appwrite collection schema.

Dependencies

  • Appwrite API: Requires access to an Appwrite server instance.
  • API Key & Project ID: You must provide valid Appwrite credentials (API key and project ID) via n8n credentials.
  • n8n Configuration: No special configuration beyond standard credential setup.

Troubleshooting

Common issues:

  • Invalid Credentials: If the API key or project ID is incorrect, authentication will fail. Error message: Auth settings are not valid: ...
    • Resolution: Double-check your Appwrite credentials in n8n.
  • Incorrect Database/Collection ID: Providing wrong IDs will result in "not found" errors.
    • Resolution: Verify the IDs in your Appwrite console.
  • Pagination Issues: Using invalid values for limit, offset, or cursor may cause unexpected results or errors.

Links and References

Discussion