ZAppwrite icon

ZAppwrite

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

Overview

The node integrates with the Appwrite API to perform various operations on different resources. Specifically, for the Users resource and the List User Logs operation, it retrieves the logs associated with a specified user. This is useful for auditing user activity, monitoring security events, or troubleshooting user-related issues within an application managed by Appwrite.

Practical examples include:

  • Fetching login/logout history of a user.
  • Reviewing changes or actions performed by a user.
  • Monitoring suspicious activities by analyzing user logs.

Properties

Name Meaning
User ID The unique identifier of the user whose logs you want to list.

Output

The output is a JSON array containing the user logs retrieved from Appwrite for the specified user ID. Each item in the array represents a log entry related to the user's activities or events.

The structure of each log entry depends on the Appwrite API response but typically includes details such as timestamps, event types, IP addresses, and other metadata relevant to user actions.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to an Appwrite server.
  • Needs credentials including the Appwrite endpoint URL, project ID, and an API key credential with permissions to access user logs.
  • The node uses the official Appwrite SDK (node-appwrite) internally to communicate with the Appwrite API.

Troubleshooting

  • Common Issues:

    • Invalid or missing User ID parameter will cause the operation 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 failures.
  • Error Messages:

    • Authentication errors indicating invalid API keys or insufficient permissions require checking and updating the API credentials.
    • "Resource not found" or similar errors may indicate that the specified user does not exist.
    • If the node throws an error about the resource or operation, verify that the Resource is set to "Users" and Operation to "List User Logs".

Links and References

Discussion