{
  "id": "OneConnectorApiReport",
  "name": "1Connector — учебная сводка по API",
  "active": false,
  "nodes": [
    {
      "id": "manual",
      "name": "Manual start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "schedule",
      "name": "Daily at 09",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        210
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "days",
              "triggerAtHour": 9,
              "triggerAtMinute": 0
            }
          ]
        }
      }
    },
    {
      "id": "http",
      "name": "Demo tasks API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        260,
        0
      ],
      "parameters": {
        "url": "https://jsonplaceholder.typicode.com/todos?userId=1",
        "options": {
          "timeout": 30000
        }
      }
    },
    {
      "id": "summary",
      "name": "Build summary",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        520,
        0
      ],
      "parameters": {
        "jsCode": "const rows = $input.all().flatMap(item => Array.isArray(item.json) ? item.json : [item.json]);\nconst completed = rows.filter(row => row.completed === true).length;\nconst pending = rows.length - completed;\nreturn [{ json: {\n  source: 'JSONPlaceholder — учебные вымышленные задачи',\n  total: rows.length, completed, pending,\n  subject: 'Учебная сводка задач',\n  text: `Всего задач: ${rows.length}\\nВыполнено: ${completed}\\nОсталось: ${pending}`,\n  generatedAt: new Date().toISOString()\n}}];"
      }
    }
  ],
  "connections": {
    "Manual start": {
      "main": [
        [
          {
            "node": "Demo tasks API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily at 09": {
      "main": [
        [
          {
            "node": "Demo tasks API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Demo tasks API": {
      "main": [
        [
          {
            "node": "Build summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/Moscow"
  },
  "pinData": {},
  "tags": []
}
