{
  "name": "M16 - Bounded Pagination & Idempotency",
  "nodes": [
    {
      "id": "2bf62585-b346-4087-a311-5e00cecef03b",
      "parameters": {},
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        220,
        300
      ]
    },
    {
      "id": "0f1c7ecf-b953-46b4-af73-2f49aa924735",
      "parameters": {
        "method": "GET",
        "url": "https://jsonplaceholder.typicode.com/posts",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "_limit",
              "value": "2"
            },
            {
              "name": "_page",
              "value": "={{ $pageCount + 1 }}"
            }
          ]
        },
        "options": {
          "pagination": {
            "pagination": {
              "paginationMode": "updateAParameterInEachRequest",
              "parameters": {
                "parameters": [
                  {
                    "type": "qs",
                    "name": "_page",
                    "value": "={{ $pageCount + 1 }}"
                  }
                ]
              },
              "paginationCompleteWhen": "receiveSpecificStatusCodes",
              "statusCodesWhenComplete": "404",
              "limitPagesFetched": true,
              "maxRequests": 2,
              "requestInterval": 1000
            }
          }
        }
      },
      "name": "Fetch Bounded Pages",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000,
      "position": [
        460,
        300
      ]
    },
    {
      "id": "da684c30-b9c3-4af5-a209-42b7e3f18bc4",
      "parameters": {
        "operation": "removeItemsSeenInPreviousExecutions",
        "dedupeValue": "={{ \"POST-\" + $json.id }}"
      },
      "name": "Enforce Idempotency Key",
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        720,
        300
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Fetch Bounded Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Bounded Pages": {
      "main": [
        [
          {
            "node": "Enforce Idempotency Key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "source": "n8n-learning-hub"
  }
}