Resolve Support Calls Via RAG
Ingest voice agent call transcripts, search internal docs for solutions via RAG, email the customer a personalized fix, and log a Zendesk ticket automatically.
Overview
When a customer calls with a niche technical issue, standard AI voice agents often hit a wall and say, "I will have a human get back to you." This workflow eliminates that bottleneck.
Using Needle's document search capabilities (RAG via MCP), this workflow ingests the post-call transcript, understands the complex bug being reported, hunts down the solution in your internal documentation, and emails the fix to the customer instantly — all while logging a fully documented ticket in Zendesk.
Key Features
- RAG-Powered Knowledge Search: Uses Needle's native
search_collectiontool to query your securely uploaded company data (Notion docs, PDFs, API specs) in real time. - Intelligent Ticket Triage: Code-level routing determines the outcome. If the AI finds a solution, the Zendesk ticket is set to
pending. If the bug is undocumented, it's set toopenfor human intervention and an engineering escalation email is sent. - Personalized Customer Resolution: Generates a professional, step-by-step troubleshooting email tailored to the customer's specific reported issue.
- Engineering Summaries: Extracts the core technical data from a long call transcript into a crisp summary for your engineering team to review.
How It Works
The workflow follows this sequence:
| Step | Node | What Happens |
|---|---|---|
| 1 | Webhook Trigger | Receives a POST request containing the call transcript and customer metadata from your voice platform. |
| 2 | Input Normalizer (Code) | Parses the incoming payload, handling different voice platform formats (Retell, Vapi, Twilio, custom). Extracts transcript, customer email, name, call ID, and other metadata. |
| 3 | AI Agent | Reads the transcript, searches your Needle knowledge collection for a matching solution, and produces structured output including the extracted issue, solution summary, customer email draft, internal notes, and urgency level. |
| 4 | Payload Factory (Code) | Builds the API payloads for Zendesk ticket creation, customer email, and engineering escalation email. |
| 5 | Solution Gate / No-Solution Gate | Two parallel code gates route the flow based on whether a knowledge base solution was found. |
| 6a | If solution found: | Creates a Zendesk ticket (status: pending) and sends the personalized resolution email to the customer. |
| 6b | If no solution found: | Sends an escalation email to the engineering team with detailed notes. |
Prerequisites
Before deploying this workflow, ensure you have:
- A Needle Knowledge Collection — Upload your support documentation, PDFs, and internal guides to a Needle Collection so the AI agent has a knowledge base to search.
- Zendesk API Access — A Zendesk account with an API token to create and update tickets.
- An Email API Provider — An account with Resend, SendGrid, or a similar service to dispatch the resolution and escalation emails.
- Voice Agent Webhook — A voice provider configured to send the post-call transcript and caller metadata to this workflow's trigger URL.
Setup Instructions
1. Import and Configure the Knowledge Base
- Import this workflow into your Needle workspace.
- Ensure you have created a Collection in Needle containing your support docs. The AI node is pre-configured to use the
search_collectiontool to query this collection automatically. - If needed, update the collection ID in the AI node settings to point to your specific collection.
2. Connect Zendesk
- Open the Zendesk HTTP Request node.
- Replace
YOUR_SUBDOMAINin the URL with your actual Zendesk subdomain. - Replace
YOUR_BASE64_ENCODED_CREDENTIALSin the Authorization header with your Base64-encodedemail/token:api_tokenstring.
3. Connect Your Email Provider
- Open both Email HTTP Request nodes (customer email and engineering escalation).
- Replace
YOUR_RESEND_API_KEYwith your actual API key. - Update the
fromaddresses in the Payload Factory code node to match your verified sending domain.
4. Test the Workflow
Send a test POST request to the webhook trigger URL with a payload like this:
{ "customerEmail": "johndoe@example.com", "customerName": "John Doe", "callId": "call_test_001", "productName": "Analytics Dashboard", "transcript": "Agent: How can I help you today? Caller: Hi, I am trying to export my analytics report to CSV, but I keep getting an Error 504 Gateway Timeout. I've cleared my cache but it's still stuck." }
Supported Voice Platforms
The Input Normalizer code node automatically handles payloads from multiple voice providers:
| Platform | Transcript Field | Metadata Location |
|---|---|---|
| Retell AI | call.transcript | call.metadata |
| Vapi | transcript | metadata |
| Twilio | transcription | Root-level fields |
| Custom | transcript or text | Root-level or metadata |
Output Summary
After the workflow completes, the following actions are taken depending on the result:
| Scenario | Zendesk Ticket | Customer Email | Engineering Alert |
|---|---|---|---|
| Solution found in KB | Created with pending status and kb-resolved tag | Personalized fix sent | Not sent |
| No solution found | Created with open status and needs-engineering tag | Generic acknowledgment sent | Escalation email with full details |
Customization Tips
- Adjust urgency mapping: Edit the Payload Factory code node to change how urgency levels map to Zendesk priorities.
- Add Slack notifications: Insert an additional HTTP node after the escalation gate to post alerts to a Slack channel.
- Expand the knowledge base: Upload new docs to your Needle Collection at any time — the AI agent will automatically search across all uploaded content.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
