Appwrite icon

Appwrite

A comprehensive node for the Appwrite API

Overview

This node integrates with the Appwrite API to manage documents within a specified database and collection. Specifically, the "Delete Document" operation allows users to remove a document by its unique ID from a given collection inside a database. This is useful in scenarios where you need to programmatically clean up or remove outdated or unwanted data entries.

Practical examples include:

  • Deleting user-generated content that violates terms of service.
  • Removing temporary or test documents after processing.
  • Cleaning up records as part of a workflow automation when certain conditions are met.

Properties

Name Meaning
Database ID The identifier of the database containing the target collection.
Collection ID The identifier of the collection that contains the document to be deleted.
Document ID The unique identifier of the document to delete.

Output

The output JSON object for a successful delete operation contains a single field:

{
  "success": true
}

This indicates that the document was successfully deleted. There is no additional data returned about the deleted document.

If the operation fails, an error will be thrown describing the issue.

Dependencies

  • Requires an active connection to the Appwrite API via an API key credential configured in n8n.
  • The node depends on the Appwrite client library to communicate with the Appwrite backend.
  • Proper permissions must be granted to the API key to allow deletion of documents in the specified database and collection.

Troubleshooting

  • Common issues:

    • Invalid or missing Database ID, Collection ID, or Document ID will cause the operation to fail.
    • Insufficient permissions for the API key to delete documents.
    • Attempting to delete a non-existent document will result in an error.
    • Network connectivity issues with the Appwrite server.
  • Error messages and resolutions:

    • "Document not found": Verify the Document ID, Collection ID, and Database ID are correct.
    • "Permission denied": Ensure the API key has delete permissions for the target resource.
    • "Invalid credentials": Check that the API key credential is correctly configured in n8n.
    • General network errors: Confirm network access to the Appwrite endpoint.

Links and References

Discussion