{
  "name": "SouthFLAI • Weekly technology news shortlist",
  "nodes": [
    {
      "id": "3995af5f-585d-5451-9ce6-327de18d2676",
      "name": "Test with sample headlines",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "ca638447-0d50-5752-b488-4cc69a65b0fd",
      "name": "Sample headlines",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        230,
        0
      ],
      "parameters": {
        "jsCode": "const date = new Date().toISOString();\nreturn [\n  {json: {title: 'Sample: Palm Beach startup opens AI workshop', link: 'https://example.org/ai-workshop', isoDate: date}},\n  {json: {title: 'Sample: Palm Beach startup opens AI workshop', link: 'https://example.org/ai-workshop', isoDate: date}},\n  {json: {title: 'Sample: Gallery adds weekend hours', link: 'https://example.org/gallery', isoDate: date}}\n];"
      }
    },
    {
      "id": "c8924c22-9e0f-5694-aaa6-fb42d3a949f7",
      "name": "Monday at 8 AM Eastern",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        220
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * 1"
            }
          ]
        }
      }
    },
    {
      "id": "49a4adf0-84f6-5c81-bea9-28a808cdf783",
      "name": "Read Refresh Miami RSS",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        230,
        220
      ],
      "parameters": {
        "url": "https://refreshmiami.com/feed/",
        "options": {}
      },
      "alwaysOutputData": true
    },
    {
      "id": "cf335bac-8572-5fc5-814c-a77966b47af3",
      "name": "Make review shortlist",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        500,
        85
      ],
      "parameters": {
        "jsCode": "const now = Date.now();\nconst cutoff = now - 7 * 86400000;\nconst topic = /\\b(ai|artificial intelligence|automation|tech|technology|startup|founder|entrepreneur|robotics|funding|workshop)\\b/i;\nconst byLink = new Map();\nfor (const {json: item} of $input.all()) {\n  const title = String(item.title || '').trim();\n  const link = String(item.link || '').trim();\n  const published = Date.parse(item.isoDate || item.pubDate || '');\n  if (!/^https?:\\/\\/[^\\s]+$/i.test(link) || !title || !Number.isFinite(published) || published < cutoff || published > now) continue;\n  const text = title + ' ' + String(item.contentSnippet || '');\n  if (!topic.test(text)) continue;\n  const source = link.split('#')[0];\n  const row = {headline: title, source, published_utc: new Date(published).toISOString(), review: 'Confirm the local connection and open the publisher story.'};\n  const existing = byLink.get(source);\n  if (!existing || existing.published_utc < row.published_utc) byLink.set(source, row);\n}\nconst rows = [...byLink.values()].sort((a,b) => b.published_utc.localeCompare(a.published_utc) || a.source.localeCompare(b.source)).slice(0,5);\nreturn [{json: {period_days: 7, count: rows.length, shortlist: rows, status: rows.length ? 'Ready for editorial review' : 'No matching stories in this feed window'}}];"
      }
    },
    {
      "id": "1a8496a6-101e-51a0-892b-c9a26dff0690",
      "name": "Setup and first run",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -445
      ],
      "parameters": {
        "content": "## Run a weekly local news desk\n1. Execute **Test with sample headlines**. Three rows become one sample lead in **Make review shortlist**.\n2. Open **Read Refresh Miami RSS** to use another publisher feed. Test this branch before enabling the schedule.\n3. The schedule uses America/New_York. Publish when you want n8n to fetch each Monday at 8 a.m.\n4. Review the final execution output and open each original link to decide what belongs in your issue. The workflow returns a shortlist for editing.",
        "width": 550,
        "height": 360
      }
    }
  ],
  "connections": {
    "Test with sample headlines": {
      "main": [
        [
          {
            "node": "Sample headlines",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sample headlines": {
      "main": [
        [
          {
            "node": "Make review shortlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monday at 8 AM Eastern": {
      "main": [
        [
          {
            "node": "Read Refresh Miami RSS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Refresh Miami RSS": {
      "main": [
        [
          {
            "node": "Make review shortlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "timezone": "America/New_York"
  },
  "pinData": {}
}
