Appwrite icon

Appwrite

A comprehensive node for the Appwrite API

Overview

This node integrates with the Appwrite API to manage collections within a specified database. Specifically, the Delete Collection operation removes a collection identified by its unique ID from a given database. This is useful when you want to clean up or reorganize your database schema by removing obsolete or unused collections.

Practical examples:

  • Deleting a temporary collection used for testing purposes.
  • Removing a collection that is no longer relevant to your application data model.
  • Automating cleanup tasks in your database as part of a workflow.

Properties

Name Meaning
Database ID The ID of the database where the collection exists and from which it will be deleted.
Collection ID The unique identifier of the collection to delete.

Output

The output JSON contains a simple success confirmation object:

{
  "success": true
}

This indicates that the collection was successfully deleted. If an error occurs, the node throws an error with details about the failure.

No binary data is output by this operation.

Dependencies

  • Requires an active connection to the Appwrite API via an API key credential configured in n8n.
  • The node uses the Appwrite client library internally to communicate with the Appwrite server.
  • Proper permissions on the Appwrite project are necessary to delete collections.

Troubleshooting

  • Common issues:

    • Invalid or missing Database ID or Collection ID parameters will cause the operation to fail.
    • Insufficient permissions or invalid API credentials can result in authorization errors.
    • Attempting to delete a collection that does not exist will return an error.
  • Error messages:

    • Errors returned from the Appwrite API are propagated and include response details.
    • Typical error includes "Not Found" if the collection ID is incorrect.
    • "Unauthorized" or "Forbidden" errors indicate credential or permission problems.
  • Resolution tips:

    • Verify that the Database ID and Collection ID are correct and exist in your Appwrite project.
    • Ensure the API key credential has sufficient rights to perform deletion.
    • Use the node's "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

Discussion