{
  "name": "03-loop",
  "nodes": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "name": "Manual trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "parameters": {}
    },
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "Fetch the list of new leads via HTTP",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        300,
        300
      ],
      "parameters": {
        "method": "GET",
        "url": "TODO: set request URL (from Relay prompt)",
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000002",
      "name": "For each lead",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        600,
        300
      ],
      "parameters": {
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000003",
      "name": "Send a Slack message about the lead",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.5,
      "position": [
        900,
        500
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "TODO: set channel (from Relay prompt)"
        },
        "text": "TODO: set message text (from Relay prompt)",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000004",
      "name": "Update the lead via HTTP",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        1200,
        500
      ],
      "parameters": {
        "method": "GET",
        "url": "TODO: set request URL (from Relay prompt)",
        "options": {}
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000005",
      "name": "Post a summary to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.5,
      "position": [
        1500,
        300
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "TODO: set channel (from Relay prompt)"
        },
        "text": "TODO: set message text (from Relay prompt)",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "00000000-0000-4000-8000-000000000006",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -160
      ],
      "parameters": {
        "content": "## \u26a0 Secrets and credentials\n\nEvery credential must be re-entered by hand in n8n. No automation possible.",
        "height": 160,
        "width": 280,
        "color": 1
      }
    }
  ],
  "connections": {
    "Manual trigger": {
      "main": [
        [
          {
            "node": "Fetch the list of new leads via HTTP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For each lead": {
      "main": [
        [
          {
            "node": "Post a summary to Slack",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a Slack message about the lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a Slack message about the lead": {
      "main": [
        [
          {
            "node": "Update the lead via HTTP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update the lead via HTTP": {
      "main": [
        [
          {
            "node": "For each lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch the list of new leads via HTTP": {
      "main": [
        [
          {
            "node": "For each lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}