Triage Inbox And Route Emails
Automatically reads incoming emails, classifies them as Lead, Support, Invoice, or Spam, then routes each to the right destination—CRM, Zendesk, accounting, or trash.
Overview
Founders, sales teams, and customer success managers waste hours every day manually reading, sorting, and forwarding emails from generic hello@ or sales@ addresses. This workflow acts as an intelligent traffic director: hot leads get an immediate personalized response, invoices go to accounting, support issues become Zendesk tickets, and spam is silently ignored—completely hands-free.
How It Works
The workflow follows a simple four-step pipeline:
- Receive the email — A webhook trigger accepts incoming email data (sender, subject, body) from your email provider or automation tool.
- Classify with AI — An AI agent reads the email and categorizes it as exactly one of:
Lead,Support,Invoice, orSpam. For leads and support emails, it also extracts the sender's name, company, and a request summary. - Build route-specific payloads — A routing code node evaluates the category and constructs the correct data payload for each downstream action. Categories that don't match a given route produce a
nullpayload, which the downstream node safely skips. - Execute parallel actions — Up to four actions fire simultaneously depending on the category.
Routing Paths by Category
| Category | Actions Taken |
|---|---|
| Lead | Pushes structured lead data (name, company, email, summary) to your CRM. Sends a personalized AI-drafted reply inviting the prospect to book a call. |
| Support | Creates a formatted ticket in Zendesk with the requester's details and issue summary. Sends a notification to your #support Slack channel. |
| Invoice | Forwards the email summary to your internal accounting/billing email address. |
| Spam | Ignored entirely. No API calls are made. |
Workflow Nodes
| Node | Type | Purpose |
|---|---|---|
| Webhook Trigger | Trigger | Receives inbound email data via POST request |
| AI Classifier | AI Agent | Categorizes the email and extracts structured fields |
| Routing Engine | Code | Builds isolated payloads for each downstream path |
| CRM Push | HTTP Request | Sends lead data to your CRM endpoint |
| Zendesk Ticket | HTTP Request | Creates a support ticket in Zendesk |
| Invoice Forward | HTTP Request | Forwards invoice details to your accounting email |
| Lead Reply Email | HTTP Request | Sends a personalized booking reply to the lead |
| Slack Notification | Slack | Posts a support alert to your team channel |
Prerequisites
To deploy this workflow, you will need:
- An inbound email webhook — A tool like Make.com, Zapier, or a native Gmail/Outlook webhook configured to send new emails to your Needle trigger URL.
- CRM API endpoint — Your GoHighLevel, HubSpot, or custom CRM endpoint to receive lead data.
- Zendesk API credentials — A Base64-encoded auth token with permission to create tickets.
- Email API provider — An account with Resend, SendGrid, or Mailgun to dispatch forwarded invoices and lead replies.
- Slack connection — A connected Slack account with access to your
#supportchannel (for support notifications).
Setup Instructions
- Import the template into your Needle workspace.
- Update the CRM HTTP node — Replace the placeholder URL and
Authorizationheader with your real CRM endpoint and API key. - Update the Zendesk HTTP node — Replace the subdomain in the URL and the
Authorizationheader with your Zendesk credentials. - Update the email HTTP nodes (Invoice Forward and Lead Reply) — Replace the API key in the
Authorizationheader with your email provider's key. Update thefromaddress in the routing code node to match your verified sending domain. - Connect your Slack account in the Slack notification node and confirm the target channel.
- Configure your email webhook — Point your email provider or automation tool to send a POST request to the Needle webhook URL whenever a new email arrives.
Testing
Send a test POST payload to your Needle webhook URL to verify the full pipeline. Here's a sample lead email:
{ "senderEmail": "ceo@startup.io", "senderName": "David Chen", "subject": "Interested in Voice Automation", "body": "Hi team, I run a logistics company and we are looking to automate our inbound dispatch calls. Can we schedule a demo for next Tuesday? Thanks, David." }
You should see:
- A new lead record created in your CRM
- A personalized reply email sent to the test sender address
- No Zendesk ticket or invoice forward (those paths are skipped for leads)
Try similar test payloads with support, invoice, and spam content to confirm each routing path works correctly.
Tips
- Spam filtering saves money. Because spam is caught before any external API calls, you avoid unnecessary costs on your CRM, Zendesk, and email provider.
- Response speed matters. Studies show that responding to a lead within five minutes makes you 21× more likely to qualify them. This workflow replies in seconds.
- Customize the AI prompt to match your business context. If you sell B2B software, tell the AI what your product does so it can draft more relevant lead replies.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
