{
  "name": "Weekly AI Radar (Monday 9AM CET)",
  "active": false,
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * 1"
            }
          ]
        }
      },
      "id": "radar-schedule",
      "name": "Weekly Monday 9AM CET",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "url": "https://rss.arxiv.org/rss/cs.AI+cs.LG+cs.CL"
      },
      "id": "radar-arxiv",
      "name": "Fetch arXiv AI/ML Papers",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [220, -80]
    },
    {
      "parameters": {
        "url": "https://huggingface.co/blog/feed.xml"
      },
      "id": "radar-hf",
      "name": "Fetch HuggingFace Blog",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [220, 80]
    },
    {
      "parameters": {
        "jsCode": "const arxiv = $('Fetch arXiv AI/ML Papers').all().slice(0, 20).map(item => ({\n  title: item.json.title,\n  link: item.json.link,\n  description: item.json.contentSnippet || item.json.content || item.json.summary || '',\n  source: 'arXiv',\n  date: item.json.pubDate || item.json.isoDate || ''\n}));\n\nconst hf = $('Fetch HuggingFace Blog').all().slice(0, 10).map(item => ({\n  title: item.json.title,\n  link: item.json.link,\n  description: item.json.contentSnippet || item.json.content || item.json.summary || '',\n  source: 'HuggingFace',\n  date: item.json.pubDate || item.json.isoDate || ''\n}));\n\nconst allItems = [...hf, ...arxiv];\nreturn [{ json: { items: allItems } }];"
      },
      "id": "radar-merge",
      "name": "Merge RSS Items",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [440, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.mistral.ai/v1/chat/completions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.MISTRAL_API_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "mistral-large-latest"
            },
            {
              "name": "response_format",
              "value": "={ \"type\": \"json_object\" }"
            },
            {
              "name": "max_tokens",
              "value": 3000
            },
            {
              "name": "messages",
              "value": "=[{\"role\":\"system\",\"content\":\"You are the editor of the Hyperion AI Radar, a weekly digest for European enterprise AI practitioners. Your job is to identify the 5 most important and practically relevant AI developments from the past week. Focus on: (1) new open source models or major updates, (2) significant research with real-world implications, (3) important framework/tool releases, (4) enterprise AI adoption news, (5) regulatory or policy developments (EU AI Act, GDPR + AI).\\n\\nFor each item, write a 2-3 sentence practical summary explaining WHY it matters for enterprise AI teams, not just what it is. Skip pure academic theory with no near-term application.\\n\\nOutput ONLY valid JSON with this structure: {\\\"weekOf\\\": \\\"[ISO date]\\\", \\\"headline\\\": \\\"One-line summary of the biggest story this week\\\", \\\"items\\\": [{\\\"rank\\\": 1, \\\"title\\\": \\\"...\\\", \\\"summary\\\": \\\"2-3 sentences why this matters practically\\\", \\\"source\\\": \\\"arXiv|HuggingFace|Other\\\", \\\"category\\\": \\\"Models|Research|Tools|Enterprise|Regulatory\\\", \\\"url\\\": \\\"...\\\"}], \\\"editorNote\\\": \\\"One paragraph overall take on the week in AI — what's the meta-trend?\\\"}\"},{\"role\":\"user\",\"content\":\"Here are the latest AI developments to curate from:\\n\\n{{ $json.items.map((item, i) => `${i+1}. [${item.source}] ${item.title}\\nURL: ${item.link}\\n${item.description.substring(0, 300)}`).join('\\n\\n') }}\\n\\nSelect the 5 most practically important items for European enterprise AI teams. Today's date: {{ new Date().toISOString().split('T')[0] }}\"}]"
            }
          ]
        }
      },
      "id": "radar-mistral",
      "name": "Generate AI Radar (Mistral)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [660, 0]
    },
    {
      "parameters": {
        "jsCode": "const raw = $('Generate AI Radar (Mistral)').item.json.choices[0].message.content;\nconst parsed = JSON.parse(raw);\nconst weekOf = parsed.weekOf || new Date().toISOString().split('T')[0];\nconst slug = `ai-radar-${weekOf}`;\nconst radarData = { ...parsed, slug, generatedAt: new Date().toISOString() };\nreturn [{ json: radarData }];"
      },
      "id": "radar-parse",
      "name": "Parse Radar",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [880, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://host.docker.internal:3000/api/internal/publish-radar",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-webhook-signature",
              "value": "={{ 'hmac-sha256=' + require('crypto').createHmac('sha256', $env.N8N_WEBHOOK_SECRET).update(JSON.stringify($json)).digest('hex') }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ $json }}",
        "options": {}
      },
      "id": "radar-post-app",
      "name": "POST Radar to App",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [1100, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.resend.com/emails",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.RESEND_API_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={ \"from\": \"Hyperion AI Radar <radar@hyperion-consulting.io>\", \"to\": [\"delivered@resend.dev\"], \"subject\": \"AI Radar: {{ $('Parse Radar').item.json.headline }}\", \"html\": \"<h2>Hyperion AI Radar — Week of {{ $('Parse Radar').item.json.weekOf }}</h2><p>{{ $('Parse Radar').item.json.headline }}</p>{{ $('Parse Radar').item.json.items.map(item => `<h3>${item.rank}. ${item.title} (${item.category})</h3><p>${item.summary}</p><p><a href='${item.url}'>Read more</a></p>`).join('') }}<hr><p><em>Editor's Take: {{ $('Parse Radar').item.json.editorNote }}</em></p><p><a href='https://hyperion-consulting.io/en/radar'>View online</a> · <a href='https://hyperion-consulting.io/api/email/unsubscribe'>Unsubscribe</a></p>\" }"
      },
      "id": "radar-email",
      "name": "Send AI Radar Email",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [1320, -80]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.telegram.org/bot{{ $env.TELEGRAM_BOT_TOKEN }}/sendMessage",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "chat_id",
              "value": "={{ $env.TELEGRAM_CHAT_ID }}"
            },
            {
              "name": "text",
              "value": "=\uD83E\uDD16 AI Radar published!\n\n{{ $('Parse Radar').item.json.headline }}\n\nTop stories:\n{{ $('Parse Radar').item.json.items.slice(0,3).map(i => `• ${i.title}`).join('\\n') }}\n\nhttps://hyperion-consulting.io/en/radar"
            },
            {
              "name": "parse_mode",
              "value": "HTML"
            }
          ]
        },
        "options": {}
      },
      "id": "radar-telegram",
      "name": "Notify Telegram",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [1320, 80]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.SLACK_WEBHOOK_URL }}",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "=\uD83E\uDD16 *Weekly AI Radar published!*\n\n{{ $('Parse Radar').item.json.headline }}\n\n*Top stories:*\n{{ $('Parse Radar').item.json.items.slice(0,3).map(i => `• *${i.title}* (${i.category})`).join('\\n') }}\n\n<https://hyperion-consulting.io/en/radar|View full radar>"
            }
          ]
        },
        "options": {}
      },
      "id": "radar-slack",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [1320, 160]
    }
  ],
  "connections": {
    "Weekly Monday 9AM CET": {
      "main": [
        [
          {
            "node": "Fetch arXiv AI/ML Papers",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch HuggingFace Blog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch arXiv AI/ML Papers": {
      "main": [
        [
          {
            "node": "Merge RSS Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch HuggingFace Blog": {
      "main": [
        [
          {
            "node": "Merge RSS Items",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge RSS Items": {
      "main": [
        [
          {
            "node": "Generate AI Radar (Mistral)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Radar (Mistral)": {
      "main": [
        [
          {
            "node": "Parse Radar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Radar": {
      "main": [
        [
          {
            "node": "POST Radar to App",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "POST Radar to App": {
      "main": [
        [
          {
            "node": "Send AI Radar Email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify Telegram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/Paris",
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false
  },
  "staticData": {
    "node:Weekly Monday 9AM CET": {
      "recurrenceRules": []
    }
  },
  "meta": null,
  "pinData": null,
  "tags": []
}
