{
  "name": "🌳 EU green legislation tracker with GPT-4o, Google Sheets and Tasks",
  "nodes": [
    {
      "id": "4dfef9cb-d66a-4818-b5b2-6be81f0bd7c3",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1160,
        500
      ]
    },
    {
      "id": "3fd73086-62cc-49c4-9c56-b2467a27601c",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1980,
        360
      ]
    },
    {
      "id": "a894cc7b-7e2c-40af-bbdd-de03c9fdf71c",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        2200,
        440
      ]
    },
    {
      "id": "b1b1616c-68f7-4911-b58d-8792ac4e822c",
      "name": "Extract Yesterday Records",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        280,
        500
      ]
    },
    {
      "id": "707ae04c-51d3-4547-9868-1c603d359cc0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 1080,
        "height": 660,
        "content": "### 1. First Block: scrape the page to extract all the legislative procedures scheduled for debate yesterday\nThis workflow sends an HTTP request to collect the HTML of the page by block. For each bloc"
      }
    },
    {
      "id": "721a14b6-c860-431e-8475-b877d5a83768",
      "name": "Extract HTML Blocks",
      "type": "n8n-nodes-base.html",
      "position": [
        500,
        500
      ]
    },
    {
      "id": "fe609066-0f08-40b7-b8a8-13acd8338468",
      "name": "Parse Blocks",
      "type": "n8n-nodes-base.html",
      "position": [
        720,
        500
      ]
    },
    {
      "id": "75770b01-0c98-4077-97d7-3bbc82166372",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        0
      ],
      "parameters": {
        "width": 1020,
        "height": 660,
        "content": "### 2. Use a LLM to keep only the procedures related to sustainability\nWe loop though all items parsed and we provide the description and the committee to a LLM (Open AI). The LLM will use these infor"
      }
    },
    {
      "id": "bfdc9844-7d9c-4582-83bb-9e945276864e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        20
      ],
      "parameters": {
        "width": 500,
        "height": 660,
        "content": "### 3. Topics related to sustainability are stored in a Google Sheet\nThe output of the LLM is combined with the other fields. A IF node filters out all the procedure not related to sustainability. The"
      }
    },
    {
      "id": "38a6d477-0a95-4177-a5d4-10f4c97bcf0c",
      "name": "Google Tasks",
      "type": "n8n-nodes-base.googleTasks",
      "position": [
        2400,
        940
      ]
    },
    {
      "id": "9d27672c-2434-46d3-ae52-e0ba07b3a181",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        700
      ],
      "parameters": {
        "width": 500,
        "height": 440,
        "content": "### 4. Create Sustainability Study Task\nCreate a Google Task for each EU legislative file related to sustainability, scheduled for tomorrow at 09:00 AM.\n#### How to setup?\n\n- **Add a task in Google Ta"
      }
    },
    {
      "id": "8196fd1c-3223-402b-935b-a6a135795999",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        60,
        500
      ]
    },
    {
      "id": "ff6f948b-9db4-479d-afab-3db6176abad6",
      "name": "Classification Agent",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1380,
        280
      ]
    },
    {
      "id": "01379394-a5e9-4673-bc0e-225e2d3f5214",
      "name": "Collect Answer",
      "type": "n8n-nodes-base.set",
      "position": [
        1760,
        280
      ]
    },
    {
      "id": "8f96dfd0-0a38-435c-83a0-7649b350f813",
      "name": "Record Sustainability Procedures",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2420,
        380
      ]
    },
    {
      "id": "c2cf974e-f182-48f8-9d26-8aea4dbdf486",
      "name": "Edit Links",
      "type": "n8n-nodes-base.set",
      "position": [
        940,
        500
      ]
    },
    {
      "id": "bdc398f0-a882-4fbe-ac37-7ca7e15a1081",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2660,
        20
      ],
      "parameters": {
        "width": 460,
        "height": 340,
        "content": "![Tutorial](https://www.samirsaci.com/content/images/2025/04/temp-9.png)\n[🎥 Check My Tutorial](https://www.youtube.com/watch?v=f_nyArpH6kk)"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Record Sustainability Procedures",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Tasks",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Links": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Tasks": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Blocks": {
      "main": [
        [
          {
            "node": "Edit Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Answer": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Classification Agent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract HTML Blocks": {
      "main": [
        [
          {
            "node": "Parse Blocks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classification Agent": {
      "main": [
        [
          {
            "node": "Collect Answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Yesterday Records": {
      "main": [
        [
          {
            "node": "Extract HTML Blocks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Extract Yesterday Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}