{
  "name": "Pharlo — Weekly analytics summary",
  "nodes": [
    {
      "parameters": {
        "rule": { "interval": [{ "field": "weeks", "triggerAtDay": [1], "triggerAtHour": 9 }] }
      },
      "id": "b2000000-0000-4000-8000-000000000001",
      "name": "Every Monday 09:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [240, 300]
    },
    {
      "parameters": {
        "url": "https://pharlo.io/api/v1/stats/overview",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "=Bearer {{$env.PHARLO_API_KEY}}" }
          ]
        },
        "options": {}
      },
      "id": "b2000000-0000-4000-8000-000000000002",
      "name": "Pharlo: Get overview stats",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [460, 300]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "s1", "name": "summary", "value": "={{ 'Channels: ' + ($json.channels ?? 0) + ' | Posts: ' + ($json.posts ?? 0) + ' | Success rate: ' + Math.round((($json.successRate ?? 0) * 100)) + '%' }}", "type": "string" }
          ]
        },
        "options": {}
      },
      "id": "b2000000-0000-4000-8000-000000000003",
      "name": "Format summary",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [680, 300]
    }
  ],
  "connections": {
    "Every Monday 09:00": { "main": [[{ "node": "Pharlo: Get overview stats", "type": "main", "index": 0 }]] },
    "Pharlo: Get overview stats": { "main": [[{ "node": "Format summary", "type": "main", "index": 0 }]] }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "pinData": {},
  "meta": {}
}
