Sort LinkedIn replies and answer the interested ones first
Reads new HeyReach conversations, labels each reply's intent with Jev, sends approved answers to the warm ones, and alerts sales in Slack.
Outcome
A table of every new LinkedIn reply with its intent, Jev's confidence and what was done with it.
An approved answer sent to each reply worth answering, from the sender account that owns the conversation.
A Slack post for each interested reply and referral.
How it works
- 1
Pull new replies
HeyReachRead the conversations in
campaignswhose newest message is from the prospect and arrived aftersince. Keep each conversation's ID, its sender account ID, the prospect's name, headline and profile URL, and the whole thread with who sent each message. - 2
Label the intent
TypeSafe AISend each thread as the state, marking the prospect's newest messages, and ask a choice
intentof interested (wants a call, a demo or pricing), question (asks something before deciding), not_now (asks to talk later), referral (names someone else), objection (says why it doesn't fit), not_interested (declines) and small_talk (a thanks, an emoji or a pleasantry), and a noulworth_answering(a reply would move the conversation forward). Keep each reply's intent, its confidence andworth_answering. - 3
Check the unsure ones with the user
Your agentShow the user every reply whose intent confidence is below
min_confidence, with Jev's two most likely labels, and keep the label the user picks. Leave not_interested replies unanswered, and small_talk ones unlessworth_answeringis yes. - 4
Write the answers
Your agentDraft two or three casual sentences for each interested, question, not_now, referral and objection reply, and each small_talk reply worth answering, in the voice of the sender's earlier messages: answer the question first, offer
booking_linkto interested replies, ask a referral for an introduction, and ask a not-now reply when to check back. Use onlyproduct_factsand the thread, and leave a [fill in] where a draft needs anything else. Show the drafts to the user. - 5
Send
HeyReachAfter the user approves, send each answer into its conversation from the sender account that owns it.
- 6
Alert sales
SlackPost each interested reply and referral to
alerts_channelwith the prospect's name, headline and profile URL, the intent and the first line of their message.
You'll be asked for
The HeyReach campaigns whose replies to read, by name, or all of them
e.g. Founders Q4
When the last run ended, so only newer replies are read
e.g. 2026-09-28 09:00 UTC
How sure Jev must be before its answer is used without you
e.g. 0.8; a yes-or-no answer counts as yes at or above it and as no at or below 1 minus it
The calendar link an interested reply gets
e.g. https://cal.com/you/intro
What an answer may say about your product
e.g. prices, plans, integrations and how a trial works
The Slack channel for interested replies and referrals
e.g. #linkedin-replies
The file your agent runs
linkedin-reply-triage.md
Sort LinkedIn replies and answer the interested ones first
Reads new HeyReach conversations, labels each reply's intent with Jev, sends approved answers to the warm ones, and alerts sales in Slack.
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 LinkedIn reply with its intent, Jev's confidence and what was done with it.
- An approved answer sent to each reply worth answering, from the sender account that owns the conversation.
- A Slack post for each interested reply and referral.
Inputs
Ask the user for these before you start.
campaigns: the HeyReach campaigns whose replies to read, by name, or all of them, e.g. Founders Q4since: when the last run ended, so only newer replies are read, e.g. 2026-09-28 09:00 UTCmin_confidence: how sure Jev must be before its answer is used without you, e.g. 0.8; a yes-or-no answer counts as yes at or above it and as no at or below 1 minus itbooking_link: the calendar link an interested reply gets, e.g. https://cal.com/you/introproduct_facts: what an answer may say about your product, e.g. prices, plans, integrations and how a trial worksalerts_channel: the Slack channel for interested replies and referrals, e.g. #linkedin-replies
Set up
HeyReach (tool:heyreach/get-conversations, tool:heyreach/send-message)
Use the API.
- Base URL: https://api.heyreach.io
- Get inbox conversations:
POST /api/public/inbox/GetConversationsV2 - Send a message:
POST /api/public/inbox/SendMessage - Auth: send the header
X-API-KEY: $HEYREACH_API_KEY
Note: Create the key in the HeyReach app under Settings, API keys. Every request counts toward one workspace limit of 300 requests per minute, and read endpoints use POST with a JSON body of filters.
Notes:
- Get inbox conversations: A read that uses POST, with the filters in the JSON body, paginated by offset and limit. Only conversations from HeyReach campaigns sync into the inbox.
- Send a message: Sends a real LinkedIn message: confirm the text first. It takes a conversation id and the sender account id that owns the conversation; it replies to existing conversations rather than starting new ones.
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 replies with Get inbox conversations (HeyReach). Read the conversations in
campaignswhose newest message is from the prospect and arrived aftersince. Keep each conversation's ID, its sender account ID, the prospect's name, headline and profile URL, and the whole thread with who sent each message. - Label the intent with Answer typed questions (TypeSafe AI). Send each thread as the state, marking the prospect's newest messages, and ask a choice
intentof interested (wants a call, a demo or pricing), question (asks something before deciding), not_now (asks to talk later), referral (names someone else), objection (says why it doesn't fit), not_interested (declines) and small_talk (a thanks, an emoji or a pleasantry), and a noulworth_answering(a reply would move the conversation forward). Keep each reply's intent, its confidence andworth_answering. - Check the unsure ones with the user yourself. Show the user every reply whose intent confidence is below
min_confidence, with Jev's two most likely labels, and keep the label the user picks. Leave not_interested replies unanswered, and small_talk ones unlessworth_answeringis yes. - Write the answers yourself. Draft two or three casual sentences for each interested, question, not_now, referral and objection reply, and each small_talk reply worth answering, in the voice of the sender's earlier messages: answer the question first, offer
booking_linkto interested replies, ask a referral for an introduction, and ask a not-now reply when to check back. Use onlyproduct_factsand the thread, and leave a [fill in] where a draft needs anything else. Show the drafts to the user. - Send with Send a message (HeyReach). After the user approves, send each answer into its conversation from the sender account that owns it.
- Alert sales with Post a message (Slack). Post each interested reply and referral to
alerts_channelwith the prospect's name, headline and profile URL, the intent and the first line of their message.
Notes
Judge a thread by its newest message from the prospect: a reply that said "not now" a month ago and "let's talk" today is interested.
Run it at least daily 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.
