Customer Support Agent
Classify inbound support email, draft a grounded reply from your knowledge base, gate urgent cases behind a human, and notify the team in Slack.
What you'll build
An always-on agent that reads new support emails, decides how urgent they are, drafts a reply grounded in your help-center docs, and either sends it automatically or escalates to a human for approval.
Trigger: a Gmail webhook that fires on every new inbound email.
The workflow
Build it
Starter — Gmail trigger
Add a Starter and set its trigger to Gmail. New emails arrive with {{starter.input.subject}}, {{starter.input.from}}, and {{starter.input.body}}.
Agent — classify urgency and intent
Add an Agent with Response Format on so the classification is typed:
{
"urgency": "urgent | normal | spam",
"intent": "string",
"language": "string"
}Prompt it to read {{starter.input.subject}} and {{starter.input.body}} and fill the schema.
Router — branch on urgency
Add a Router block keyed on {{agent.output.urgency}} with three paths: urgent, normal, spam. The Router picks exactly one downstream path.
Urgent path — alert the team
On the urgent path, add a Slack block that posts to your #support channel: the customer, the subject, and {{agent.output.intent}}. No auto-reply — a human takes it from here.
Normal path — draft a grounded reply
On the normal path:
- Add a Knowledge block that searches your help-center collection using
{{agent.output.intent}}as the query — this grounds the reply in real docs. - Add a second Agent that writes a reply in
{{agent.output.language}}, using{{knowledge.results}}as source material. Instruct it to answer only from the retrieved docs and to hand off to a human if it can't.
Human-in-the-loop — approve before sending
Add a Human in the Loop block after the draft. It pauses the run and surfaces the drafted reply for a teammate to approve or edit. On approval, continue; on rejection, stop.
Gmail — send the reply
Add a Gmail block that replies to {{starter.input.from}} with the approved draft. Done.
Make it yours
- Skip the human gate for low-risk intents by routing "how do I…" questions straight to send, and only gating refunds/cancellations.
- Add a guardrail. Put a Guardrails block before send to block replies that leak PII or make promises about pricing.
- Support more channels. Swap the Gmail trigger for a Slack or Intercom trigger — the rest of the graph is unchanged.
Related
Deep Research Agent
A workflow that searches the web and academic sources in parallel, then synthesizes the findings into a cited research brief with structured output.
RAG Knowledge Agent
Answer questions strictly from your own documents using vector search, with a guardrail that blocks answers the sources don't support.