Turn a shared email inbox into AI-handled tickets
Workflow purpose
This guide demonstrates how to use Proto's AI agent to work through a shared email inbox – the support@ or info@ address that every team copies and nobody owns – so each email is read, sorted and either answered or logged within minutes.
The workflow connects the address to the AI agent's Email channel. When an email arrives, the AI agent classifies it, answers simple questions from your knowledge base in the same email thread, and turns everything else into a ticket with tags, a category and the right team as assignee. The person gets a ticket reference by email, and a live agent replies from the ticket in the Inbox.
Shared inboxes fail quietly: emails sit unread over weekends, two people answer the same one, and nobody can say how many arrived last month. Routing them through an AI agent gives every email an owner and a record.
Who can benefit from this guide:
- Customer support teams working from a shared support address
- Government agencies receiving citizen enquiries by email
- Hospitals and clinics with a general patient enquiries address
- Banks and mobile money providers handling customer service email
- Telecom operators replacing a manually sorted mailbox
Turn a shared inbox into tickets
This workflow reads every incoming email, answers what it can and routes the rest to the right team as a ticket. See how to build a shared inbox workflow.
1. Create a trigger
Start the flow for every email that asks a question or raises a problem.
- Navigate to the Workflows tab in the AI agent settings.
- Click New workflow and select Message received as the Workflow type.
- Name the trigger (e.g. “Incoming Email”) and add a short description (e.g. “Triggers for any incoming email that asks a question, requests a service, reports a problem or makes a complaint.”).
- Add training phrases that reflect how people open emails to you (e.g. “I am writing to ask about”, “Please can you help with”, “I have not received”, “I would like to complain about”, “Could you tell me”).
Use a dedicated AI agent for the inbox rather than adding the channel to your chat agent. Emails are longer and more formal than chat messages, and a separate agent lets you write an Agent persona for email – full sentences, a greeting and a sign-off – on the Agent tab.
Emails that don’t match this trigger reach the default Fallback workflow. Add a Jump action there to the first action of this workflow, so no email is left without an answer or a ticket.
2. Connect the shared address to the Email channel
Give the AI agent an address people can write to.
- Navigate to Settings › Email domains and add the domain you send from (e.g. mail.yourorg.com). Keep Enable automatic security selected for a subdomain, then add the records shown on the DNS records tab to your DNS and click Verify.
- On the AI agent’s Publish tab, add an Email channel. Under Email Configuration, choose the verified domain in Email domain and enter the part before the @ in Inbound Email Address (e.g. support). The page shows the full address the channel is reachable at. Neither setting can be changed once saved, so choose carefully.
- Turn on Combine replies into a single email, so several Send message actions in one reply arrive as one email instead of several.
- Optionally, turn on Include footer in outbound emails and add your standard signature or legal notice as HTML in Footer HTML Template.
To move an existing address such as support@yourorg.com, set your mail system to forward it to the channel’s address. The AI agent replies from the channel’s address and keeps the original subject line with “Re:”, so the conversation stays in one thread in the person’s email client.
The default Chat started workflow also runs when a new email arrives. Remove its greeting message in this AI agent, or rewrite it for email – otherwise people receive a separate “Hello” email before the answer.
3. Read and classify the email
Sort each email into a category your team already uses.
Navigate to Settings › Custom fields, open Conversation fields and click Create new field. Create a field named Email category of type Single select (grouped) with options such as General question, Billing, Account access, Complaint and Other.
Back in the workflow, add an Auto fill field action. Action title: Classify email
- Fields: Email category
- Resulting variable:
email_fill
The action reads the latest messages in the conversation – here, the body of the email – and picks the best-matching option. Add a Set variable action under Success to store email_category as email_fill["Email category"]["new_value"]["name"]. Under Error, set email_category to Other, so the email still becomes a ticket.
The AI agent reads the body of the email, not its subject line, and only the newest reply – earlier messages quoted below it are removed. If people often put the whole request in the subject, ask them in your auto-reply to describe it in the email itself.
4. Answer simple questions from the knowledge base
Reply straight away when the answer is already published.
Add your FAQs, service guides and fee schedules to the AI agent’s Knowledge tab › Knowledge base with Upload file, Add URL or Paste snippet, and turn on Large language model under Personalization on the Agent tab.
Add a Branch action. Under email_category == "General question", add an LLM Processing action:
- Input:
{_user_input} - Temperature: 0
- System Prompt: “You answer emails sent to our support address. Answer only from the knowledge provided, in plain full sentences, in under 150 words. If the knowledge does not fully answer the question, reply with only the word NO_ANSWER.”
- Turn on Use Knowledge info to provide more context
- Resulting variable:
kb_answer
Add a second Branch. If kb_answer == "NO_ANSWER", add a Jump to Step 5, so the question becomes a ticket. Under Else, add a Send message:
“Thank you for your email. {kb_answer} If this doesn’t answer your question, just reply to this email and a member of our team will pick it up.”
If the person replies saying the answer didn’t help, the reply arrives in the same conversation and the trigger from Step 1 runs again. Add a Message received sub-trigger after the answer (training phrases: that didn’t help, this doesn’t answer my question, I still need help) with a Jump to Step 5.
5. Match the email to a team
Send each category to the team that owns it, without a rule per team.
Navigate to Settings › Teams and make sure each team’s name or Alternative names include the category it handles, e.g. a Billing and Payments team with the alternative name Billing.
Add an Auto team match action:
- Input:
{email_category} - Resulting variable:
matched_team
It compares the category with team names and alternative names and branches into Match found, No match and Error. Under No match and Error, use your general support team as the assignee in Step 6. Auto team match works on short labels like a category, not on the text of the email itself – that’s why the email is classified first.
6. Create the ticket
Log the email as a ticket with everything the team needs.
Add a Create ticket action:
| Field | Value |
|---|---|
| Assignee | Teams set from the variable matched_team["id"] (or your general support team) |
| Email sender | an address on your verified domain for ticket emails, e.g. tickets@mail.yourorg.com |
| Subject* | {email_category}: new email enquiry |
| Description | {_user_input} |
| Full name* | {_customer.name}, or “Email enquiry” if your customers are new |
| Email* | {_customer.email} |
| Auto-apply tags | email-inbox, and kb-not-answered under the Step 4 jump |
| Custom fields | Email category = {email_category} |
| Email template (to the person) | Ticket received (Step 7) |
| Email template (to the assignee) | New email ticket (Step 7) |
The Email sender is created under Settings › Email domains › your domain › Email addresses › Create email address. It must use a different name from the channel’s inbound address. Leave Create tickets from emails off on it – otherwise new emails sent straight to that address become tickets without passing through the AI agent.
Every new person who emails the channel is saved with their email address, which is why {_customer.email} is available here. Check Settings › Tickets for mandatory custom fields: a Create ticket action that doesn’t supply them stops, so add them under Custom fields too.
7. Confirm by email and hand over to the team
Tell the person what happens next, then close the email conversation.
Navigate to Settings › Email templates and create two templates. Use Insert variable to add placeholders such as {ticket.short_id}, {ticket.subject}, {ticket.assigned_team_names} and {customer.name}:
- Ticket received (to the person): “We’ve logged your email as ticket {ticket.short_id}. Our {ticket.assigned_team_names} team will reply from this address – please keep the reference in the subject when you write back.”
- New email ticket (to the assignee): the subject, category and description, so the team can triage from their own inbox.
After the Create ticket action, add a Send message in the email thread:
“Thank you for your email. We’ve passed it to our team as ticket {_new_ticket.short_id}. You’ll hear from us in a separate email – please reply to that one, so your messages stay with your ticket.”
Then add a Close chat action.
A live agent opens the ticket in the Inbox, reads the description and replies from the ticket. The reply goes from the ticket’s Email sender, and the person’s answers return to the same ticket. Proto doesn’t email the person when a ticket’s status changes, so ask agents to reply before setting a ticket to resolved.
Use the teamspace’s overdue rule in Settings › Tickets › Overdue rules to flag tickets nobody has answered – it applies to every ticket in the teamspace. Create an Inbox view filtered on the email-inbox tag to see the shared inbox’s tickets in one place.
8. Keep email replies email-shaped
Avoid actions that don’t make sense in an email.
- Quick replies, carousels and charts from Send graph don’t appear in emails. Ask questions in plain text instead, e.g. “Please reply with your account number.”
- Each attachment in an incoming email arrives as a separate message and fires the Attachment received trigger. Add an Attachment received workflow with a Set variable action only (e.g.
has_attachment=true), so files are kept with the email conversation without an extra email for each one. Live agents can see the files in the email conversation in the Inbox. - A Live agent handoff also works on email, for urgent cases a live agent should answer in the same thread. While a live agent is handling the conversation, the AI agent stops replying to new emails in it.
9. Test the flow
Validate every path before going live using the AI agent tester side panel.
- Paste a question your knowledge base answers and check
email_categoryis General question and the reply useskb_answer. - Paste a question the knowledge base can’t answer and confirm it reaches Step 6 with the kb-not-answered tag.
- Paste a billing complaint and check Auto team match assigns the billing team, and that a category with no team reaches your general support team.
- The tester can’t send or receive email, so subject threading, the footer, attachments and the ticket confirmation template need a real test: send emails from an outside account to the channel’s address and reply to the ticket email from the Inbox.
- Build and test in an undeployed version – Duplicate the live version first – then Deploy it once every path passes.
Finalise the AI agent deployment by configuring your preferred channels and languages.
.png)