All workflows

Flag high-intent website visitors to sales

Identify promising accounts on your site, enrich them, and tell the right owner with useful context.

View on GitHub

high-intent-visitors.md

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.

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

Call the MCP tool execute-sql.

CLI (official)

Install the command, then confirm it runs.

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.

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

Run clay routines runs start.

API (official)

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.

{ "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).

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.