Overview
The Documents → Get operation in this custom n8n node allows you to retrieve a specific document from an Appwrite database collection by its ID. This is useful for workflows where you need to fetch and process data stored in Appwrite, such as looking up user profiles, retrieving configuration records, or accessing any structured data managed within your Appwrite project.
Practical examples:
- Fetching a user's profile information by their document ID.
- Retrieving a configuration or settings document for use in subsequent workflow steps.
- Accessing a record to check its status before performing updates or deletions.
Properties
| Name | Type | Meaning |
|---|---|---|
| Database ID | String | The unique identifier of the Appwrite database containing the document. |
| Collection ID | String | The unique identifier of the collection within the database. |
| Document ID | String | The unique identifier of the document to retrieve from the collection. |
Output
The output will be a JSON object representing the requested document. The structure of this object depends on the schema defined in your Appwrite collection, but it typically includes:
- All fields stored in the document (as key-value pairs).
- System metadata such as
$id,$collectionId,$databaseId,$createdAt,$updatedAt, etc.
Example output:
{
"$id": "unique_document_id",
"$collectionId": "your_collection_id",
"$databaseId": "your_database_id",
"$createdAt": "2024-06-01T12:00:00.000Z",
"$updatedAt": "2024-06-01T12:00:00.000Z",
"field1": "value1",
"field2": "value2"
}
Dependencies
- Appwrite API: Requires access to an Appwrite instance with the appropriate API credentials (Project ID and API Key).
- n8n Credentials: You must configure the
appwriteApicredential in n8n, including the Appwrite endpoint URL, Project ID, and API Key.
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.
- Error message:
- Document not found: If the specified Document ID does not exist in the given collection/database.
- Error message: Typically a 404 error from Appwrite.
- Resolution: Verify that the Database ID, Collection ID, and Document ID are correct.
- Insufficient permissions: The API Key may lack permission to read documents.
- Resolution: Ensure the API Key has the necessary roles/scopes in Appwrite.