{
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        400,
        520
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        360
      ],
      "parameters": {
        "width": 780,
        "height": 360,
        "content": "## 2. \uc678\ubd80 \uc774\ubca4\ud2b8 \ub300\uae30\n\n\uc774 \uc791\uc5c5\uc744 \uc6cc\ud06c\ud50c\ub85c\uc758 \ub098\uba38\uc9c0 \ubd80\ubd84\uc744 \uacc4\uc18d\ud558\uae30 \uc704\ud574 \uc678\ubd80 \ub2e8\uacc4\uac00 \ud544\uc694\ud560 \ub54c \uc0ac\uc6a9\ud558\uc138\uc694.\n\n\uc608\ub97c \ub4e4\uc5b4 - \uc6cc\ud06c\ud50c\ub85c\uac00 \uad6c\ub9e4 \uc2b9\uc778 \ub9c1\ud06c\ub97c \uc0c1\uc778\uc5d0\uac8c \ubcf4\ub0b8\ub2e4 (Gmail, Slack \ub4f1 \uc0ac\uc6a9) \uadf8\ub9ac\uace0 \uc0c1\uc778\uc774 \uc774\ub97c \ud074\ub9ad\ud560 \ub54c\uae4c\uc9c0 \uae30\ub2e4\ub9b0 \ud6c4 \ub098\uba38\uc9c0 \ub2e8\uacc4\ub85c \uacc4\uc18d\ud569\ub2c8\ub2e4.\n\n\uc774 \uc608\uc5d0\uc11c, `Customer Messenger` \ub178\ub4dc\ub294 \uc774\uba54\uc77c \ub610\ub294 \uba54\uc2dc\uc9d5 \ub178\ub4dc\ub97c \ubaa8\ubc29\ud569\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "name": "Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        380
      ],
      "parameters": {
        "width": 300,
        "height": 120,
        "content": "`Execute Workflow` \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uace0 \ub178\ub4dc\ub97c \ub354\ube14 \ud074\ub9ad\ud558\uc5ec \uc785\ub825 \ubc0f \ucd9c\ub825 \ud56d\ubaa9\uc744 \ubcf4\uc138\uc694."
      },
      "typeVersion": 1
    },
    {
      "name": "Create approval URL",
      "type": "n8n-nodes-base.set",
      "position": [
        1540,
        520
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "URL",
              "value": "={{$resumeWebhookUrl}}?name=nathan"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "name": "Wait for external approval",
      "type": "n8n-nodes-base.wait",
      "position": [
        1940,
        520
      ],
      "parameters": {
        "resume": "webhook",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "name": "Rest of the workflow placeholder",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2140,
        520
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Customer Datastore",
      "type": "n8n-nodes-base.n8nTrainingCustomerDatastore",
      "position": [
        580,
        520
      ],
      "parameters": {
        "operation": "getAllPeople",
        "returnAll": true
      },
      "typeVersion": 1
    },
    {
      "name": "SplitInBatches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        760,
        520
      ],
      "parameters": {
        "options": {},
        "batchSize": 1
      },
      "typeVersion": 1
    },
    {
      "name": "Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        360
      ],
      "parameters": {
        "width": 900,
        "height": 360,
        "content": "## 1. \uc18d\ub3c4 \uc81c\ud55c\n\n\ub54c\ub54c\ub85c \uc11c\ube44\uc2a4\uc5d0 \uc811\uc18d\ud558\ub294 \ube48\ub3c4\ub97c \ub2a6\ucdb0\uc57c \ud560 \ud544\uc694\uac00 \uc788\uc2b5\ub2c8\ub2e4.\n\n\uc774 \uc608\uc81c\uc5d0\uc11c, `Customer Datastore` \ub178\ub4dc\ub294 \ud55c \ubc88\uc5d0 \uc624\ub294 \ud070 \ubc30\uce58\uc758 \uc694\uccad\uc744 \uc2dc\ubbac\ub808\uc774\uc158\ud569\ub2c8\ub2e4. `SplitInBatches` \ub178\ub4dc\ub294 \uac01\uac01\uc744 \ub8e8\ud504\uc5d0\uc11c \uac1c\ubcc4\uc801\uc73c\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4. \uadf8\ub9ac\uace0 `Wait` \ub178\ub4dc\ub294 \uac01 \uace0\uac1d \uba54\uc2dc\uc9c0 \uc0ac\uc774\uc5d0 2\ucd08 \uc9c0\uc5f0\uc744 \ub9cc\ub4ed\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "name": "Wait for time interval",
      "type": "n8n-nodes-base.wait",
      "position": [
        920,
        520
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 2
      },
      "typeVersion": 1
    },
    {
      "name": "If - Are we Finished?",
      "type": "n8n-nodes-base.if",
      "position": [
        1280,
        520
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$node[\"SplitInBatches\"].context[\"noItemsLeft\"]}}",
              "value2": true
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Customer Messenger - Send URL to merchant",
      "type": "n8n-nodes-base.n8nTrainingCustomerMessenger",
      "position": [
        1740,
        520
      ],
      "parameters": {
        "message": "={{$json[\"URL\"]}}",
        "customerId": "1"
      },
      "typeVersion": 1
    },
    {
      "name": "Customer Messenger - Send message to client",
      "type": "n8n-nodes-base.n8nTrainingCustomerMessenger",
      "position": [
        1100,
        520
      ],
      "parameters": {
        "message": "=\nHi {{$node[\"Customer Datastore\"].json[\"name\"]}}\nThis message was sent at {{$now.toLocaleString(DateTime.TIME_WITH_SECONDS)}}",
        "customerId": "={{$node[\"Customer Datastore\"].json[\"id\"]}}"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "SplitInBatches": {
      "main": [
        [
          {
            "node": "Wait for time interval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Datastore": {
      "main": [
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create approval URL": {
      "main": [
        [
          {
            "node": "Customer Messenger - Send URL to merchant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Are we Finished?": {
      "main": [
        [
          {
            "node": "Create approval URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Customer Datastore",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for time interval": {
      "main": [
        [
          {
            "node": "Customer Messenger - Send message to client",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for external approval": {
      "main": [
        [
          {
            "node": "Rest of the workflow placeholder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Messenger - Send URL to merchant": {
      "main": [
        [
          {
            "node": "Wait for external approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Messenger - Send message to client": {
      "main": [
        [
          {
            "node": "If - Are we Finished?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}