Repository navigation
Tutorial Hot Leads Slack
When a chat ends and the AI rated the lead hot, a message lands in your sales channel with the contact, the summary and what to do next. Warm and cold chats stay quiet.
#sales
🔥 Hot lead: Ada Lovelace (ada@example.com · 0400 111 222)
Ada wants a kitchen renovation in Brunswick, budget $40–50k, starting after Christmas.
Next: call this week to book the free measure.
What it teaches: an after-chat tool with a condition (Only when), and the AI's labels on every finished conversation.
Template: hot-leads-slack (import it). It
adds one tool; your prompt and other tools stay as they are.
You need: a Slack app with a bot token.
Five quiet minutes after the last message, HelpPuff summarises the
conversation and labels it: intent, sentiment, outcome, topics, and
leadQuality: hot (ready to buy or book), warm (interested), cold
(just browsing) or none. Then the after-chat tools run, with all of it.
A tool's Only when decides whether it runs at all. This one runs only
when labels.leadQuality is hot.
- At api.slack.com/apps, Create New App → From scratch, in your workspace.
-
OAuth & Permissions → Bot Token Scopes: add
chat:write. -
Install to Workspace, then copy the Bot User OAuth Token
(
xoxb-…). - In Slack, invite the bot to the channel:
/invite @YourAppin#sales.
helppuff secret set SLACK_BOT_TOKEN # or put it in .env
helppuff tools add slack_hot_lead --after --method POST \
--url https://slack.com/api/chat.postMessage \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'Authorization: Bearer ${SLACK_BOT_TOKEN}' \
--body '{"channel": "#sales", "text": ":fire: *Hot lead: {{lead.name}}* ({{lead.email}} · {{lead.phone}})\n{{summary}}\n*Next:* {{conversation.followUp}}"}' \
--when labels.leadQuality=hot \
--description 'Post a hot lead to the sales channel.'On the dashboard: Prompt & tools → After the chat → + Add → New tool, then Only when → Hot leads only.
-
--when labels.leadQuality=hot,warmsends warm leads too;--when lead.emailsends every chat that left an email. -
chat.postMessagetakes Slack's own formatting intext(*bold*,<https://…|a link>). - The bot token is stored encrypted, like any secret header.
Have a chat that would be hot ("I'd like to book a measure next week, here's
my number"), then wait five minutes. The conversation in the dashboard shows
the labels, and Data from tools shows Slack's answer under
slack_hot_lead.
Slack answers HTTP 200 even when it refuses, with "ok": false and a reason
in the answer: not_in_channel means the bot was not invited,
invalid_auth a wrong token.
An incoming webhook works too: set
the tool's address to the webhook URL and drop the channel and the
Authorization header. The URL is itself the secret, so keep it out of an
exported agent file you share.
Back to the tutorials.
Start
Tutorials
- All tutorials
- Order tracking
- Send chats to your CRM
- Nearest store
- Verified account changes
- Logged-in customer support
- Product and stock
- Hot leads to Slack
- Knowledge base or tool?
- Testing and monitoring
- Why the AI never books
Configure
- Configuration
- Configuration reference
- CLI reference
- Knowledge base
- Prompt and instructions
- Tools: your APIs in the chat
- Agent files: import and export
- Signed-in visitors
- The widget
- The playground
- Leads and callbacks
- Jobs
- Photos and files
- Bookings and the calendar
- Integrations
- Live chat
- Telegram
- Webhooks
- Email notifications
API
API reference
- Overview
- Account
- Chat
- Conversations
- Live chat
- Labels and notes
- Leads
- Callbacks
- Jobs
- Appointments
- Integrations
- Knowledge
- Prompt
- Tools
- Settings
- Webhooks
- Analytics
- Team
- API keys
- Audit
Providers
- Overview
- Models and providers
- Custom model
- Custom knowledge base
- Workers AI (default)
- AI models: speed, quality, cost
- Cloudflare AI Search
- OpenAI
- Gemini
- Anthropic Claude
- Retell
- Your own API
Operate
- Deployment
- Turn on Turnstile
- Upgrading
- Costs and limits
- Cloudflare Free plan limits
- Security
- Troubleshooting
Build