{
  "name": "GoWAPI Trigger Explanation",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "gowapi-qr-webhooks",
        "options": {}
      },
      "id": "969f6ebb-547e-4ff2-91fa-62ac64881e68",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -688,
        272
      ],
      "webhookId": "b7453a5b-c133-40d1-a221-870b3ef3d8d0"
    },
    {
      "parameters": {
        "mode": "raw",
        "jsonOutput": "={{ $json.body }}",
        "options": {}
      },
      "id": "f0c1b50c-9edf-4aad-9773-c0906a014571",
      "name": "Extract Event",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -528,
        272
      ]
    },
    {
      "parameters": {
        "content": "## GoWAPI Webhook",
        "height": 1110,
        "width": 455,
        "color": 6
      },
      "id": "aec3fc39-5716-458c-99f1-60a0b942fcca",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {},
      "id": "28599f0e-d74f-4b09-b8a5-0736e5026fa4",
      "name": "GoWAPI Trigger",
      "type": "@gowaplatform/n8n-nodes-gowapi.gowapiTrigger",
      "typeVersion": 202502,
      "position": [
        80,
        64
      ],
      "webhookId": "71251449-2644-4325-8ba7-2a1550a81fb4"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.event }}",
                    "rightValue": "session.status",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "session.status"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "id": "a7b7b1ea-7575-416f-87f3-c4f799c16de0",
                    "leftValue": "{{ $json.event }}",
                    "rightValue": "message",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "message"
            }
          ]
        },
        "options": {}
      },
      "id": "cecef7a5-eb32-4df5-bfc3-a0e52ed025e6",
      "name": "Listen for Events",
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.1,
      "position": [
        -384,
        272
      ]
    },
    {
      "parameters": {
        "content": "## Webhook Shortcut\n**GoWAPI Webhook** node is basically a shortcut for  operations:\n\n1. Webhook handler\n2. Extract **body** from the POST request\n3. Filter events based on `event` ",
        "height": 351.87272727272716,
        "width": 558.3138303449722
      },
      "id": "f2c9f9fa-5e95-4166-b0d9-a537fe297339",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -720,
        80
      ]
    }
  ],
  "pinData": {
    "Webhook": [
      {
        "json": {
          "headers": {
            "content-type": "application/json",
            "host": "localhost:5678",
            "content-length": "267",
            "connection": "keep-alive"
          },
          "params": {},
          "query": {},
          "body": {
            "event": "session.status",
            "session": "default2",
            "metadata": {
              "user.id": "123"
            },
            "me": null,
            "payload": {
              "name": "default2",
              "status": "SCAN_QR_CODE"
            },
            "engine": "GOWS",
            "environment": {
              "version": "2026.3.4",
              "engine": "GOWS",
              "tier": "PLUS",
              "browser": "/usr/bin/google-chrome-stable"
            }
          },
          "webhookUrl": "http://localhost:5678/webhook-test/gowapi-qr-webhooks",
          "executionMode": "test"
        }
      }
    ]
  },
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Extract Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Event": {
      "main": [
        [
          {
            "node": "Listen for Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "versionId": "07c4b058-11d3-4efc-8218-e91b4f161501",
  "meta": {
    "instanceId": "e6b2ac4373317d839cea81f60f814435f8a27242502220ee6f8b78a51661ada9"
  },
  "id": "JYvtodHMP0AWMe2y",
  "tags": []
}