---
ref: workflow:high-intent-visitors
title: Flag high-intent website visitors to sales
author: thedogwiththedataonit
tools: [tool:posthog/run-sql-query, tool:clay/run-routine, tool:slack/post-message]
tags: [capability:enrich-contacts, capability:route-alerts, capability:track-product-usage, channel:chat, channel:website, has:api, has:cli, motion:midbound]
updated: 2026-09-27
---

# Flag high-intent website visitors to sales

Set up the tools below, then run the steps in order for the user.

## Inputs

Ask the user for these before you start.

- `pricing_path`: the page that signals intent, e.g. /pricing
- `alerts_channel`: where to post, e.g. #sales-signals

## Set up

### Run a SQL query (PostHog, tool:posthog/run-sql-query)

Use the first option your agent supports.

#### MCP (official, remote)

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

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

Call the MCP tool `execute-sql`.

#### CLI (official)

Install the command, then confirm it runs.

```sh
npm install -g @posthog/cli@latest
posthog-cli --version
```

Run `posthog-cli api call execute-sql`.

Set `$POSTHOG_CLI_API_KEY` in your environment first (get a key: https://app.posthog.com/settings/user-api-keys?preset=mcp_server).

### Run a routine (Clay, tool:clay/run-routine)

Use the first option your agent supports.

#### CLI (official)

Install the command, then confirm it runs.

```sh
npm install --global @clay-run/cli
clay --version
```

Run `clay routines runs start`.

#### API (official)

- Base URL: https://api.clay.com/public/v0
- Endpoint: `POST /routines/{routine_id}/run`
- Auth: send the header `clay-api-key: $CLAY_PUBLIC_API_KEY`
- Get a key: https://app.clay.com/workspaces/~/settings/account?accountTab=api-keys-beta

### Post a message (Slack, tool:slack/post-message)

Use the first option your agent supports.

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

Make one read-only call to each tool to confirm access.

## Steps

1. **Find repeat visitors** with Run a SQL query (PostHog). List identified accounts that viewed `pricing_path` at least twice in the last 7 days.
2. **Enrich** with Run a routine (Clay). For each account domain, add company size, industry and any open hiring for sales or marketing.
3. **Alert** with Post a message (Slack). Post one message per account to `alerts_channel` with the enrichment and a suggested owner. Ask the user before posting the first one.

## Done when

- Every qualifying account was posted once, with no duplicates.
- The user has the list of accounts and suggested owners.

## Rules

- Only use the tools listed above.
- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
