Description
Overview
This torrent search and download automation workflow streamlines torrent retrieval and download initiation based on a given movie title. Designed as an event-driven orchestration pipeline, it listens for HTTP POST requests and uses a no-code integration approach to interface with torrent providers and Transmission download client.
The workflow triggers via an HTTP POST webhook node configured to receive raw JSON bodies containing a movie title. It targets users needing automated torrent acquisition and download management with deterministic notification outputs.
Key Benefits
- Automates torrent search across KickassTorrents and Rarbg providers for comprehensive results.
- Initiates torrent downloads directly in Transmission with session-based authentication handling.
- Sends real-time Telegram notifications on torrent search success or failure, supporting immediate feedback.
- Implements error handling for Transmission session token refresh on HTTP 409 conflict responses.
Product Overview
This automation workflow begins with a webhook node configured to accept HTTP POST requests containing a JSON payload with a movie title parameter. Upon receiving a request, the workflow extracts the title and executes a search via a function node that integrates the torrent-search-api library, connecting to KickassTorrents and Rarbg providers. Up to five torrent results are retrieved and evaluated for availability.
If torrents are found, the workflow proceeds to add the first torrent’s magnet link to Transmission, a BitTorrent client, using an HTTP request node with basic authentication. The download directory is predefined as “/media/FILM/TORRENT” and downloads start immediately (paused: false). The workflow includes error detection for HTTP 409 responses, which indicate session expiration, triggering a retry mechanism to refresh the Transmission session token dynamically.
Notification nodes send status updates via Telegram, informing whether the torrent was found and download started or if the requested torrent was unavailable. This integration pipeline operates synchronously in event-driven cycles, processing each incoming request independently without data persistence beyond runtime.
Features and Outcomes
Core Automation
This torrent search and download automation workflow processes HTTP POST inputs containing movie titles, applies search logic across multiple torrent providers, and deterministically branches based on search results.
- Single-pass evaluation of search results to determine torrent availability.
- Conditional branching ensures either download initiation or failure notification.
- Automated retry with dynamic session token refresh upon Transmission 409 status.
Integrations and Intake
The orchestration pipeline integrates with KickassTorrents and Rarbg via the torrent-search-api library for torrent discovery. It also connects to Transmission using HTTP POST with basic authentication and Telegram for messaging.
- Webhook input expects JSON with a “title” field for torrent search queries.
- Transmission RPC accessed with basic auth credentials to add torrents.
- Telegram bot API used for asynchronous notifications to predefined chat IDs.
Outputs and Consumption
The workflow outputs include HTTP requests to Transmission for torrent addition and Telegram messages communicating workflow status. Outputs are asynchronous notifications and direct API calls without intermediate storage.
- Transmission RPC receives JSON commands with magnet link and download directory details.
- Telegram messages include formatted text with movie and torrent titles.
- Workflow returns enriched JSON objects internally, but external outputs are API calls and messages only.
Workflow — End-to-End Execution
Step 1: Trigger
The workflow initiates via an HTTP POST webhook node configured to receive raw JSON bodies at a specified path. The incoming payload must include a “title” representing the movie name to search.
Step 2: Processing
The function node parses the payload to extract and trim the movie title. It uses the torrent-search-api library to query KickassTorrents and Rarbg providers for up to five matching torrents. Basic presence checks ensure the title field exists before proceeding.
Step 3: Analysis
An IF node evaluates whether torrents were found by checking a boolean flag set by the search node. If true, it triggers the download process; if false, it routes to a notification node indicating no torrents were found.
Step 4: Delivery
The workflow sends a POST request to Transmission to add the magnet link of the first torrent found, with authentication and a static session ID header. If Transmission responds with HTTP 409 indicating an invalid session, a retry node dynamically updates the session token header and resubmits. Upon success, Telegram notifications are dispatched with the download status.
Use Cases
Scenario 1
A media server administrator wants to automate movie downloads by title submission. The workflow enables automatic torrent searches and triggers downloads in Transmission without manual intervention, providing immediate Telegram notifications on success or failure.
Scenario 2
A user needs to streamline torrent acquisition from multiple providers without switching platforms. This orchestration pipeline consolidates search results from KickassTorrents and Rarbg, ensuring faster decision-making and download initiation based on a single input event.
Scenario 3
When Transmission sessions expire, manual restarts are required. This workflow automatically detects session token expiration via HTTP 409 errors and retries the add operation using updated tokens, reducing operational downtime and manual maintenance.
How to use
To deploy this torrent search and download automation workflow, import it into the n8n environment and configure the webhook node with a valid HTTP POST path. Set up Transmission basic authentication credentials and Telegram bot credentials within n8n’s credential manager.
Submit HTTP POST requests with JSON bodies containing a “title” field representing the movie name. The workflow will automatically handle torrent searching, download initiation, error handling for session expiration, and status notifications via Telegram. Expect Telegram messages indicating whether the torrent was found and download started or not found.
Comparison — Manual Process vs. Automation Workflow
| Attribute | Manual/Alternative | This Workflow |
|---|---|---|
| Steps required | Multiple manual searches and downloads via UI, plus manual notifications. | Single automated pipeline from webhook to download and notification. |
| Consistency | Subject to human error and inconsistent monitoring. | Deterministic logic with conditional branching and error retries. |
| Scalability | Limited by user availability and manual input speed. | Scales with incoming webhook requests without manual intervention. |
| Maintenance | Manual session token refresh and error handling required. | Automated session token management and retry mechanism included. |
Technical Specifications
| Environment | n8n workflow automation platform |
|---|---|
| Tools / APIs | torrent-search-api (KickassTorrents, Rarbg), Transmission RPC, Telegram Bot API |
| Execution Model | Event-driven, HTTP POST webhook triggered |
| Input Formats | Raw JSON via HTTP POST with “title” field |
| Output Formats | HTTP JSON RPC requests to Transmission, Telegram messages (text) |
| Data Handling | Transient in-memory processing; no persistence |
| Known Constraints | Relies on external torrent providers and Transmission availability |
| Credentials | Basic authentication for Transmission, Telegram Bot token |
Implementation Requirements
- Valid Transmission RPC server with basic authentication enabled.
- Telegram bot credentials configured with chat IDs for notifications.
- Network access from n8n instance to Transmission RPC and Telegram API endpoints.
Configuration & Validation
- Deploy workflow and set webhook path to receive POST requests with valid JSON including “title”.
- Verify Transmission RPC credentials and connectivity by testing manual POST request to add torrent.
- Test Telegram bot credentials and chat ID by sending a test message via n8n Telegram node.
Data Provenance
- Trigger node: Webhook (type n8n-nodes-base.webhook) receives movie title JSON.
- Search node: FunctionItem node “SearchTorrent” uses torrent-search-api with KickassTorrents and Rarbg enabled.
- Output nodes: HTTP Request node “Start download” and “Start download new token” handle Transmission RPC calls; Telegram nodes send notification messages.
FAQ
How is the torrent search and download automation workflow triggered?
The workflow starts upon receiving an HTTP POST request at a configured webhook path containing a JSON payload with a “title” field specifying the movie name.
Which tools or models does the orchestration pipeline use?
The pipeline uses the torrent-search-api library to query KickassTorrents and Rarbg providers, Transmission RPC for torrent downloads, and Telegram Bot API for notifications.
What does the response look like for client consumption?
Clients receive asynchronous Telegram messages indicating whether the torrent was found and download started, but the workflow itself does not return direct HTTP responses beyond webhook acknowledgment.
Is any data persisted by the workflow?
No persistent data storage is implemented; all processing and data handling occur transiently during workflow execution.
How are errors handled in this integration flow?
Transmission session expiration errors (HTTP 409) trigger a retry with a refreshed session token header. Other errors default to platform-level handling without explicit workflow retries.
Conclusion
This torrent search and download automation workflow provides a deterministic, event-driven pipeline to find and download movie torrents based on incoming titles via HTTP POST. It integrates multiple torrent providers and manages Transmission session tokens automatically, reducing manual intervention. While it requires reliable external API availability and correct credential configuration, it delivers consistent torrent acquisition and real-time Telegram notifications. The approach prioritizes transient data handling and error-aware retry logic to maintain operational continuity.








Reviews
There are no reviews yet.