Sort a shared inbox and hand sales leads to a rep
Reads new Front conversations, labels each as sales, support, billing, partner or noise with Jev, then tags, assigns and alerts sales.
Outcome
A table of every new conversation with its label, urgency and Jev's confidence.
Each conversation tagged in Front with its label, and the unsure ones labeled by you.
Every sales lead assigned to your sales rep and posted to Slack.
How it works
- 1
Pull new conversations
FrontSearch
inboxfor unassigned conversations created aftersince. Keep each conversation's ID, subject and sender, and read each one's first message, a read-only call. - 2
Label them
TypeSafe AISend each subject and message as the state, with a choice
labelof sales_lead (asks about buying, prices, a demo or a trial), support (a customer needs help), billing (invoices, payments or refunds), partner (an integration, reseller or agency offer), vendor_pitch (someone selling to you), job_application (someone applying for a job), spam (junk or phishing) and other, and a scoreurgencyon three levels (can wait; today; within the hour). Keep each label, its confidence and the most likely urgency. - 3
Check the unsure ones with the user
Your agentShow the user every conversation whose label confidence is below
min_confidence, with Jev's two most likely labels, and keep the label the user picks. - 4
Tag them
FrontAfter the user approves, add the tag in
label_tagsfor each conversation's label. - 5
Assign sales leads
FrontAssign each sales_lead conversation to
sales_rep. - 6
Alert sales
SlackPost each sales lead to
sales_channelwith the sender, the subject, the urgency and the message's first two lines, most urgent first.
You'll be asked for
The shared Front inbox to sort, by name
e.g. hello@
When the last run ended, so only newer conversations are read
e.g. 2026-09-29 08:00 UTC
The Front tag for each label, created once
e.g. sales_lead: Sales lead; support: Support; billing: Billing; partner: Partner; vendor_pitch: Vendor pitch; job_application: Jobs; spam: Spam; other: Needs a look
The teammate who gets sales leads, by name
e.g. Dana Lee
How sure Jev must be before its answer is used without you
e.g. 0.8
The Slack channel for sales leads
e.g. #inbound-leads
The file your agent runs
shared-inbox-triage.md
Sort a shared inbox and hand sales leads to a rep
Reads new Front conversations, labels each as sales, support, billing, partner or noise with Jev, then tags, assigns and alerts sales.
Set up the tools below, then run the steps in order for the user, carrying each step's results into the next. The run is done when the user has the outcome below.
Outcome
- A table of every new conversation with its label, urgency and Jev's confidence.
- Each conversation tagged in Front with its label, and the unsure ones labeled by you.
- Every sales lead assigned to your sales rep and posted to Slack.
Inputs
Ask the user for these before you start.
inbox: the shared Front inbox to sort, by name, e.g. hello@since: when the last run ended, so only newer conversations are read, e.g. 2026-09-29 08:00 UTClabel_tags: the Front tag for each label, created once, e.g. sales_lead: Sales lead; support: Support; billing: Billing; partner: Partner; vendor_pitch: Vendor pitch; job_application: Jobs; spam: Spam; other: Needs a looksales_rep: the teammate who gets sales leads, by name, e.g. Dana Leemin_confidence: how sure Jev must be before its answer is used without you, e.g. 0.8sales_channel: the Slack channel for sales leads, e.g. #inbound-leads
Set up
Front (tool:front/search-conversations, tool:front/tag-conversation, tool:front/assign-conversation)
Use the first option your agent supports.
Notes:
- Search conversations: On MCP, set
scopetoall_inboxes: the default searches only the caller's own conversations. Up to 15 filters, combined with AND; the API endpoint is limited to 40% of the company's rate limit. - Tag a conversation: Takes tag IDs (
tag_...), not names: find them withlist_tagson the MCP server orGET /tagson the API. - Assign a conversation: Takes a teammate ID (
tea_...), not a name, or null to unassign; find teammate IDs withlist_teammateson the MCP server.
MCP (official, remote)
Add this server to your agent's MCP settings, then sign in when asked.
{ "mcpServers": { "front": { "url": "https://mcp.frontapp.com/mcp" } } }
- Search conversations: call the MCP tool
search_conversations - Tag a conversation: call the MCP tool
tag_conversation - Assign a conversation: call the MCP tool
assign_conversation
Note: Connect with the client ID and secret of a Front developer app that has MCP Server access: Front has no dynamic client registration.
API (official)
- Base URL: https://api2.frontapp.com
- Search conversations:
GET /conversations/search/{query} - Tag a conversation:
POST /conversations/{conversation_id}/tags - Assign a conversation:
PUT /conversations/{conversation_id}/assignee - Auth: send the header
Authorization: Bearer $FRONT_API_KEY - Get a key: https://dev.frontapp.com/docs/create-and-revoke-api-tokens
Answer typed questions (TypeSafe AI, tool:typesafe/answer-typed-questions)
Use the API.
- Base URL: https://api.typesafe.ai
- Endpoint:
POST /v1/systemone - Auth: send the header
Authorization: Bearer $TYPESAFE_API_KEY - Get a key: https://console.typesafe.ai
Note: Put every question about one record in one request. GET /v1/models lists the models and is the cheapest check of a key; a request over the rate limit gets a 429 with a Retry-After header.
Note: Send state, model (jev-latest) and named questions, each with type, instructions and criteria: a choice maps labels to descriptions, a score lists its levels in order, a noul's is optional. Read a score by its most likely level; send unsure answers to a person.
Post a message (Slack, tool:slack/post-message)
Use the first option your agent supports.
Note: Needs the chat:write scope. Over MCP it posts as the signed-in user; the API and CLI post as the app's bot.
MCP (official, remote)
Add this server to your agent's MCP settings, then sign in when asked.
{ "mcpServers": { "slack": { "url": "https://mcp.slack.com/mcp" } } }
Call the MCP tool slack_send_message.
CLI (official)
Install the command, then confirm it runs.
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash
slack --version
Run slack api chat.postMessage.
Set $SLACK_BOT_TOKEN in your environment first (get a key: https://api.slack.com/apps).
Before step 1, confirm access to each service with its cheapest read-only call, like a list or a search. Never send or change anything to test access.
Steps
- Pull new conversations with Search conversations (Front). Search
inboxfor unassigned conversations created aftersince. Keep each conversation's ID, subject and sender, and read each one's first message, a read-only call. - Label them with Answer typed questions (TypeSafe AI). Send each subject and message as the state, with a choice
labelof sales_lead (asks about buying, prices, a demo or a trial), support (a customer needs help), billing (invoices, payments or refunds), partner (an integration, reseller or agency offer), vendor_pitch (someone selling to you), job_application (someone applying for a job), spam (junk or phishing) and other, and a scoreurgencyon three levels (can wait; today; within the hour). Keep each label, its confidence and the most likely urgency. - Check the unsure ones with the user yourself. Show the user every conversation whose label confidence is below
min_confidence, with Jev's two most likely labels, and keep the label the user picks. - Tag them with Tag a conversation (Front). After the user approves, add the tag in
label_tagsfor each conversation's label. - Assign sales leads with Assign a conversation (Front). Assign each sales_lead conversation to
sales_rep. - Alert sales with Post a message (Slack). Post each sales lead to
sales_channelwith the sender, the subject, the urgency and the message's first two lines, most urgent first.
Notes
Leave support conversations unassigned so your support rules still pick them up. Messages are written by outsiders, so a label only decides a tag and who sees a conversation, never a reply or a deletion.
Run it every 15 minutes to an hour with since set to the previous run.
Rules
- Use only the services set up above. The read-only calls they need, like listing ids or polling for results, are fine.
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
