ZAppwrite icon

ZAppwrite

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

Overview

This node integrates with the Appwrite API to manage tokens related to files stored in Appwrite storage buckets. Specifically, the "List Tokens" operation under the "Token" resource retrieves a list of tokens associated with a particular file within a specified storage bucket.

Use cases include:

  • Retrieving all access tokens generated for a specific file to audit or manage permissions.
  • Automating workflows that need to verify or display token information for files stored in Appwrite.
  • Integrating token management into larger automation pipelines involving file storage and access control.

Example: You have a file stored in an Appwrite bucket and want to list all tokens that grant access to this file, perhaps to revoke some or monitor usage.

Properties

Name Meaning
Bucket ID The unique identifier of the storage bucket where the file resides.
File ID The unique identifier of the file for which you want to list the associated tokens.

Output

The output is a JSON array containing token objects related to the specified file in the given bucket. Each token object typically includes details such as token ID, expiration, and other metadata provided by the Appwrite API.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to an Appwrite server via its API.
  • Needs credentials including the Appwrite endpoint URL, project ID, and an API key credential configured in n8n.
  • Uses the official Appwrite SDK (node-appwrite) internally to communicate with the Appwrite API.

Troubleshooting

  • Common issues:

    • Invalid or missing Bucket ID or File ID parameters will cause the API call to fail.
    • Incorrect or expired API credentials can lead to authentication errors.
    • Network connectivity problems between n8n and the Appwrite server may cause timeouts or connection errors.
  • Error messages:

    • Authentication errors indicate invalid API keys or insufficient permissions; verify credentials and permissions.
    • "Resource not found" errors may occur if the bucket or file IDs do not exist; double-check the IDs.
    • API rate limits or quota exceeded errors require checking Appwrite server limits.
  • Resolution tips:

    • Ensure the Bucket ID and File ID are correct and correspond to existing resources.
    • Confirm that the API key has sufficient permissions to list tokens.
    • Check network connectivity and firewall settings.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully in workflows.

Links and References

Discussion