{
  "name": "ezGPT - Credentials Sender",
  "active": false,
  "nodes": [
    {
      "id": "manual",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        260
      ],
      "parameters": {}
    },
    {
      "id": "call",
      "name": "Call Demo API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        260,
        260
      ],
      "parameters": {
        "method": "GET",
        "url": "http://127.0.0.1:5678/webhook-test/ezgpt-credentials-demo",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": false,
              "responseFormat": "json"
            }
          },
          "redirect": {
            "redirect": {
              "followRedirects": false
            }
          },
          "timeout": 15000,
          "allowUnauthorizedCerts": false
        }
      }
    },
    {
      "id": "check",
      "name": "Check Reply",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        520,
        260
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "const rows = $input.all();\nif (rows.length !== 1) throw new Error('one_response_required');\nconst r = rows[0].json;\nconst mime = String(r.headers?.['content-type'] ?? '').split(';')[0].trim().toLowerCase();\nif (r.statusCode !== 200 || mime !== 'application/json') throw new Error('json_200_required');\nconst b = r.body;\nif (!b || Object.keys(b).sort().join('|') !== 'action|status|test' ||\n    b.status !== 'ok' || b.test !== 'credentials-demo' || b.action !== false) {\n  throw new Error('unexpected_demo_response');\n}\nreturn [{ json: { verified: true, status: b.status, test: b.test, action: b.action } }];"
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Call Demo API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Demo API": {
      "main": [
        [
          {
            "node": "Check Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}
