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 data and actions. Specifically, for the Users resource and the List User Logs operation, it retrieves the logs associated with a specified user ID. This is useful for auditing user activity, monitoring security events, or tracking user behavior within an application.

Practical examples include:

  • Fetching login history or access logs for a user to investigate suspicious activity.
  • Retrieving user action logs for compliance or debugging purposes.
  • Integrating user log data into workflows for notifications or analytics.

Properties

Name Meaning
User ID The unique identifier of the user whose logs you want to list. This is a required string input.

Output

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

If the node supports binary data output (not indicated here), it would typically represent files or media related to the user logs, but this operation returns only JSON data.

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 (node-appwrite) internally.
  • The node depends on helper functions that interact with Appwrite's Users API endpoints.

Troubleshooting

  • Common issues:
    • Invalid or missing User ID 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 errors.
  • Error messages:
    • Errors returned from the Appwrite API are propagated; typical messages might include "User not found" if the User ID does not exist.
    • Authentication errors indicating invalid API keys or insufficient permissions.
  • Resolutions:
    • Verify the User ID is correct and exists in the Appwrite project.
    • Ensure API credentials are valid and have appropriate permissions.
    • Check network connectivity and firewall settings.

Links and References

Discussion