Resolve Support Calls Via RAG

OpenAI

Ingest voice agent call transcripts, search internal docs for solutions via RAG, email the customer a personalized fix, and log a Zendesk ticket automatically.

Voice SupportRAG SearchZendesk TicketsEmail Automation

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_collection tool 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 to open for 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:

StepNodeWhat Happens
1Webhook TriggerReceives a POST request containing the call transcript and customer metadata from your voice platform.
2Input 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.
3AI AgentReads 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.
4Payload Factory (Code)Builds the API payloads for Zendesk ticket creation, customer email, and engineering escalation email.
5Solution Gate / No-Solution GateTwo parallel code gates route the flow based on whether a knowledge base solution was found.
6aIf solution found:Creates a Zendesk ticket (status: pending) and sends the personalized resolution email to the customer.
6bIf no solution found:Sends an escalation email to the engineering team with detailed notes.

Prerequisites

Before deploying this workflow, ensure you have:

  1. 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.
  2. Zendesk API Access — A Zendesk account with an API token to create and update tickets.
  3. An Email API Provider — An account with Resend, SendGrid, or a similar service to dispatch the resolution and escalation emails.
  4. 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

  1. Import this workflow into your Needle workspace.
  2. Ensure you have created a Collection in Needle containing your support docs. The AI node is pre-configured to use the search_collection tool to query this collection automatically.
  3. If needed, update the collection ID in the AI node settings to point to your specific collection.

2. Connect Zendesk

  1. Open the Zendesk HTTP Request node.
  2. Replace YOUR_SUBDOMAIN in the URL with your actual Zendesk subdomain.
  3. Replace YOUR_BASE64_ENCODED_CREDENTIALS in the Authorization header with your Base64-encoded email/token:api_token string.

3. Connect Your Email Provider

  1. Open both Email HTTP Request nodes (customer email and engineering escalation).
  2. Replace YOUR_RESEND_API_KEY with your actual API key.
  3. Update the from addresses 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:

PlatformTranscript FieldMetadata Location
Retell AIcall.transcriptcall.metadata
Vapitranscriptmetadata
TwiliotranscriptionRoot-level fields
Customtranscript or textRoot-level or metadata

Output Summary

After the workflow completes, the following actions are taken depending on the result:

ScenarioZendesk TicketCustomer EmailEngineering Alert
Solution found in KBCreated with pending status and kb-resolved tagPersonalized fix sentNot sent
No solution foundCreated with open status and needs-engineering tagGeneric acknowledgment sentEscalation 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.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .