ZAppwrite icon

ZAppwrite

Use Appwrite's API from inside N8N, updated by @ZachHandley

Overview

The node provides integration with Appwrite's API, allowing users to manage various Appwrite resources directly within n8n workflows. Specifically, for the Token resource and the Delete Token operation, this node deletes a token identified by its unique Token ID. This is useful in scenarios where you need to revoke or remove access tokens programmatically, such as invalidating temporary file access or session tokens.

Practical example: If you have generated a file access token that should no longer be valid (e.g., after a user logs out or a file sharing period expires), you can use this node to delete that token automatically, ensuring security and proper access control.

Properties

Name Meaning
Token ID The unique identifier of the token to delete. This is a required string input, treated as sensitive information (password type).

Output

The output JSON contains a single object indicating the success of the deletion operation:

{
  "success": {
    "message": "Token deleted successfully"
  }
}

This confirms that the token was deleted without errors. There is no binary data output for this operation.

Dependencies

  • Requires an active connection to an Appwrite server.
  • Needs credentials including:
    • Appwrite API URL
    • Project ID
    • An API key or authentication token with permissions to manage tokens.
  • The node uses the official Appwrite SDK (node-appwrite) internally.
  • Proper configuration of the "zAppwriteApi" credential in n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or expired API key/credentials will cause authentication failures.
    • Providing an incorrect or non-existent Token ID will likely result in an error from the Appwrite API.
    • Network connectivity issues to the Appwrite server can cause request failures.
  • Error messages:

    • Errors thrown by the node typically come from the Appwrite API responses. For example, "Token not found" if the Token ID does not exist.
    • Authentication errors if credentials are invalid or missing.
  • Resolutions:

    • Verify that the API key and project ID are correct and have sufficient permissions.
    • Double-check the Token ID value before running the node.
    • Ensure the Appwrite server URL is reachable from the n8n instance.
    • Use the "Continue On Fail" option in the node settings to handle errors gracefully in workflows.

Links and References

Discussion