Turn ended LiveChat conversations into HubSpot records

When a LiveChat conversation ends, we summarize it, file it on the right HubSpot contact, and flag real buying intent to your sales channel.

Agentic Task
LiveChatHubSpotSlackSalesCustomer SupportLead EnrichmentNotifications & Alerts
PromptCreate

When a LiveChat conversation ends, I want an agent to turn it into a clean CRM record in HubSpot. Trigger this from a LiveChat webhook on the chat_deactivated event so it runs the moment an agent closes a chat.

Start by pulling the whole conversation. Use LiveChat Get Chat with the chat id from the webhook payload, then use LiveChat List Threads to walk every thread on that chat so you have the complete transcript rather than only the final exchange. Read the customer's messages, the agent's replies, and the pre-chat form fields.

Before doing anything else, apply two quality gates. Skip the chat entirely if there is no customer email address on the pre-chat form or the customer profile. Skip it too if the customer sent fewer than two messages. Bounced visitors and accidental widget opens should never pollute the CRM.

For chats that pass both gates, write a short summary of no more than a few sentences. Cover three things: what the customer asked about, what the outcome was (resolved, escalated, or waiting on us), and the customer's sentiment during the conversation.

Then handle the CRM record. Use HubSpot Search Contacts to look the customer up by the email from the pre-chat form. If no contact exists, create one with HubSpot Create Contact using that email plus whatever name and company details the chat gave you. Either way, attach the summary with HubSpot Create Note associated to that contact, and include the chat date and the agent who handled it.

Now judge intent. If the conversation shows real buying intent rather than a support issue, meaning signals like pricing questions, requests for a demo or trial, questions about plans and seats, or comparisons against competitors, do two extra steps. Open a deal with HubSpot Create Deal in the inbound pipeline, named after the company or the contact and associated to that contact. Then post to the sales channel using Slack Send a Message with the summary, the customer's name and email, the specific buying signal you spotted, and a reference back to the original chat.

Conversations that are purely support shaped, such as bug reports, how-to questions, or billing problems, should stop after the note. Do not create a deal and do not post to Slack for those.

What does this prompt do?

  • Notices the moment a LiveChat conversation is closed and reads the full transcript, every message across the whole conversation rather than just the last exchange.
  • Writes a short summary covering what the customer asked about, what the outcome was, and how the customer seemed to feel.
  • Finds the customer in HubSpot using the email from your pre-chat form, adds them if they are new, and attaches the summary to their record.
  • Spots genuine buying signals such as pricing questions, demo requests, or competitor comparisons, opens a deal in your inbound pipeline, and posts the details to your sales channel in Slack.

What do I need to use this?

  • A LiveChat account with agents handling conversations
  • Your LiveChat pre-chat form set up to collect the visitor's email address
  • A HubSpot account where you keep contacts and deals
  • A Slack workspace and the channel where your sales team wants lead alerts

How can I customize it?

  • Change what counts as buying intent, for example treating any mention of a competitor or any request for a quote as sales-worthy.
  • Point new deals at a different pipeline or opening stage, and send alerts to a different Slack channel per team or region.
  • Adjust the quality filter, for example requiring three customer messages instead of two before a conversation reaches your CRM.

FAQs

Will this create a contact for every visitor who opens the chat widget?
No. Conversations with no customer email address are skipped, and so are conversations where the customer sent fewer than two messages. Bounced visitors and accidental widget opens never reach your CRM.
What happens if the customer is already in HubSpot?
We match on their email address and attach the summary to the record that already exists, so you do not end up with duplicate contacts for repeat chatters.
Does every conversation create a deal?
No. Only conversations showing real buying intent, such as pricing questions, demo or trial requests, or comparisons against competitors, create a deal and a Slack alert. Support conversations get a summary on the contact and nothing more.
Will this work on HubSpot's free CRM?
Yes. Contacts, notes, and deals are all available on the free plan. Free plans include a single deal pipeline, so point the workflow at that default pipeline unless you are on a plan that lets you add a dedicated inbound one.
How soon after a chat ends does it run?
It starts as soon as LiveChat reports that the conversation was closed, usually within seconds, so your sales team hears about a hot lead while the visitor is likely still on your site.

Related templates

Auto-fix your calendar when a flight slips, and flag what's at risk

When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.

Google Calendar
AviationStack
Slack
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Log Agorapulse social conversations to HubSpot contacts

Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.

Agorapulse
HubSpot
Slack Bot
Agentic Task
Turn procurement portal tenders into CRM deals each morning

Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.

Anchor Browser
Google Sheets
HubSpot
+1
Agentic Task
Clean up HubSpot contacts from your Amazon SES suppression list

Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.

Amazon SES
HubSpot
Slack Bot
Agentic Task
Provision customer entitlements in DynamoDB when a deal is won

When a HubSpot deal hits Closed Won, the customer's plan, seats and renewal dates land in your DynamoDB accounts table, with a Slack note showing what changed.

HubSpot
Amazon DynamoDB
Slack Bot
Agentic Task

Stop losing sales leads in your chat inbox.

Every finished conversation lands in HubSpot as a clean, readable record, and the ones actually worth calling reach your sales team right away.