---
ref: workflow:chat-buyers-to-sales
title: Hand buyers who ask in your website chat to sales
author: thedogwiththedataonit
tools: [tool:intercom/search-conversations, tool:typesafe/answer-typed-questions, tool:apollo/enrich-person, tool:hubspot/upsert-contacts, tool:hubspot/create-note, tool:slack/post-message]
tags: [capability:classify-signals, capability:enrich-contacts, capability:manage-crm, capability:route-alerts, capability:search-conversations, channel:chat, has:api, motion:inbound]
updated: 2026-09-29
---

# Hand buyers who ask in your website chat to sales

Reads recent Intercom conversations, spots buying questions with Jev, and logs each buyer in HubSpot with a note and a Slack alert.

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 whether it asked a buying question, who asked, how ready they are and Jev's confidence.
- Each buyer with an email created or updated in HubSpot, with a note quoting what they asked, and the buyers with no email listed.
- A Slack post for each buyer, the most ready first.

## Inputs

Ask the user for these before you start.

- `since`: when the last run ended, so only newer conversations are read, e.g. 2026-09-29 08:00 UTC
- `min_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 it
- `max_enrichments`: the most people to enrich in one run, since each match costs an Apollo credit, e.g. 30
- `sales_channel`: the Slack channel for buyers, e.g. #inbound-leads

## Set up

### Search conversations (Intercom, tool:intercom/search-conversations)

Use the first option your agent supports.

Note: Returns 20 conversations per page by default and at most 150, paged with `starting_after`. A `source.body` filter matches single words, not phrases.

#### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "intercom": { "url": "https://mcp.intercom.com/mcp" } } }
```

Call the MCP tool `search_conversations`.

#### API (official)

- Base URL: https://api.intercom.io
- Endpoint: `POST /conversations/search`
- Auth: send the header `Authorization: Bearer $INTERCOM_API_KEY`
- Get a key: https://app.intercom.io/a/apps/_/developer-hub/app-packages

### 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.

### Enrich a person (Apollo, tool:apollo/enrich-person)

Use the first option your agent supports.

Note: A match costs 1 credit, plus 8 for a mobile phone; no match costs nothing. Personal emails and phone numbers are off unless you set `reveal_personal_emails` or `reveal_phone_number`, and phone numbers arrive later at a `webhook_url`.

#### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "apollo": { "url": "https://mcp.apollo.io/mcp" } } }
```

Call the MCP tool `apollo_people_match`.

#### CLI (official)

Install the command and sign in with it, then confirm it runs.

```sh
brew install apolloio/apollo-io-cli/apollo-io-cli
apollo --version
```

Run `apollo people enrich`.

### HubSpot (tool:hubspot/upsert-contacts, tool:hubspot/create-note)

For each call, use the first option your agent supports that lists it.

Notes:

- Create or update contacts: Matches each contact on `idProperty`, `email` or a custom unique property. On MCP, `manage_crm_objects` waits for the user to confirm the proposed changes before it writes.
- Create a note: `hs_timestamp` is required; attach the note to existing records with an `associations` object.

#### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "hubspot": { "url": "https://mcp.hubspot.com" } } }
```

- Create or update contacts: call the MCP tool `manage_crm_objects`

#### API (official)

- Base URL: https://api.hubapi.com
- Create or update contacts: `POST /crm/objects/2026-09/contacts/batch/upsert`
- Create a note: `POST /crm/objects/2026-09/notes`
- Auth: send the header `Authorization: Bearer $HUBSPOT_API_KEY`

Note: Use a service key or an app's static access token with the CRM scopes the calls need; paths carry a dated version such as `2026-09`.

### 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.

```json
{ "mcpServers": { "slack": { "url": "https://mcp.slack.com/mcp" } } }
```

Call the MCP tool `slack_send_message`.

#### CLI (official)

Install the command, then confirm it runs.

```sh
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

1. **Pull new conversations** with Search conversations (Intercom). Search conversations created after `since`. Keep each conversation's ID, its opening message and its author's name, email and type (user or lead), and read the rest of a conversation when its opening message is only a greeting, a read-only call.
2. **Spot the buyers** with Answer typed questions (TypeSafe AI). Send each conversation's messages as the state, with a noul `buying_question` (asks about prices, plans, a demo, a trial, a security review or buying for a team), a choice `asker` of new_prospect (not yet a customer), customer_expansion (a customer who wants more seats, SSO, higher limits or a bigger plan), customer_support (a customer who needs help), job_seeker and other, and a score `readiness` on three levels (curious; comparing options; ready to buy). Keep every answer with its confidence or probability.
3. **Keep the buyers** yourself. Keep the conversations whose `buying_question` is yes and whose asker is a new_prospect or customer_expansion. Show the user the ones whose `buying_question` is unsure or whose asker confidence is below `min_confidence`, and keep the ones the user confirms. List the buyers with no email apart: they are not enriched or logged.
4. **Look them up** with Enrich a person (Apollo). Enrich up to `max_enrichments` buyers by work email. Keep each one's title and employer.
5. **Log the buyers** with Create or update contacts (HubSpot). After the user approves, upsert each buyer by email with their name, title and company. Keep each contact's ID.
6. **Note what they asked** with Create a note (HubSpot). Add a note to each contact ID quoting their question, with the asker type, the readiness level and the Intercom conversation ID.
7. **Alert sales** with Post a message (Slack). Post each buyer to `sales_channel` with their name, title, company, readiness and question, the most ready first, and the buyers with no email in one message.

## Notes

Support keeps answering as usual; this sends the buyers among those conversations to sales the same day. Chat text is written by visitors, so the labels only decide who sees a conversation: nothing here writes to the visitor or changes a customer's plan.

Run it every 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.
