{
  "name": "n8nCal \u00b7 /ping",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "n8ncal/ping",
        "responseMode": "responseNode",
        "options": {
          "allowedOrigins": "*"
        }
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -300,
        0
      ],
      "id": "a1b2c3d4-0001-4000-8000-000000000001",
      "name": "Webhook \u00b7 /ping"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "auth",
              "leftValue": "={{ $json.headers['x-n8ncal-token'] }}",
              "rightValue": "={{ $env.N8NCAL_TOKEN }}",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -80,
        0
      ],
      "id": "a1b2c3d4-0001-4000-8000-000000000002",
      "name": "Auth check"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={\n  \"error\": \"unauthorized\"\n}",
        "options": {
          "responseCode": 401
        }
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        140,
        200
      ],
      "id": "a1b2c3d4-0001-4000-8000-000000000003",
      "name": "Respond 401"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "ok",
              "name": "ok",
              "value": "={{ true }}",
              "type": "boolean"
            },
            {
              "id": "service",
              "name": "service",
              "value": "n8nCal",
              "type": "string"
            },
            {
              "id": "version",
              "name": "version",
              "value": "0.1.0",
              "type": "string"
            },
            {
              "id": "ts",
              "name": "ts",
              "value": "={{ $now.toISO() }}",
              "type": "string"
            },
            {
              "id": "calendar",
              "name": "calendar",
              "value": "primary",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        140,
        0
      ],
      "id": "a1b2c3d4-0001-4000-8000-000000000004",
      "name": "Shape response"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        360,
        0
      ],
      "id": "a1b2c3d4-0001-4000-8000-000000000005",
      "name": "Respond"
    }
  ],
  "connections": {
    "Webhook \u00b7 /ping": {
      "main": [
        [
          {
            "node": "Auth check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Auth check": {
      "main": [
        [
          {
            "node": "Shape response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond 401",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shape response": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "n8nCal"
    }
  ]
}