{
  "name": "Public webhook relay",
  "nodes": [
    {
      "id": "4a82b490-3550-4700-8e9a-5ae1ef7c327f",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -100,
        600
      ]
    },
    {
      "id": "bfe180f2-329c-4d00-9d93-3a87d694cb4e",
      "name": "Get Auth Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        720,
        1080
      ]
    },
    {
      "id": "26089f68-9d3c-4abd-8541-1d63a8a303c1",
      "name": "Unprocessed Requests",
      "type": "n8n-nodes-base.code",
      "position": [
        1420,
        680
      ]
    },
    {
      "id": "00a5c01c-0cc1-4a56-9b5b-b90cc778ee36",
      "name": "Get Latest Requests",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1060,
        800
      ]
    },
    {
      "id": "42fbb0c3-34c9-4d97-8761-1b9c84c2f8f7",
      "name": "POST to n8n",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2000,
        680
      ]
    },
    {
      "id": "fd38a00e-2d7f-4621-8f18-47d1770ef3ac",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1220,
        680
      ]
    },
    {
      "id": "ef347c09-9870-42db-9109-934277290e0b",
      "name": "Local Webhook Address",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        700
      ]
    },
    {
      "id": "89baa16d-4a06-4f98-9735-9cc9fda5ff09",
      "name": "Latest Update Time",
      "type": "n8n-nodes-base.code",
      "position": [
        1600,
        680
      ]
    },
    {
      "id": "c826677d-317f-4ad4-959d-153862de4ff7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        980
      ],
      "parameters": {
        "width": 460.2964713549969,
        "height": 288.34663983291097,
        "content": "## 1. Retrieve existing or get new auth token for webhook.site"
      }
    },
    {
      "id": "f4bc9a8c-d9dc-4969-9251-ce892a5ed41e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        517.8563272190441
      ],
      "parameters": {
        "width": 483.2839292355176,
        "height": 384.1277143350834,
        "content": "## 2. Check if any new requests to webhook that came later than the last checked request"
      }
    },
    {
      "id": "adaf19be-cb2f-4727-9881-1a3e4098c528",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1608.5062710597388,
        518.9281636095216
      ],
      "parameters": {
        "width": 395.16534069351894,
        "height": 380.2964713549969,
        "content": "## 3. Relay the request to the local n8n workflow set in *Local Webhook Address*"
      }
    },
    {
      "id": "4e7add8c-1e95-4ebb-b7c8-35cee3cdeed5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        340
      ],
      "parameters": {
        "width": 566.9804381508956,
        "height": 859.1365566530386,
        "content": "# Public Webhook Relay\n## How it Works\nUtilizes webhook.site to receive public webhook requests and relays them to your local n8n workflow\n\n## How to Use\n- To use with local key-value store:\n Go to se"
      }
    },
    {
      "id": "5d8db2a1-569e-47c0-99a1-d66cb8b86897",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        608.688533362355
      ],
      "parameters": {
        "width": 304.23688498154337,
        "height": 264.4911255434983,
        "content": "### 0. Set this to your local workflow address (Production URL or Test URL in your Workflow Trigger node)"
      }
    },
    {
      "id": "e728e8fe-1a7d-4f44-96b8-7344b70b0452",
      "name": "Store Auth Token",
      "type": "@horka.tv/n8n-nodes-storage-kv.keyValueStorage",
      "position": [
        880,
        1080
      ]
    },
    {
      "id": "1c19ff08-d6ed-4874-9c1a-69e92b25138a",
      "name": "Store Last Processed",
      "type": "@horka.tv/n8n-nodes-storage-kv.keyValueStorage",
      "position": [
        1800,
        680
      ]
    },
    {
      "id": "ea927186-6147-42c7-8873-029616bdbe6d",
      "name": "Retrieve Auth Token",
      "type": "@horka.tv/n8n-nodes-storage-kv.keyValueStorage",
      "position": [
        380,
        860
      ]
    },
    {
      "id": "f217889c-7104-4183-8adb-4459f6cdc3d6",
      "name": "Retrieve Last Processed",
      "type": "@horka.tv/n8n-nodes-storage-kv.keyValueStorage",
      "position": [
        680,
        620
      ]
    },
    {
      "id": "12293fc3-8964-40da-8326-85c36dade0df",
      "name": "If Auth Token Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        580,
        860
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Unprocessed Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Auth Token": {
      "main": [
        [
          {
            "node": "Store Auth Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Local Webhook Address",
            "type": "main",
            "index": 0
          },
          {
            "node": "Retrieve Last Processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Auth Token": {
      "main": [
        [
          {
            "node": "Get Latest Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Latest Update Time": {
      "main": [
        [
          {
            "node": "Store Last Processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Latest Requests": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Retrieve Auth Token": {
      "main": [
        [
          {
            "node": "If Auth Token Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Auth Token Exists": {
      "main": [
        [
          {
            "node": "Get Latest Requests",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Auth Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Last Processed": {
      "main": [
        [
          {
            "node": "POST to n8n",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unprocessed Requests": {
      "main": [
        [
          {
            "node": "Latest Update Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Local Webhook Address": {
      "main": [
        [
          {
            "node": "Retrieve Auth Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Last Processed": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}