{
	"name": "EchoStack Lead Evaluation",
	"nodes": [
		{
			"parameters": {
				"httpMethod": "POST",
				"path": "echostack-lead-eval",
				"responseMode": "lastNode",
				"options": {}
			},
			"id": "webhook-trigger",
			"name": "Webhook",
			"type": "n8n-nodes-base.webhook",
			"typeVersion": 2,
			"position": [0, 0],
			"webhookId": "echostack-lead-eval"
		},
		{
			"parameters": {
				"resource": "lead",
				"operation": "evaluate",
				"inputMode": "formFields",
				"formFields": "={{ $json.body ?? $json }}",
				"requestNextAction": true,
				"includeReasoning": true
			},
			"id": "echostack-evaluate",
			"name": "EchoStack Evaluate",
			"type": "n8n-nodes-echostack.echoStack",
			"typeVersion": 1,
			"position": [280, 0],
			"credentials": {
				"echoStackApi": {
					"id": "REPLACE_WITH_CREDENTIAL_ID",
					"name": "EchoStack API"
				}
			}
		},
		{
			"parameters": {
				"rules": {
					"values": [
						{
							"conditions": {
								"options": { "version": 2 },
								"combinator": "and",
								"conditions": [
									{
										"leftValue": "={{ $json.status }}",
										"rightValue": "QUALIFIED",
										"operator": { "type": "string", "operation": "equals" }
									}
								]
							},
							"renameOutput": true,
							"outputKey": "QUALIFIED"
						},
						{
							"conditions": {
								"options": { "version": 2 },
								"combinator": "and",
								"conditions": [
									{
										"leftValue": "={{ $json.status }}",
										"rightValue": "PARTIAL",
										"operator": { "type": "string", "operation": "equals" }
									}
								]
							},
							"renameOutput": true,
							"outputKey": "PARTIAL"
						},
						{
							"conditions": {
								"options": { "version": 2 },
								"combinator": "and",
								"conditions": [
									{
										"leftValue": "={{ $json.status }}",
										"rightValue": "FAILED",
										"operator": { "type": "string", "operation": "equals" }
									}
								]
							},
							"renameOutput": true,
							"outputKey": "FAILED"
						},
						{
							"conditions": {
								"options": { "version": 2 },
								"combinator": "and",
								"conditions": [
									{
										"leftValue": "={{ $json.status }}",
										"rightValue": "ESCALATE",
										"operator": { "type": "string", "operation": "equals" }
									}
								]
							},
							"renameOutput": true,
							"outputKey": "ESCALATE"
						}
					]
				},
				"options": { "fallbackOutput": "extra" }
			},
			"id": "switch-status",
			"name": "Route by Status",
			"type": "n8n-nodes-base.switch",
			"typeVersion": 3.2,
			"position": [560, 0]
		},
		{
			"parameters": {
				"content": "## QUALIFIED\nAssign AE, update HubSpot deal stage, or book meeting.",
				"height": 140,
				"width": 280
			},
			"id": "note-qualified",
			"name": "Qualified — next steps",
			"type": "n8n-nodes-base.stickyNote",
			"typeVersion": 1,
			"position": [820, -180]
		},
		{
			"parameters": {
				"content": "## PARTIAL\nAdd to nurture sequence or create SDR task. Missing fields: {{ $json.missing_fields }}",
				"height": 140,
				"width": 280
			},
			"id": "note-partial",
			"name": "Partial — nurture",
			"type": "n8n-nodes-base.stickyNote",
			"typeVersion": 1,
			"position": [820, -20]
		},
		{
			"parameters": {
				"content": "## FAILED\nDisqualify or archive in CRM.",
				"height": 120,
				"width": 240
			},
			"id": "note-failed",
			"name": "Failed — disqualify",
			"type": "n8n-nodes-base.stickyNote",
			"typeVersion": 1,
			"position": [820, 140]
		},
		{
			"parameters": {
				"content": "## ESCALATE\nSlack alert or priority queue.",
				"height": 120,
				"width": 240
			},
			"id": "note-escalate",
			"name": "Escalate — alert",
			"type": "n8n-nodes-base.stickyNote",
			"typeVersion": 1,
			"position": [820, 300]
		},
		{
			"parameters": {
				"content": "## HubSpot form trigger\nReplace the Webhook with **HubSpot → On Form Submission**, then set Form Fields to the trigger output. Keep EchoStack Evaluate and Route by Status.",
				"height": 160,
				"width": 360
			},
			"id": "note-hubspot",
			"name": "HubSpot tip",
			"type": "n8n-nodes-base.stickyNote",
			"typeVersion": 1,
			"position": [-40, -200]
		}
	],
	"connections": {
		"Webhook": {
			"main": [[{ "node": "EchoStack Evaluate", "type": "main", "index": 0 }]]
		},
		"EchoStack Evaluate": {
			"main": [[{ "node": "Route by Status", "type": "main", "index": 0 }]]
		}
	},
	"pinData": {
		"Webhook": [
			{
				"json": {
					"body": {
						"company": "Startup Co",
						"role": "Sales Manager",
						"problem": "Our sales team spends too long on manual data entry",
						"budget": "Not specified",
						"timeline": "Not specified"
					}
				}
			}
		]
	},
	"meta": {
		"templateCredsSetupCompleted": false
	}
}
