{
  "name": "AI Reel Factory - RSS Feed Monitor",
  "nodes": [
    {
      "parameters": {
        "feedUrl": "={{ $env.RSS_FEEDS.split(',')[0] }}",
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        },
        "options": {
          "includeContent": true
        }
      },
      "id": "rss-feed-trigger",
      "name": "RSS Feed Reader",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "amount": 1,
        "unit": "items"
      },
      "id": "limit-items",
      "name": "Limit to Latest Item",
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "model": "gpt-4-turbo-preview",
        "messages": {
          "values": [
            {
              "content": "=Based on this article, create a short-form video topic:\n\nTitle: {{ $json.title }}\nContent: {{ $json.content }}\n\nCreate a viral, engaging video topic that:\n- Captures the key insight from the article\n- Is optimized for 15-60 second reels\n- Has a strong hook\n- Is shareable and trendy\n\nProvide ONLY the topic (one sentence)."
            }
          ]
        },
        "options": {
          "temperature": 0.8,
          "maxTokens": 100
        }
      },
      "id": "generate-topic-from-rss",
      "name": "Generate Topic from RSS (GPT-4)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.3,
      "position": [
        650,
        300
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "topic",
              "value": "={{ $json.topic }}"
            },
            {
              "name": "source_url",
              "value": "={{ $json.link }}"
            },
            {
              "name": "source_title",
              "value": "={{ $json.title }}"
            }
          ]
        }
      },
      "id": "prepare-workflow-data",
      "name": "Prepare Workflow Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.2,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {
        "workflowId": "={{ $parameter.mainWorkflowId }}",
        "parameters": {
          "topic": "={{ $json.topic }}",
          "source_url": "={{ $json.source_url }}",
          "source_title": "={{ $json.source_title }}"
        },
        "options": {
          "waitForCompletion": true
        }
      },
      "id": "execute-main-workflow",
      "name": "Execute Main Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1,
      "position": [
        1050,
        300
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "={{ $env.GOOGLE_SHEETS_ID }}",
          "mode": "list",
          "cachedResultName": "Video Queue"
        },
        "sheetName": {
          "__rl": true,
          "value": "RSS Log",
          "mode": "list",
          "cachedResultName": "RSS Log"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Timestamp": "={{ $now.toISO() }}",
            "Source_Title": "={{ $json.source_title }}",
            "Source_URL": "={{ $json.source_url }}",
            "Generated_Topic": "={{ $json.topic }}",
            "Video_URL": "={{ $json.video_url }}",
            "Status": "posted"
          }
        },
        "options": {}
      },
      "id": "log-to-sheet",
      "name": "Log to Sheet (Optional)",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        1250,
        300
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "RSS Feed Reader": {
      "main": [
        [
          {
            "node": "Limit to Latest Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit to Latest Item": {
      "main": [
        [
          {
            "node": "Generate Topic from RSS (GPT-4)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Topic from RSS (GPT-4)": {
      "main": [
        [
          {
            "node": "Prepare Workflow Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Workflow Data": {
      "main": [
        [
          {
            "node": "Execute Main Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Main Workflow": {
      "main": [
        [
          {
            "node": "Log to Sheet (Optional)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2026-01-04T00:00:00.000Z",
  "versionId": "1"
}