Aria2 Trigger icon

Aria2 Trigger

Trigger on Aria2 events via WebSocket

Overview

This node acts as a trigger for Aria2 download manager events via a WebSocket connection. It listens to specific download-related events emitted by Aria2 and triggers workflows in n8n when those events occur. This is useful for automating tasks based on the state of downloads, such as notifying users when a download starts or completes, logging download errors, or pausing other processes while a download is active.

Practical examples:

  • Automatically move or process files once a download completes.
  • Send notifications or alerts when a download encounters an error.
  • Track download progress by reacting to start, pause, or stop events.

Properties

Name Meaning
Events The Aria2 download events to listen for. Options include:
- Download Started
- Download Paused
- Download Stopped
- Download Complete
- Download Error

Output

The node outputs JSON data each time one of the selected events occurs. The output structure includes:

  • event: The name of the event triggered (e.g., "downloadStart", "downloadComplete").
  • data: The parameters received from Aria2 related to the event, containing detailed information about the download status.

Example output JSON:

{
  "event": "downloadComplete",
  "data": {
    // event-specific details from Aria2
  }
}

No binary data output is produced by this node.

Dependencies

  • Requires an active WebSocket connection to an Aria2 instance configured with its WebSocket URL and secret token.
  • Needs an API key credential that provides the WebSocket URL and secret token for authentication.
  • The node depends on the ws WebSocket library to establish and manage the connection.

Troubleshooting

  • WebSocket connection issues: If the node cannot connect, verify the WebSocket URL and secret token are correct and that the Aria2 server is running with WebSocket support enabled.
  • No events triggering: Ensure the selected events match those emitted by your Aria2 instance and that the Aria2 configuration allows event notifications.
  • Error processing messages: Malformed or unexpected messages from the WebSocket may cause parsing errors; check Aria2 logs and ensure compatibility.
  • Connection drops: Network instability or server restarts can close the WebSocket connection; the node logs connection closures but does not automatically reconnect.

Links and References

Discussion