NAppwrite icon

NAppwrite

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

Overview

This node integrates with the Appwrite API to manage user-related operations within n8n workflows. Specifically, for the "Users" resource and the "Delete User Session" operation, it allows you to delete a specific session of a user by providing the user ID and the session ID. This is useful in scenarios where you want to programmatically revoke access or log out a user from a particular device or session.

Practical examples include:

  • Automatically logging out a user from a compromised session.
  • Managing active sessions as part of security compliance workflows.
  • Cleaning up stale or inactive sessions based on custom logic.

Properties

Name Meaning
User ID The unique identifier of the user whose session you want to delete.
Session ID The unique identifier of the session to be deleted for the specified user.

Output

The output JSON contains a single field success which indicates whether the deletion of the user session was successful (true) or not (false). The output structure looks like:

[
  {
    "success": true
  }
]

There is no binary data output for this operation.

Dependencies

  • Requires an active connection to an Appwrite server.
  • Needs credentials including the Appwrite API URL, project ID, and an API key credential configured in n8n.
  • Uses the official Appwrite Node.js SDK internally to perform API calls.

Troubleshooting

  • Common issues:

    • Invalid or missing User ID or Session ID parameters will cause the operation to fail.
    • Incorrect or expired API credentials can lead to authentication errors.
    • Attempting to delete a session that does not exist or already deleted may result in an error or a false success response.
  • Error messages:

    • Authentication errors typically indicate invalid API keys or insufficient permissions; verify your credentials.
    • "Resource not found" errors may occur if the user or session IDs are incorrect; double-check these values.
    • Network or connectivity errors suggest issues reaching the Appwrite server; ensure the URL and network settings are correct.

To resolve errors, confirm all input parameters are correct, check your API credentials, and ensure the Appwrite server is accessible.

Links and References

Discussion