{
  "name": "Project: Generic HITL",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Refund",
        "formDescription": "Ask for a refund",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Name",
              "placeholder": "John",
              "requiredField": true
            },
            {
              "fieldLabel": "Email",
              "fieldType": "email"
            },
            {
              "fieldLabel": "Amount",
              "fieldType": "number",
              "placeholder": "20",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        0,
        0
      ],
      "id": "be66f802-f33a-430b-8eb0-f6c4a597bcda",
      "name": "On form submission",
      "webhookId": "721cf2c6-9290-468f-b2a0-61764798c4c5"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f1d367e2-65f7-44b0-afb4-3eb339d75d66",
              "leftValue": "={{ $json.Amount }}",
              "rightValue": 100,
              "operator": {
                "type": "number",
                "operation": "lt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        208,
        0
      ],
      "id": "38810c8d-c400-45df-8e18-57c7e210fe8f",
      "name": "If"
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "message",
        "guildId": {
          "__rl": true,
          "value": "1389085775261601823",
          "mode": "id"
        },
        "channelId": {
          "__rl": true,
          "value": "1389085775701868576",
          "mode": "id"
        },
        "content": "=Refund request:\n\n{{ $json.Name }}\n{{ $json.Email }}\n{{ $json.Amount }}$\n\nPlease decide on this request:\nApprove: {{ $execution.resumeUrl }}?decision=true\nDisapprove: {{ $execution.resumeUrl }}?decision=false",
        "options": {}
      },
      "type": "n8n-nodes-base.discord",
      "typeVersion": 2,
      "position": [
        384,
        240
      ],
      "id": "406015fe-fd46-4847-aa06-41a78b643db5",
      "name": "Send a message1",
      "webhookId": "3fea3aa0-c1f4-4c83-84fd-1e56e951419e",
      "credentials": {
        "discordOAuth2Api": {
          "id": "hWVH9oyHCRTOmoqa",
          "name": "Discord account"
        }
      }
    },
    {
      "parameters": {
        "resume": "webhook",
        "limitWaitTime": true,
        "resumeAmount": 24,
        "options": {}
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        592,
        240
      ],
      "id": "e1331376-0205-4b3d-89c7-58ad4544a45a",
      "name": "Wait",
      "webhookId": "adabbcbe-756f-4752-a1c2-b4f48db9571b"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "f4dfd970-14ae-4f2f-aba7-fc2dd0b7b02f",
              "leftValue": "={{ $json.query.decision }}",
              "rightValue": "true",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        800,
        240
      ],
      "id": "bfe42230-143b-4610-8e60-8a228f637b12",
      "name": "If1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1040,
        16
      ],
      "id": "cd360a07-c69a-44fd-8442-1606dd46340b",
      "name": "Merge"
    },
    {
      "parameters": {
        "sendTo": "test@gmail.com",
        "subject": "Refund approved",
        "message": "Refund approved",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1248,
        -16
      ],
      "id": "f4a190df-55ae-4bb7-9707-628937582de5",
      "name": "Approve refund",
      "webhookId": "c6c90638-ca70-4f4b-9714-dfb466ca63f8",
      "credentials": {
        "gmailOAuth2": {
          "id": "ihLzAbGLNsBemV2N",
          "name": "Gmail credentials"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "test@gmail.com",
        "subject": "Refund Denied",
        "message": "Refund Denied",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1248,
        272
      ],
      "id": "e559c5a7-eecb-42f8-bd98-dbe531ef83c1",
      "name": "Disapprove refund",
      "webhookId": "4ffbbdc2-f413-4e66-835a-3f218db472bd",
      "credentials": {
        "gmailOAuth2": {
          "id": "ihLzAbGLNsBemV2N",
          "name": "Gmail credentials"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Disapprove refund",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Approve refund",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "17a172d1-1fee-48b7-99e9-7be969636fed",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "281c34c03b9c41f054c536eeb966e9e503918cf7f00e3bc32a5ff9cca85ca255"
  },
  "id": "x6xvULhgH1eUAxiX",
  "tags": []
}