Actions25
- Document Actions
- Function Actions
- Storage Actions
- Users Actions
Overview
This node enables interaction with Appwrite's Document service within n8n workflows. Specifically, the "Get" operation for the "Document" resource allows users to retrieve a single document from a specified collection in an Appwrite database. This is useful when you need to fetch detailed data stored in Appwrite documents by their unique IDs.
Common scenarios include:
- Retrieving user profile information stored as documents.
- Fetching configuration or settings documents for use in automation.
- Accessing specific records for processing or conditional logic in workflows.
Example: You want to get a document representing a customer order by its ID from a particular collection and then use that data downstream in your workflow for invoicing or notifications.
Properties
| Name | Meaning |
|---|---|
| Database ID | The identifier of the Appwrite database where the target collection resides. |
| Collection ID | The identifier of the collection within the database containing the document. |
| Document ID | The unique identifier of the document to retrieve. By default, it generates a unique ID but can be customized to specify an existing document ID. |
| Additional Fields | Optional queries to filter or modify the retrieval. Supports multiple query types such as filtering by attribute values, pagination (cursor before/after), ordering, limits, and selecting specific attributes to return. |
The "Additional Fields" property supports complex query options including:
- Between
- Contains
- Cursor After / Before (pagination)
- Ends With / Starts With
- Equal / Not Equal
- Greater Than / Less Than (and inclusive variants)
- Is Null / Is Not Null
- Limit and Offset for pagination
- Order Ascending / Descending
- Search (full-text search on indexed attributes)
- Select (to specify which document attributes to return)
These allow fine-tuning the document retrieval beyond just specifying the document ID.
Output
The output is a JSON array containing the retrieved document(s) as objects. Each object represents a document with its attributes as key-value pairs.
- The
jsonfield contains the document data fetched from Appwrite. - If multiple documents are returned (e.g., when using filters that match multiple documents), all matching documents will be included in the array.
- No binary data is output by this operation.
Dependencies
- Requires an active Appwrite project with API access.
- Needs credentials configured in n8n providing the Appwrite endpoint URL, project ID, and an API key or authentication token.
- The node uses the official Appwrite SDK (
node-appwrite) internally to communicate with the Appwrite server.
Troubleshooting
- Invalid Document ID: If the specified document ID does not exist, the node may throw an error indicating the document was not found. Verify the ID and ensure the document exists in the specified collection.
- Permission Denied: Insufficient permissions or incorrect API keys can cause authorization errors. Ensure the API key has read access to the database and collection.
- Incorrect Database or Collection ID: Using wrong identifiers will result in errors or empty results. Double-check these IDs.
- Malformed Queries: When using additional query filters, invalid or unsupported query parameters may cause failures. Refer to Appwrite's documentation on supported filters.
- Network Issues: Connectivity problems between n8n and the Appwrite server can cause timeouts or connection errors.
To resolve errors, verify credentials, IDs, and query parameters carefully. Enable debug logging in n8n to see detailed error messages.