{
  "name": "publicrecords — Legistar Meetings daily pull",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "id": "1",
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [0, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.apify.com/v2/acts/publicrecords~legistar-meetings-scraper/runs?waitForFinish=120",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_APIFY_TOKEN" },
            { "name": "Content-Type", "value": "application/json" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"clients\": [\"seattle\"],\n  \"resource\": \"events\",\n  \"maxItems\": 50\n}",
        "options": {}
      },
      "id": "2",
      "name": "Run Legistar Meetings",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [280, 0],
      "notes": "Replace YOUR_APIFY_TOKEN. Add more Legistar client slugs (e.g. chicago) as needed."
    },
    {
      "parameters": {
        "method": "GET",
        "url": "=https://api.apify.com/v2/datasets/{{$json.data.defaultDatasetId}}/items?clean=true&format=json",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_APIFY_TOKEN" }
          ]
        },
        "options": {}
      },
      "id": "3",
      "name": "Fetch dataset items",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [560, 0]
    }
  ],
  "connections": {
    "Schedule": {
      "main": [[{ "node": "Run Legistar Meetings", "type": "main", "index": 0 }]]
    },
    "Run Legistar Meetings": {
      "main": [[{ "node": "Fetch dataset items", "type": "main", "index": 0 }]]
    }
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "publicrecordsActor": "publicrecords/legistar-meetings-scraper",
    "docs": "https://geminigeorge22.github.io/legistar/",
    "disclosure": "Published by the publicrecords maintainer on Apify."
  },
  "settings": { "executionOrder": "v1" }
}
