{
  "name": "VW24 \u2014 Weekly AI Business Intelligence Report",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "weeksInterval": 1,
              "triggerAtWeekday": [
                1
              ],
              "triggerAtHour": 8
            }
          ]
        }
      },
      "name": "Every Monday 8am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "id": "ad76a11d-7d18-4f7e-acbb-405ece4abd91"
    },
    {
      "parameters": {
        "url": "https://vibeworld24.com/api/finance",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "YOUR_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "name": "Get Revenue Data",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        460,
        300
      ],
      "id": "56310981-89f3-404a-b049-d1c19127d30a"
    },
    {
      "parameters": {
        "url": "https://vibeworld24.com/api/chat",
        "method": "POST",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "message",
              "value": "=Generate a 5-point weekly business intelligence report for VibeWorld24 AI SaaS platform with {{$json.activeSubscriptions}} active subscribers and \u20ac{{$json.mrr}} MRR. Include: 1) Growth opportunities for this week, 2) Recommended marketing actions, 3) AI automation ideas to boost retention, 4) Competitive advantages to highlight, 5) One high-leverage action to increase MRR by 20%. Be specific, strategic, and actionable."
            },
            {
              "name": "agent",
              "value": "ceo"
            }
          ]
        }
      },
      "name": "AI Business Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        680,
        300
      ],
      "id": "01e7db0c-4762-48cf-b91d-4b601e5fcea0"
    },
    {
      "parameters": {
        "functionCode": "const finance = $('Get Revenue Data').first().json;\nconst aiReply  = items[0].json.reply || 'Analysis unavailable';\nconst week = new Date().toLocaleDateString('en-GB', { day:'2-digit', month:'long', year:'numeric' });\nreturn [{ json: { week, mrr: finance.mrr, arr: finance.arr, subs: finance.activeSubscriptions, conv: finance.conversionRate, analysis: aiReply }}];"
      },
      "name": "Compile Report",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        900,
        300
      ],
      "id": "ee4ebe37-d6e4-4455-b0e2-57c1ac562ad1"
    },
    {
      "parameters": {
        "fromEmail": "info@vibeworld24.com",
        "toEmail": "klodiantaipi51@gmail.com",
        "subject": "\ud83e\udde0 Weekly AI Business Report \u2014 Week of {{$json.week}}",
        "emailType": "html",
        "message": "<!DOCTYPE html><html><head><style>body{margin:0;background:#03030f;font-family:'Segoe UI',sans-serif;color:#e2e8f0}.wrap{max-width:640px;margin:0 auto;padding:30px 20px}.header{background:linear-gradient(135deg,#00f0ff15,#7c3aed15);border:1px solid rgba(0,240,255,.15);border-radius:16px;padding:28px;text-align:center;margin-bottom:20px}.logo{font-size:1.5rem;font-weight:900;background:linear-gradient(135deg,#00f0ff,#7c3aed);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.kgrid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-bottom:20px}.kcard{background:#0d0d22;border:1px solid rgba(0,240,255,.1);border-radius:10px;padding:14px;text-align:center}.kv{font-size:1.5rem;font-weight:900;color:#00f0ff}.kl{font-size:.65rem;color:#5a6a82;margin-top:4px}.analysis{background:#080815;border:1px solid rgba(0,240,255,.08);border-radius:12px;padding:20px;line-height:1.8;font-size:.85rem;white-space:pre-wrap}.footer{text-align:center;font-size:.7rem;color:#2a3a55;margin-top:20px}</style></head><body><div class='wrap'><div class='header'><div class='logo'>VibeWorld24</div><div style='color:#5a6a82;font-size:.8rem;margin-top:6px'>CEO Brain Weekly Report \u00b7 {{$json.week}}</div></div><div class='kgrid'><div class='kcard'><div class='kv'>\u20ac{{$json.mrr}}</div><div class='kl'>MRR</div></div><div class='kcard'><div class='kv' style='color:#a78bfa'>{{$json.subs}}</div><div class='kl'>Subscribers</div></div><div class='kcard'><div class='kv' style='color:#00ff88'>{{$json.conv}}%</div><div class='kl'>Conversion</div></div></div><div class='analysis'>{{$json.analysis}}</div><div class='footer'>VibeWorld24 CEO Brain \u00b7 Weekly Intelligence \u00b7 <a href='https://vibeworld24.com/finance.html' style='color:#5a6a82'>Finance Hub \u2192</a></div></div></body></html>"
      },
      "name": "Send Weekly Report",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        1120,
        300
      ],
      "credentials": {
        "smtp": {
          "id": "1",
          "name": "VW24 SMTP"
        }
      },
      "id": "5767eedc-93e1-40de-b004-313047d2b4b3"
    }
  ],
  "connections": {
    "Every Monday 8am": {
      "main": [
        [
          {
            "node": "Get Revenue Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Revenue Data": {
      "main": [
        [
          {
            "node": "AI Business Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Business Analysis": {
      "main": [
        [
          {
            "node": "Compile Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compile Report": {
      "main": [
        [
          {
            "node": "Send Weekly Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "id": "2cd3f62b-3c3b-441d-a195-3d2c200c025f"
}