Appwrite icon

Appwrite

A comprehensive node for the Appwrite API

Overview

This node integrates with the Appwrite API to manage user-related data and operations. Specifically, for the User - List Sessions operation, it retrieves all active sessions associated with a specified user. This is useful in scenarios where you want to monitor or audit user activity, check which devices or locations a user is currently logged in from, or implement session management features such as forcing logout from certain sessions.

Practical examples:

  • An administrator wants to see all active sessions of a user to detect suspicious activity.
  • A security system that lists user sessions before allowing sensitive changes.
  • Building a dashboard showing users their current active sessions/devices.

Properties

Name Meaning
User ID The unique identifier of the user whose sessions you want to list. This is required.

Output

The output JSON contains an array of session objects representing each active session for the specified user. Each session object typically includes details such as session ID, creation time, expiration, IP address, device information, and other metadata provided by the Appwrite API about the user's sessions.

If the node encounters multiple sessions, it returns them as an array of JSON objects. There is no binary data output for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Appwrite API.
  • The node depends on the Appwrite client library internally to communicate with the Appwrite server.
  • Proper configuration of the Appwrite API credentials in n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing User ID: Ensure the User ID parameter is correctly set and corresponds to an existing user.
    • Authentication errors: Verify that the API key credential is valid and has sufficient permissions.
    • Network or connectivity problems: Check that the Appwrite server URL is reachable from the n8n instance.
  • Error messages:

    • Errors returned from the Appwrite API will be surfaced with details if available.
    • If the node fails due to an unknown error, it returns a generic message "An unknown error occurred."
    • To handle errors gracefully, enable the "Continue On Fail" option in the node settings.

Links and References

Discussion