n8n-nodes-tornado-api 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  Download YouTube videos & Spotify podcasts directly in your n8n workflows.
4
4
 
5
+ ## What's New in v1.1.0
6
+
7
+ - **🎬 Video Clipping**: Extract segments with `clip_start` and `clip_end` timestamps
8
+ - **📺 Live Stream Recording**: Record live streams with `live_recording`, `live_from_start`, `max_duration`
9
+ - **📊 Resolution Selection**: Limit quality with `max_resolution` (4K, 1080p, 720p, etc.)
10
+ - **📈 Dashboard Resource**: New operations for stats, daily metrics, cluster activity, billing
11
+ - **🔔 Enhanced Webhook Trigger**: New events (`batch_completed`, `progress`) and `job_id` filter
12
+ - **⚡ Progress Webhooks**: Get real-time updates during download/mux/upload stages
13
+
5
14
  ## Installation
6
15
 
7
16
  ### Via npm (recommended)
@@ -47,6 +56,18 @@ Creates a download job. Returns immediately with a `job_id`.
47
56
  | Filename | string | ❌ | Custom filename |
48
57
  | Folder | string | ❌ | S3 folder prefix |
49
58
  | Webhook URL | string | ❌ | Notification URL |
59
+ | Audio Only | boolean | ❌ | Extract audio only |
60
+ | Download Subtitles | boolean | ❌ | Download subtitles |
61
+ | Download Thumbnail | boolean | ❌ | Download thumbnail |
62
+ | Quality Preset | select | ❌ | highest, high, medium, low, lowest |
63
+ | Max Resolution | select | ❌ | best, 2160, 1440, 1080, 720, 480, 360 |
64
+ | Clip Start | string | ❌ | Start timestamp (HH:MM:SS or seconds) |
65
+ | Clip End | string | ❌ | End timestamp (HH:MM:SS or seconds) |
66
+ | Live Recording | boolean | ❌ | Enable live stream mode |
67
+ | Live From Start | boolean | ❌ | Record from stream beginning |
68
+ | Max Duration | number | ❌ | Max recording duration (seconds) |
69
+ | Wait for Video | boolean | ❌ | Wait for scheduled streams |
70
+ | Enable Progress Webhook | boolean | ❌ | Receive progress updates |
50
71
 
51
72
  **Output (YouTube):**
52
73
  ```json
@@ -89,18 +110,91 @@ Check the current status of a job.
89
110
 
90
111
  ---
91
112
 
92
- ### Job Wait for Completion
113
+ ### Dashboard Operations (NEW in v1.1.0)
93
114
 
94
- Polls until the job is complete or fails. **Best for simple workflows.**
115
+ Monitor your Tornado API usage directly from n8n.
95
116
 
96
- **Input:**
97
- | Field | Type | Default | Description |
98
- |-------|------|---------|-------------|
99
- | Job ID | string | - | The job UUID |
100
- | Timeout | number | 600 | Max wait time (seconds) |
101
- | Poll Interval | number | 5 | Time between checks (seconds) |
117
+ #### Dashboard → Get Stats
118
+ Get aggregated statistics for your API key.
119
+
120
+ **Output:**
121
+ ```json
122
+ {
123
+ "total_jobs": 1523,
124
+ "pending_jobs": 5,
125
+ "processing_jobs": 12,
126
+ "completed_jobs": 1450,
127
+ "failed_jobs": 56,
128
+ "storage_used_gb": 50.0,
129
+ "avg_processing_time_seconds": 45.2
130
+ }
131
+ ```
132
+
133
+ #### Dashboard → Get Daily Stats
134
+ Get job statistics for the last 7 days.
135
+
136
+ **Output:**
137
+ ```json
138
+ {
139
+ "daily_stats": [
140
+ { "date": "2024-01-08", "completed": 45, "failed": 2 },
141
+ { "date": "2024-01-09", "completed": 62, "failed": 5 }
142
+ ]
143
+ }
144
+ ```
145
+
146
+ #### Dashboard → Get Cluster Stats
147
+ Get real-time cluster activity.
148
+
149
+ **Output:**
150
+ ```json
151
+ {
152
+ "total_downloading": 45,
153
+ "total_muxing": 12,
154
+ "total_uploading": 8
155
+ }
156
+ ```
157
+
158
+ #### Dashboard → Get Billing
159
+ Get Stripe billing information.
160
+
161
+ **Output:**
162
+ ```json
163
+ {
164
+ "billing_enabled": true,
165
+ "total_usage_gb": 45.67,
166
+ "period_start_formatted": "Jan 01, 2024",
167
+ "period_end_formatted": "Feb 01, 2024"
168
+ }
169
+ ```
170
+
171
+ ---
172
+
173
+ ## 🔔 Webhook Trigger (NEW events in v1.1.0)
102
174
 
103
- **Output:** Same as Get Status (when completed)
175
+ Listen for Tornado events in real-time.
176
+
177
+ | Event | Description |
178
+ |-------|-------------|
179
+ | Job Completed | When a job finishes successfully |
180
+ | Job Failed | When a job fails |
181
+ | Batch Completed | When all episodes in a batch are done |
182
+ | Progress Update | Real-time progress (downloading, muxing, uploading) |
183
+ | Any Event | Trigger on all events |
184
+
185
+ **Filter Options:**
186
+ - Filter by Job ID
187
+ - Filter by Batch ID
188
+
189
+ **Example Progress Webhook Payload:**
190
+ ```json
191
+ {
192
+ "type": "progress",
193
+ "job_id": "550e8400-...",
194
+ "stage": "muxing",
195
+ "progress_percent": 33
196
+ }
197
+ ```
104
198
 
105
199
  ---
106
200
 
@@ -156,16 +250,18 @@ Google Drive node:
156
250
 
157
251
  ## 🔄 Workflow Examples
158
252
 
159
- ### Example 1: Simple YouTube Download
253
+ ### Example 1: Simple YouTube Download with Polling
254
+
255
+ Use n8n's **Wait** and **IF** nodes to poll for job completion:
160
256
 
161
257
  ```
162
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
163
- │ Trigger │ → │ Tornado API │ → │ Tornado API │
164
- │ (Manual) │ │ Job:Create │ │ Job:Wait
165
- └─────────────┘ └─────────────┘ └─────────────┘
166
-
167
-
168
- { job_id: ... } { s3_url: ... }
258
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
259
+ │ Trigger │ → │ Tornado API │ → │ Wait │ → │ Tornado API │ → │ IF │
260
+ │ (Manual) │ │ Job:Create │ │ (5 sec) │ │ Job:Status │ Completed? │
261
+ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
262
+
263
+
264
+ { job_id: ... } Loop back { s3_url: ... }
169
265
  ```
170
266
 
171
267
  **Node 1 - Tornado API (Create):**
@@ -173,25 +269,33 @@ Google Drive node:
173
269
  - Operation: Create
174
270
  - URL: `https://youtube.com/watch?v=dQw4w9WgXcQ`
175
271
 
176
- **Node 2 - Tornado API (Wait):**
272
+ **Node 2 - Wait:**
273
+ - Wait Time: 5 seconds
274
+
275
+ **Node 3 - Tornado API (Get Status):**
177
276
  - Resource: Job
178
- - Operation: Wait for Completion
179
- - Job ID: `{{ $json.job_id }}`
277
+ - Operation: Get Status
278
+ - Job ID: `{{ $('Tornado API').item.json.job_id }}`
279
+
280
+ **Node 4 - IF:**
281
+ - Condition: `{{ $json.status }}` equals `Completed`
282
+ - True: Continue to next step
283
+ - False: Loop back to Wait node
180
284
 
181
285
  ---
182
286
 
183
287
  ### Example 2: Download + Send to Telegram
184
288
 
185
289
  ```
186
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
187
- │ Telegram │ → │ Tornado API │ → │ Tornado API │ → │ Telegram │
188
- │ Trigger │ │ Job:Create │ │ Job:Wait │ │ Send Video │
189
- └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
290
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
291
+ │ Telegram │ → │ Tornado API │ → │ Wait │ → │ Tornado API │ → │ Telegram │
292
+ │ Trigger │ │ Job:Create │ │ + Loop │ │ Job:Status │ │ Send Video │
293
+ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
190
294
  ```
191
295
 
192
296
  **Telegram Trigger:** Receives YouTube URL from user
193
297
  **Tornado Create:** URL = `{{ $json.message.text }}`
194
- **Tornado Wait:** Job ID = `{{ $json.job_id }}`
298
+ **Wait + Loop:** Poll every 5 seconds until status = Completed
195
299
  **Telegram Send:** Video URL = `{{ $json.s3_url }}`
196
300
 
197
301
  ---
@@ -201,12 +305,12 @@ Google Drive node:
201
305
  ```
202
306
  ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
203
307
  │ Trigger │ → │ Tornado API │ → │ Split In │ → │ Tornado API │
204
- │ │ │ Job:Create │ │ Batches │ │ Job:Wait
308
+ │ │ │ Job:Create │ │ Batches │ │ Job:Status
205
309
  └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
206
-
207
-
208
- { batch_id: ...,
209
- episode_jobs: [...] }
310
+
311
+
312
+ { batch_id: ..., (with Wait + Loop
313
+ episode_jobs: [...] } for each job)
210
314
  ```
211
315
 
212
316
  **Tornado Create:**
@@ -217,8 +321,9 @@ Google Drive node:
217
321
  - Input: `{{ $json.episode_jobs }}`
218
322
  - Batch Size: 10
219
323
 
220
- **Tornado Wait (for each):**
324
+ **Tornado Get Status (with Wait + Loop):**
221
325
  - Job ID: `{{ $json }}`
326
+ - Loop until status = Completed
222
327
 
223
328
  ---
224
329
 
@@ -228,8 +333,8 @@ Use your own S3 bucket (AWS, Cloudflare R2, MinIO):
228
333
 
229
334
  ```
230
335
  ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
231
- │ Manual │ → │ Tornado API │ → │ Tornado API │ → │ Tornado API
232
- │ Trigger │ │ Storage: │ │ Job:Create │ │ Job:Wait
336
+ │ Manual │ → │ Tornado API │ → │ Tornado API │ → │ Wait
337
+ │ Trigger │ │ Storage: │ │ Job:Create │ │ + Loop
233
338
  │ │ │ Configure │ │ │ │ │
234
339
  └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
235
340
  │ │
@@ -253,12 +358,10 @@ Use your own S3 bucket (AWS, Cloudflare R2, MinIO):
253
358
  - Operation: Create
254
359
  - URL: `https://youtube.com/watch?v=...`
255
360
 
256
- **Node 3 - Tornado API (Wait):**
257
- - Resource: Job
258
- - Operation: Wait for Completion
259
- - Job ID: `{{ $json.job_id }}`
361
+ **Node 3 - Wait + Loop:**
362
+ - Use n8n Wait node (5 seconds) + Get Status + IF node to poll until completed
260
363
 
261
- **Output:**
364
+ **Output (when completed):**
262
365
  ```json
263
366
  {
264
367
  "status": "Completed",