{
  "name": "Intent Switch CRM",
  "nodes": [
    {
      "id": "5cf98817-30b8-4f1e-be53-1efba7f149e0",
      "typeVersion": 2,
      "position": [
        0,
        200
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "intent",
        "responseMode": "responseNode",
        "options": {}
      },
      "name": "Contact Webhook",
      "type": "n8n-nodes-base.webhook",
      "webhookId": "intent"
    },
    {
      "id": "27cac70c-f5db-423f-a38c-e8b762ef9970",
      "typeVersion": 3.4,
      "position": [
        240,
        200
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "intent",
              "value": "sales",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "email",
              "value": "lead@example.com",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "name": "Normalize",
      "type": "n8n-nodes-base.set"
    },
    {
      "id": "1c0a491d-de15-42f7-b768-5efe41d137d6",
      "typeVersion": 3.2,
      "position": [
        480,
        200
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "sales",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "sales"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.intent }}",
                    "rightValue": "support",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "support"
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        }
      },
      "name": "Switch Intent",
      "type": "n8n-nodes-base.switch"
    },
    {
      "id": "ffc0fc95-1ad4-4c32-80c0-75a99b534121",
      "typeVersion": 2.1,
      "position": [
        740,
        40
      ],
      "parameters": {
        "resource": "deal",
        "operation": "create",
        "additionalFields": {}
      },
      "name": "HubSpot Deal",
      "type": "n8n-nodes-base.hubspot"
    },
    {
      "id": "5ab6c60c-75af-435c-9ec7-3b1024b7a39f",
      "typeVersion": 1,
      "position": [
        740,
        200
      ],
      "parameters": {
        "resource": "issue",
        "operation": "create",
        "title": "Support inbound",
        "additionalFields": {}
      },
      "name": "Linear Ticket",
      "type": "n8n-nodes-base.linear"
    },
    {
      "id": "841cac99-88c8-495a-9192-974131d72ede",
      "typeVersion": 2.2,
      "position": [
        1000,
        200
      ],
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "inbound"
        },
        "text": "Lead routed — claim it",
        "otherOptions": {}
      },
      "name": "Slack Claim",
      "type": "n8n-nodes-base.slack"
    },
    {
      "id": "601137d9-bf26-4a3c-9954-91468aa5a997",
      "typeVersion": 1.1,
      "position": [
        1240,
        200
      ],
      "parameters": {
        "respondWith": "json",
        "responseBody": "{ \"ok\": true, \"routed\": true }",
        "options": {}
      },
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook"
    }
  ],
  "connections": {
    "Contact Webhook": {
      "main": [
        [
          {
            "node": "Normalize",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize": {
      "main": [
        [
          {
            "node": "Switch Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch Intent": {
      "main": [
        [
          {
            "node": "HubSpot Deal",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Linear Ticket",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack Claim",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot Deal": {
      "main": [
        [
          {
            "node": "Slack Claim",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Linear Ticket": {
      "main": [
        [
          {
            "node": "Slack Claim",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Claim": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "timezone": "Asia/Manila"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}