{
  "name": "Vorlux AI | Competitor Content Monitor",
  "nodes": [
    {
      "id": "7cbc806f-6166-4356-85ac-41bc1b980152",
      "name": "Daily 7AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        220,
        300
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      }
    },
    {
      "id": "4aeaab67-8c99-49aa-abb4-cb6d32b5191c",
      "name": "Check RSS Feeds",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        460,
        300
      ],
      "parameters": {
        "method": "GET",
        "url": "={{$env.VORLUX_HUB_URL}}/api/content/rss/feeds?category=competitor",
        "options": {
          "timeout": 15000
        }
      },
      "notes": "Gets competitor RSS feeds configured in Hub"
    },
    {
      "id": "dae8a656-7dab-4557-8ad0-375a6182631a",
      "name": "Analyze Content",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        700,
        300
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "const feeds = $input.first().json.data || [];\nconst articles = [];\nfor (const feed of feeds) {\n  for (const art of (feed.articles || []).slice(0, 3)) {\n    articles.push({\n      source: feed.name,\n      title: art.title,\n      url: art.link,\n      published: art.pubDate,\n      summary: (art.description || '').substring(0, 300)\n    });\n  }\n}\n// Find topics we haven't covered\nconst gaps = articles.filter(a => {\n  const keywords = (a.title || '').toLowerCase().split(/\\s+/);\n  return keywords.some(k => ['ai', 'streaming', 'gpu', 'vtuber', 'content', 'creator'].includes(k));\n});\nreturn [{json: {articles: articles.length, gaps: gaps.slice(0, 5), sources: feeds.length}}];"
      },
      "notes": "Identifies competitor content gaps we could cover"
    },
    {
      "id": "c2e4b6fc-a346-4450-8759-5cd450f77ccf",
      "name": "Create Opportunity Topics",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        940,
        200
      ],
      "parameters": {
        "method": "POST",
        "url": "={{$env.VORLUX_HUB_URL}}/api/content/topics/batch",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({topics: $json.gaps.map(g => ({title: \"Counter: \" + g.title, url: g.url, source: \"competitor_\" + g.source, relevance: 7}))}) }}",
        "options": {
          "timeout": 15000
        }
      }
    },
    {
      "id": "3b30c3ac-65ab-43aa-9b17-7ccb487879c3",
      "name": "Report",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        940,
        400
      ],
      "parameters": {
        "method": "POST",
        "url": "={{$env.DISCORD_CONTENT_WEBHOOK}}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"embeds\":[{\"title\":\"\ud83d\udd0d Competitor Monitor\",\"description\":\"{{ $json.articles }} articles scanned from {{ $json.sources }} sources\\n{{ $json.gaps.length }} content gaps identified:\\n{{ $json.gaps.map(g => \"\u2022 \" + g.title + \" (\" + g.source + \")\").join(\"\\\\n\") }}\",\"color\":16753920}]}",
        "options": {
          "timeout": 10000
        }
      }
    }
  ],
  "connections": {
    "Daily 7AM": {
      "main": [
        [
          {
            "node": "Check RSS Feeds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check RSS Feeds": {
      "main": [
        [
          {
            "node": "Analyze Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Content": {
      "main": [
        [
          {
            "node": "Create Opportunity Topics",
            "type": "main",
            "index": 0
          },
          {
            "node": "Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "saveExecutionProgress": true
  }
}