{
  "name": "AutoFeed: RSS news -> daily AI slideshow -> YouTube",
  "nodes": [
    {
      "parameters": {
        "content": "# RSS news -> daily AI slideshow\nEvery day at 8:00 this reads a news feed, skips stories it already used, makes a 45-60 s AI Slideshow explaining the newest one and uploads it to YouTube.\n\nChange the feed URL in **Read feed** to your niche (tech, finance, sport...).\n\n## AutoFeed API key\n1. On AutoFeed.ai (Ultimate plan) open **Dashboard > API Keys** and create a key.\n2. In n8n create a **Header Auth** credential named `AutoFeed API key`:\n   - Name: `Authorization`\n   - Value: `Bearer af_live_...`\n3. Select it on every node that calls `www.autofeed.ai`.\n\nCost: 1,200 credits per 45-60 s slideshow.",
        "height": 500,
        "width": 460,
        "color": 4
      },
      "id": "f673c9e8-c1e0-43b2-9a2c-1765ee773dfe",
      "name": "Setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        -380
      ]
    },
    {
      "parameters": {
        "content": "## How the wait works\nThe create call passes `{{ $execution.resumeUrl }}` as `webhookUrl`. AutoFeed posts the finished video there and the **Wait** node resumes with it in `$json.body` (`status`, `url`, `error`).\n\nYour n8n must be reachable on public **https** (n8n Cloud is). On a local n8n, set the **Wait** node to wait 5 minutes, then add an HTTP GET to `/v1/videos/{{ id }}`, or use the AutoFeed community node with **Wait for Completion** on.\n\nA failed video is refunded automatically.",
        "height": 360,
        "width": 420,
        "color": 7
      },
      "id": "6b7f256a-46ab-4db7-9a42-9ce1a212cfc0",
      "name": "Webhook note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        740,
        -380
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "be59a1fc-225f-4017-8d36-e82ff25331c7",
      "name": "Every day at 8:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "url": "https://feeds.bbci.co.uk/news/technology/rss.xml",
        "options": {}
      },
      "id": "5111c69d-17c5-4062-bad2-8d2d0df7919b",
      "name": "Read feed",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.1,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "operation": "removeItemsSeenInPreviousExecutions",
        "dedupeValue": "={{ $json.link }}",
        "options": {}
      },
      "id": "6e33b4e6-d43a-4185-a0cf-24370918577e",
      "name": "Skip used stories",
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        440,
        0
      ]
    },
    {
      "parameters": {
        "maxItems": 1
      },
      "id": "36bab8c8-0f5f-4d4b-90a3-0346c7f3dd7f",
      "name": "Newest story",
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        660,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://www.autofeed.ai/api/v1/videos",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  type: 'ai_slideshow',\n  input: {\n    category: 'Write Your Own Story',\n    topic: 'Explain this news story in plain words for a short video. Headline: ' + $json.title + '. Summary: ' + ($json.contentSnippet || $json.content || '').slice(0, 1500),\n    duration: '45 to 60 seconds',\n    substyle: 'Realistic',\n    format: '9:16'\n  },\n  webhookUrl: $execution.resumeUrl,\n  idempotencyKey: ('rss-' + $json.link).slice(0, 255)\n}) }}",
        "options": {}
      },
      "id": "c20e9ba7-1aba-4a9c-bc51-274d7f674ac5",
      "name": "Create AutoFeed video",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        0
      ]
    },
    {
      "parameters": {
        "resume": "webhook",
        "httpMethod": "POST",
        "limitWaitTime": true,
        "limitType": "afterTimeInterval",
        "resumeAmount": 2,
        "resumeUnit": "hours",
        "options": {}
      },
      "id": "13acdadb-83d0-45c1-af61-a995c557a1e9",
      "name": "Wait for AutoFeed",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1100,
        0
      ],
      "webhookId": "b124009a-c7fa-4aa9-bcaa-d33885d60de7"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "1bf38f3c-0fb4-479c-b1fc-e71b6711bacc",
              "leftValue": "={{ $json.body.status }}",
              "rightValue": "completed",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "5b63ad32-57c8-41f0-b5e1-534c10d48bf5",
      "name": "Completed?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1320,
        0
      ]
    },
    {
      "parameters": {
        "url": "={{ $json.body.url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "id": "b4e8d63b-2460-4862-a7bf-c5e64ea88636",
      "name": "Download MP4",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1540,
        -100
      ]
    },
    {
      "parameters": {
        "resource": "video",
        "operation": "upload",
        "title": "={{ $('Newest story').item.json.title.slice(0, 95) }}",
        "regionCode": "US",
        "categoryId": "22",
        "binaryProperty": "data",
        "options": {
          "privacyStatus": "public",
          "description": "=Source: {{ $('Newest story').item.json.link }}",
          "selfDeclaredMadeForKids": false
        }
      },
      "id": "37a500f1-c65f-4ad4-90a1-0051d4a3b2ee",
      "name": "Upload to YouTube",
      "type": "n8n-nodes-base.youTube",
      "typeVersion": 1,
      "position": [
        1760,
        -100
      ]
    },
    {
      "parameters": {},
      "id": "cc892d2b-0735-4348-8247-a34cebc19912",
      "name": "Log failure",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1540,
        120
      ]
    }
  ],
  "connections": {
    "Every day at 8:00": {
      "main": [
        [
          {
            "node": "Read feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read feed": {
      "main": [
        [
          {
            "node": "Skip used stories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip used stories": {
      "main": [
        [
          {
            "node": "Newest story",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Newest story": {
      "main": [
        [
          {
            "node": "Create AutoFeed video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create AutoFeed video": {
      "main": [
        [
          {
            "node": "Wait for AutoFeed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for AutoFeed": {
      "main": [
        [
          {
            "node": "Completed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Completed?": {
      "main": [
        [
          {
            "node": "Download MP4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download MP4": {
      "main": [
        [
          {
            "node": "Upload to YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "Turns the newest story of an RSS feed into a daily AutoFeed AI slideshow and posts it to YouTube Shorts."
  },
  "pinData": {},
  "tags": []
}