Actions25
- Document Actions
- Function Actions
- Storage Actions
- Users Actions
Overview
This node integrates with the Appwrite API to perform various operations on Appwrite resources. Specifically, for the Document resource and the Update operation, it updates an existing document within a specified database and collection in Appwrite. This is useful when you want to modify or add attributes to documents stored in your Appwrite backend directly from an n8n workflow.
Common scenarios include:
- Updating user profiles or records stored as documents.
- Modifying configuration or settings documents dynamically.
- Syncing data changes from other systems into Appwrite documents.
Example: You have a document representing a customer order, and you want to update its status or add new fields like shipment tracking info.
Properties
| Name | Meaning |
|---|---|
| Database ID | The identifier of the Appwrite database where the document resides. |
| Collection ID | The identifier of the collection within the database that contains the document. |
| Document ID | The unique identifier of the document to update. |
| Body | A JSON object containing the key-value pairs representing the fields and values to update in the document. |
Output
The node outputs a JSON array containing the updated document's data as returned by the Appwrite API. This includes all document attributes after the update operation.
If the update is successful, the output JSON will represent the full document with the applied changes.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to an Appwrite server.
- Needs credentials including the Appwrite endpoint URL, project ID, and an API key or authentication token configured in n8n.
- Uses the official Appwrite SDK (
node-appwrite) internally to communicate with the Appwrite API.
Troubleshooting
Common issues:
- Invalid or missing
Database ID,Collection ID, orDocument IDwill cause the update to fail. - Malformed JSON in the
Bodyproperty can lead to errors. - Insufficient permissions or invalid API credentials will result in authorization errors.
- Trying to update a non-existent document will cause a "document not found" error.
- Invalid or missing
Error messages:
"Resource not found": Indicates the specified resource or operation is invalid or unsupported.- API errors from Appwrite (e.g., 401 Unauthorized, 404 Not Found) will be propagated and should be checked for correct IDs and credentials.
Resolution tips:
- Verify all IDs are correct and exist in your Appwrite instance.
- Ensure the API key has write permissions for the target database and collection.
- Validate the JSON structure in the
Bodyfield before running the node. - Use the node's "Continue On Fail" option to handle errors gracefully in workflows.