Overview
The Documents - Delete operation in this custom n8n node allows you to delete a specific document from a collection within an Appwrite database. This is useful for workflows where you need to programmatically remove records, such as cleaning up outdated data, handling user requests for data deletion, or automating archival processes.
Example scenarios:
- Automatically deleting user data upon account removal.
- Removing obsolete documents after processing.
- Enabling admin panels or automation scripts to manage database content.
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 be deleted from the collection. |
Output
- The output will be a JSON object representing the result of the delete operation. Typically, for a successful delete request, Appwrite returns an empty object (
{}). - If an error occurs and "Continue On Fail" is enabled, the output will include an
errorfield with the error message.
Example output (success):
{}
Example output (failure, with Continue On Fail):
{
"error": "Document not found"
}
Dependencies
- Appwrite API: Requires access to an Appwrite server instance.
- Credentials: Needs valid Appwrite API credentials (Project ID, API Key, and API endpoint URL) configured in n8n under the credential type
appwriteApi.
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:
Resource Not Found: If the specified Database ID, Collection ID, or Document ID does not exist.
- Error message:
Document not foundor similar. - Resolution: Verify that all IDs are correct and the document exists.
- Error message:
Insufficient Permissions: The API key may lack permission to delete documents.
- Error message: Permission denied or unauthorized.
- Resolution: Ensure the API key has the necessary permissions in Appwrite.
Network Issues: Problems connecting to the Appwrite server.
- Error message: Network error, timeout, or connection refused.
- Resolution: Check network connectivity and Appwrite server status.