{
  "name": "Process Ko-fi donations, subscriptions & shop orders with webhook verification",
  "nodes": [
    {
      "id": "99bbf837-2834-4cae-af13-37b6cdf963bb",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -480,
        -40
      ]
    },
    {
      "id": "0f7c13ea-196b-40a7-bf1e-4829caaaba4c",
      "name": "Stop and Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        180,
        60
      ]
    },
    {
      "id": "7ddb4cfc-5917-4b19-acf8-c7db3eaab56a",
      "name": "Donation",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        -420
      ]
    },
    {
      "id": "9c29ae0e-d80c-4613-ba11-535cc59d5603",
      "name": "Subscription",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        -140
      ]
    },
    {
      "id": "a050d88e-bbe8-4ee1-b1c6-31782b5b2f20",
      "name": "Shop Order",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        140
      ]
    },
    {
      "id": "f9926fda-9a37-467e-b86b-ce9dbb051a88",
      "name": "Is new subscriber?",
      "type": "n8n-nodes-base.if",
      "position": [
        620,
        -140
      ]
    },
    {
      "id": "b158a59d-5166-4469-b999-5235768855c0",
      "name": "Prepare",
      "type": "n8n-nodes-base.set",
      "position": [
        -260,
        -40
      ]
    },
    {
      "id": "a4fd9607-6d5b-4fbd-a4ce-53e9960887e0",
      "name": "Check token",
      "type": "n8n-nodes-base.if",
      "position": [
        -40,
        -40
      ]
    },
    {
      "id": "6c34228e-434c-4ab3-b0ce-0b5c1721ffc8",
      "name": "Check type",
      "type": "n8n-nodes-base.switch",
      "position": [
        180,
        -140
      ]
    },
    {
      "id": "87fd0134-5eb4-4c47-acb5-137f24e819f4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -140
      ],
      "parameters": {
        "width": 200,
        "height": 260,
        "content": "### Set verification token\nSet your Ko-fi  verification token in this node. Available [here](https://ko-fi.com/manage/webhooks)."
      }
    },
    {
      "id": "78ac15cb-1336-424e-a235-6e7a66090b9d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        -140
      ],
      "parameters": {
        "width": 200,
        "height": 260,
        "content": "### Setup your webhook\nFind your webhook URL in this node and set it  [here](https://ko-fi.com/manage/webhooks)."
      }
    },
    {
      "id": "30892b66-66fb-4926-b817-e280cbadf5ea",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -520
      ],
      "parameters": {
        "width": 540,
        "height": 260,
        "content": "### We received a donation\nDo your thing."
      }
    },
    {
      "id": "3b849d93-ffa5-4dfe-8743-d43ca7d06e60",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -240
      ],
      "parameters": {
        "width": 540,
        "height": 260,
        "content": "### We received a payment for a subscription\nDo your thing."
      }
    },
    {
      "id": "bff1913d-1c18-4447-8448-aa059d7b020f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        40
      ],
      "parameters": {
        "width": 540,
        "height": 260,
        "content": "### We received a shop order\nDo your thing."
      }
    },
    {
      "id": "07da890d-5cc8-4f51-b0c2-c50831c84a64",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        -560
      ],
      "parameters": {
        "width": 860,
        "height": 400,
        "content": "## Receive and handle Ko-fi payment webhooks \nThis workflow receives [Ko-fi payment webhooks](https://ko-fi.com/manage/webhooks), checks the verification token and then check what kind of payment it i"
      }
    }
  ],
  "connections": {
    "Prepare": {
      "main": [
        [
          {
            "node": "Check token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Prepare",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check type": {
      "main": [
        [
          {
            "node": "Donation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Subscription",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Shop Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check token": {
      "main": [
        [
          {
            "node": "Check type",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Subscription": {
      "main": [
        [
          {
            "node": "Is new subscriber?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}