08 · Advanced
Sends sales and support intents to HubSpot or Linear, then notifies Slack when a ticket lands.
Webhook
Set
Switch
HubSpot
Linear
Slack
n8n canvas preview
Intent Switch CRM
Canvas via n8n-demo · import JSON into n8n.io → Workflows → Import from File
Writeup
POST /intent → Set (demo intent/email) → Switch sales|support → HubSpot deal or Linear issue → Slack #inbound → Respond { ok, routed }.
Step by step — how to build it
01
Add Webhook
POST, Path intent. Respond using Respond to Webhook node.
02
Add Set (Normalize)
Connect Webhook → Set. Add fields intent and email. For real use: {{$json.body.intent}} / {{$json.body.email}} (demo uses literals sales / lead@example.com).
03
Add Switch
Connect Set → Switch. Rule 1: {{$json.intent}} equals sales (output sales). Rule 2: equals support (output support). Fallback: extra.
04
Sales → HubSpot
sales output → HubSpot → Resource Deal → Operation Create. Fill required portal fields + credential.
05
Support → Linear
support output → Linear → Create Issue, title Support inbound. Pick team + credential.
06
Merge paths into Slack
Connect HubSpot, Linear, and Switch fallback → Slack (#inbound, “Lead routed — claim it”).
07
Add Respond
Slack → Respond to Webhook → JSON { "ok": true, "routed": true }.
08
Test sales and support
POST intent=sales → HubSpot + Slack + routed JSON. POST intent=support → Linear + Slack + same JSON.
How it functions
1 · Contact Webhook
POST path intent, responseMode responseNode.
2 · Normalize (Set)
Demo assignments: intent="sales", email="lead@example.com". Replace with {{$json.body.*}} for real forms.
3 · Switch Intent
sales → HubSpot Deal (create deal). support → Linear Ticket (create issue, title “Support inbound”). fallbackOutput extra → Slack Claim.
4 · Slack Claim → Respond
Both CRM paths (and fallback) hit Slack #inbound (“Lead routed — claim it”), then Respond JSON { "ok": true, "routed": true }.
Setup notes
Credentials
HubSpot, Linear, and Slack credentials in n8n. Invite the bot to #inbound.
Replace demo Set values
Normalize should read the webhook body (intent, email, message) — the export ships static placeholders.
Fill CRM required fields
HubSpot deal + Linear issue need pipeline/team fields your instance requires — open each node and complete them.
Activate & test both intents
POST …/webhook/intent with intent sales and support; confirm CRM row + Slack + { routed: true }.
Tips
Switch outputs are renamed sales / support; fallback extra skips CRM and still Slack-claims.
Don’t leave demo email lead@example.com in production Normalize.
Import into n8n.io → Workflows → Import from File, attach credentials, activate.