{ "name": "Recover a Magic Hour Video", "nodes": [ { "id": "1", "name": "Run manually", "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ 0, 300 ], "parameters": {} }, { "id": "2", "name": "Magic Hour", "type": "@gladiator1st/n8n-nodes-magichour.magicHour", "typeVersion": 1, "position": [ 250, 300 ], "parameters": { "resource": "video", "operation": "get", "videoProjectId": "YOUR_VIDEO_PROJECT_ID" } }, { "id": "3", "name": "Require complete", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ 500, 300 ], "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 }, "conditions": [ { "id": "status-complete", "leftValue": "={{ $json.status }}", "rightValue": "complete", "operator": { "type": "string", "operation": "equals" } } ], "combinator": "and" }, "options": {} } }, { "id": "4", "name": "Download result", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 750, 300 ], "parameters": { "url": "={{ $json.downloads[0].url }}", "options": { "response": { "response": { "responseFormat": "file", "outputPropertyName": "data" } } } } }, { "id": "5", "name": "Stop incomplete job", "type": "n8n-nodes-base.stopAndError", "typeVersion": 1, "position": [ 750, 500 ], "parameters": { "errorMessage": "={{ \"Generation is \" + $json.status + \". Keep project ID \" + $json.id + \" and resume with Get Details. Do not create another generation to retrieve it.\" }}" } } ], "connections": { "Run manually": { "main": [ [ { "node": "Magic Hour", "type": "main", "index": 0 } ] ] }, "Magic Hour": { "main": [ [ { "node": "Require complete", "type": "main", "index": 0 } ] ] }, "Require complete": { "main": [ [ { "node": "Download result", "type": "main", "index": 0 } ], [ { "node": "Stop incomplete job", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "active": false, "pinData": {}, "tags": [], "description": "Retrieve a completed video by its project ID without creating another paid generation; stop if unfinished." }