Send to Logs icon

Send to Logs

Send logs to Appwrite database for persistent storage and viewing

Send to Logs

AI-generated

Overview

This node sends log entries to an Appwrite database for persistent storage and later viewing. It supports logging custom messages, full item data, specific fields, or a combination of message and data. The node is useful for workflows that require centralized logging of events, errors, or status updates, enabling users to track and analyze workflow executions over time. For example, it can log user activity, error reports, or system status messages to an Appwrite collection.

Use Case Examples

  1. Logging a custom message about user processing status.
  2. Logging the full JSON data of workflow items for detailed audit.
  3. Logging specific fields like username and email for concise logs.
  4. Logging both a custom message and the full data for comprehensive logs.

Properties

Name Meaning
Appwrite Configuration Notice about the node's purpose to save logs to Appwrite.
Log Level Specifies the severity or importance level of the log entry.
What to Log Determines the type of content to log: custom message, full data, specific fields, or both message and data.
Message Custom message to log, supporting n8n expressions. Shown only if logging message or both.
Fields to Log Comma-separated list of specific fields to log from the item data. Shown only if logging specific fields.
Appwrite Endpoint The API endpoint URL for the Appwrite service.
Appwrite Project ID The project identifier in Appwrite where logs will be stored.
Appwrite API Key API key used to authenticate requests to Appwrite.
Appwrite Database ID The database ID in Appwrite to store the log documents.
Appwrite Collection ID The collection ID in Appwrite database to store logs.
Options Additional options for log formatting and metadata inclusion.

Output

JSON

  • _logSent
    • level - The log level used for the entry.
    • message - The log message content sent to Appwrite.
    • timestamp - Timestamp when the log entry was created.
    • saved - Boolean indicating if the log was successfully saved.

Dependencies

  • Appwrite API endpoint
  • Appwrite project ID
  • Appwrite API key
  • Appwrite database ID
  • Appwrite collection ID

Troubleshooting

  • Ensure all required Appwrite credentials and IDs are correctly configured to avoid authentication or API errors.
  • If the node fails to save logs, check network connectivity and Appwrite service availability.
  • Error messages from Appwrite API include status codes and response text; verify the API key and permissions.
  • If logs do not appear in Appwrite, confirm the database and collection IDs are correct and exist.

Links

Discussion