{
  "name": "LookupDock email check — manual review labels",
  "active": false,
  "nodes": [
    {
      "id": "manual-test",
      "name": "Manual test",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "source-event",
      "name": "Source event",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        240,
        0
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "email",
              "name": "email",
              "value": "alex@example.com",
              "type": "string"
            },
            {
              "id": "event_id",
              "name": "event_id",
              "value": "replace-with-stable-source-event-id",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "lookupdock-request",
      "name": "LookupDock request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        480,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "https://lookupdock.com/api/v1/signup-check",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $json.event_id }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "keypair",
        "bodyParameters": {
          "parameters": [
            {
              "name": "email",
              "value": "={{ $json.email }}"
            }
          ]
        },
        "options": {
          "redirect": {
            "redirect": {
              "followRedirects": false
            }
          },
          "timeout": 10000,
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "json",
              "neverError": false
            }
          }
        }
      },
      "onError": "continueErrorOutput",
      "retryOnFail": false
    },
    {
      "id": "result-label",
      "name": "Result label",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        760,
        -100
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "route",
              "name": "route",
              "value": "={{ (() => { const b = $json.body; return $json.statusCode === 200 && b?.status === 'completed' && b.mode === 'live' && Array.isArray(b.skipped) && b.skipped.length === 0 && b.checks?.email?.status === 'completed' && !b.checks.email.error && ['allow', 'review', 'block'].includes(b.recommendation); })() && $json.body.recommendation === 'allow' ? 'allow' : 'human_review' }}",
              "type": "string"
            },
            {
              "id": "reason",
              "name": "reason",
              "value": "={{ (() => { const b = $json.body; return $json.statusCode === 200 && b?.status === 'completed' && b.mode === 'live' && Array.isArray(b.skipped) && b.skipped.length === 0 && b.checks?.email?.status === 'completed' && !b.checks.email.error && ['allow', 'review', 'block'].includes(b.recommendation); })() ? $json.body.recommendation : 'incomplete_or_unavailable' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "error-label",
      "name": "Error label",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        760,
        160
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "route",
              "name": "route",
              "value": "human_review",
              "type": "string"
            },
            {
              "id": "reason",
              "name": "reason",
              "value": "request_failed",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "Manual test": {
      "main": [
        [
          {
            "node": "Source event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Source event": {
      "main": [
        [
          {
            "node": "LookupDock request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LookupDock request": {
      "main": [
        [
          {
            "node": "Result label",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error label",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveDataSuccessExecution": "none",
    "saveDataErrorExecution": "none",
    "saveManualExecutions": false
  }
}
