How-toLead generationIntegrations

How to Send Chatbot Leads to HubSpot or Salesforce Automatically

Send website chat leads to HubSpot or Salesforce without copy and paste: the fields to map, upsert by email, duplicate rules and questions that qualify a lead.

PepoChat TeamPublished Last verified 17 min read
A man in a blue blazer presents printed sales-by-region pie charts to three colleagues at a meeting table

Short answer

Collect a name and email in the chat, key the CRM record on that email so a returning visitor updates it instead of duplicating it, and alert the owner. As of October 2026, HubSpot upserts contacts by email through its API or Zapier; a Salesforce lead needs a last name and a company, and a search first avoids duplicates. PepoChat's CRM actions find contacts and file tickets or cases, so leads go by webhook, Zapier or a custom action.

If your sales team works in HubSpot or Salesforce and you are adding an AI chatbot to your website, this guide shows how a lead captured in the chat becomes a CRM record without copy and paste, from the field map and setup steps to duplicates, qualification, alerts and consent.

Every API detail was read in HubSpot's developer documentation and knowledge base and in Salesforce's developer documentation on 19 October 2026, and Zapier's plans on its pricing page the same day. The examples use PepoChat, which is our product. PepoChat's prebuilt HubSpot and Salesforce actions find contacts and file tickets or cases; they do not create contacts or leads, and the routes that do are spelled out below.

Where do website chat leads leak before they reach the CRM?

Chat leads leak in three places: the chat never asks for a way to follow up, the details stay inside the chat tool, or they reach the CRM as duplicates nobody trusts.

The first leak is the quietest. A visitor on your pricing page asks a buying question late at night, gets a good answer and leaves, and nobody can follow up because the bot never asked for an email. Pricing-page and after-hours visitors are the usual casualties.

The second leak is copy and paste: captured contacts wait in the chat tool or in someone's inbox until a person retypes them into the CRM. The third is quality: form walls produce fake addresses and careless syncs produce duplicates, until sales stops trusting what the website sends. The lead generation guide covers the first leak; the rest of this guide covers the other two.

How does a chatbot send leads to HubSpot or Salesforce?

A chatbot sends a lead to a CRM by passing the details it collected to the CRM's API, directly or through an automation tool such as Zapier, keyed on the visitor's email. The CRM then creates a record or updates the one it already has.

An upsert is a single create-or-update call keyed on a unique value such as an email address: an existing record with that value is updated, and otherwise a new one is created. Upserts are what stop a returning visitor from becoming a second contact.

With PepoChat, three routes reach a CRM.

RouteFires whenWhat reaches the CRMWhat you need
New-lead webhook to Zapier, Make or n8nThe first time a visitor shares an email, by form, chat, verification or bookingName, email, phone, company, source and a link to the conversationA public HTTPS URL: a Zapier Catch Hook on a paid plan, or a Make or n8n webhook
Send to Zapier actionThe agent judges that the chat matches your "when to use" textName, email, a short event label and a summary the AI writesThe Zapier integration and a paid Zapier plan
Custom action to the CRM's APIThe agent judges that the chat matches your "when to use" textWhatever you map, such as a summary in a custom propertyA HubSpot Service Key with contacts write; for Salesforce, an action created by the Salesforce integration

Route details from PepoChat's lead notification and integration docs; Zapier plan rules read on Zapier's pricing page on 19 October 2026.

The webhook sends every new contact once, with the conversation link but no summary. The action routes run only when the agent decides a chat qualifies, and they carry an AI-written summary but no conversation link, because the agent does not know it. The two can run side by side.

Do PepoChat's HubSpot and Salesforce actions create contacts or leads?

No. PepoChat's prebuilt HubSpot actions find a contact and create a ticket, and its Salesforce actions find a contact, create a case and check a case's status; none of them creates a contact or a lead.

IntegrationPrebuilt actionWhat it doesCreates a contact or lead?
HubSpotFind HubSpot contactSearches contacts by email; the AI reads the ID, email, first and last nameNo
HubSpotCreate HubSpot ticketFiles a ticket in pipeline 0, stage 1, with a subject and the AI's detailsNo; the ticket is not associated with a contact
SalesforceFind Salesforce contactSearches Contact records by email; the AI reads the ID, name and emailNo, and Lead records are not searched
SalesforceCreate Salesforce caseCreates a case with origin Web; the visitor's email goes into the descriptionNo
SalesforceCheck Salesforce case statusReads a case's number, status and subjectNo

From PepoChat's integration templates and its HubSpot and Salesforce docs, 19 October 2026.

The credentials explain why. PepoChat's one-click HubSpot connection asks only to read contacts and manage tickets, and the Service Key that the manual setup asks for has exactly three scopes: contacts read, tickets read and tickets write. A HubSpot action edited to write a contact would fail with either credential. The Salesforce connection asks for API access, so what it can create depends on the permissions of the Salesforce user it runs as.

The find actions still earn a place in a lead flow. Before the agent treats a visitor as a new lead, a contact lookup shows whether the person is already a customer, whose question belongs in a ticket or case, as the helpdesk ticket guide describes. The lookups are not gated by email verification; the verification guide explains when to ask for a code first.

Which chat fields map to which HubSpot and Salesforce fields?

Map the email first, because both CRMs use it to recognise a person, then the name, company, phone, source and either a summary or a conversation link.

Chat fieldHubSpot contact propertySalesforce Lead fieldNotes
EmailEmail (email)EmailThe match key. PepoChat always collects it, exactly as the visitor typed it unless they verified it
First nameFirst name (firstname)FirstName, up to 40 charactersPepoChat captures one Name field, so split it in the automation step
Last nameLast name (lastname)LastName, required, up to 80 charactersSalesforce rejects a lead without one; put the whole name here if you cannot split it
CompanyCompany nameCompany, requiredUse a placeholder such as "Not given" when the visitor skipped it
PhonePhone number (phone)PhoneAsk only if someone will call
SourceA custom property such as Chat lead sourceLeadSource, a picklist: add a Website chat valueThe webhook's source is form, chat, verification or booking
SummaryA custom multi-line text propertyDescriptionOnly the action routes carry one, written by the AI
Conversation linkA custom URL propertyDescription or a custom URL fieldOnly the webhook carries it, as conversation.url
Stage or statusLifecycle stage (lifecyclestage) or Lead statusStatus, set by default on createLet CRM defaults and workflows set it, not the chat
Legal basisLegal basis for processing contact's dataYour org's consent fieldsA fixed value that matches your privacy notice
Page the chat started onNot availableNot availablePepoChat's webhook and actions do not send it

Field names read in HubSpot's Contacts API guide and default contact property list and in Salesforce's Lead object reference on 19 October 2026.

HubSpot needs only one of email, first name or last name to create a contact, but its Contacts API guide recommends always sending the email because it is the primary unique identifier. Salesforce is stricter: the Lead object reference marks both LastName and Company as required, so a chat lead without a company needs a placeholder before Salesforce will save it.

Enumeration fields such as HubSpot's lifecycle stage take internal values, not labels, and Salesforce's Lead Source picklist should get its own Website chat value so reports can separate chat leads from form leads. Keep the summary short and factual, because it is the line a salesperson reads before calling.

An open laptop on a glass table displays an admin dashboard with user totals, area charts and a donut chart
A dedicated Website chat source value lets CRM reports count chat leads separately from form and import leads.

How do you send chatbot leads to HubSpot?

Create or update the HubSpot contact by email rather than calling a plain create. Zapier's HubSpot action Create or Update Contact does exactly that, and HubSpot's batch upsert endpoint does it without Zapier.

Steps with the new-lead webhook and Zapier

  1. In PepoChat, open Widget Customization → Lead Capture, switch on Collect contact details, choose When the agent needs a follow-up, tick Name and Company, and click Save Settings.
  2. In Zapier, create a Zap whose trigger is Webhooks by Zapier → Catch Hook and copy the webhook URL.
  3. Back in PepoChat, under When a new lead arrives, paste the URL into Send to a webhook URL, switch it on, click Send a test, then Save Settings.
  4. In Zapier, click Test trigger and add a filter that continues only when test is false, so the sample lead never reaches HubSpot.
  5. Add the HubSpot action Create or Update Contact and map contact.email, the split name, contact.company, contact.phone, contact.source and conversation.url.
  6. Publish the Zap and chat on your live site with your own address, because chats in the Test the agent drawer never create contacts.

As of 19 October 2026, Zapier's pricing page puts webhooks, filters and multi-step Zaps on paid plans, with Professional from $19.99 a month on annual billing, while the free plan has 100 tasks a month and two-step Zaps. Make and n8n accept the same webhook if you prefer them.

Steps with a direct custom action

A custom action skips Zapier and can send a summary the AI writes. In HubSpot, create a Service Key under Settings → Integrations → Service Keys with the crm.objects.contacts.write scope; HubSpot's developer changelog says existing accounts can no longer create legacy private apps from 26 October 2026.

In PepoChat, open Custom Actions → New action, set the method to POST and the URL to https://api.hubapi.com/crm/objects/2026-09/contacts/batch/upsert, add an Authorization header with Bearer followed by the key, define the inputs email, first_name, last_name and summary, and use this body:

{ "inputs": [ { "idProperty": "email", "id": "{{email}}", "properties": { "firstname": "{{first_name}}", "lastname": "{{last_name}}", "chat_summary": "{{summary}}" } } ] }

Create chat_summary as a multi-line text property in HubSpot first. Set the response fields to status, write a "when to use" text such as "Use after answering, when the visitor asks for a quote, a demo or team pricing", and test with your own address. New actions start switched off, Test sends a real request, and every input is required, so the agent asks for a last name before calling. The custom actions docs list the limits.

HubSpot's current API version is 2026-09, and the numbered v1 to v4 paths, which PepoChat's prebuilt HubSpot actions still call, stay supported until September 2027. HubSpot's separate Leads object requires every lead to be associated with an existing contact, so the contact upsert always comes first.

How do you send chatbot leads to Salesforce?

Create a Lead for a visitor who is not yet in Salesforce, after searching for that email among existing records. Salesforce's object reference describes a Lead as a prospect and a Contact as a person associated with an account, so a new prospect from the chat becomes a lead and a known contact's question becomes a task or a case.

Steps with Zapier

  1. Set up Lead Capture and the new-lead webhook as in steps 1 to 4 of the HubSpot list.
  2. Add the Salesforce action Find or Create Record on the Lead object, searching by Email, with creation switched on for when nothing matches.
  3. Map LastName, Company with a placeholder when it is empty, Email, Phone, LeadSource set to your Website chat value, and the conversation link into Description.
  4. Optionally, add an earlier step that looks the email up among Contacts and, on a match, creates a Task for the account owner instead.
  5. Publish the Zap and test on your live site with your own address.

Salesforce is a premium app on Zapier, so this Zap needs a paid plan. Leads created through Salesforce's REST API go through your org's active lead assignment rules unless the request switches them off, and Zapier's Salesforce actions include a Use Assignment Rules option.

A direct custom action

A Salesforce access token pasted into a new custom action stops working when its session expires, while the actions the Salesforce integration creates get fresh tokens on their own. One of those can be edited to post to /sobjects/Lead instead of /sobjects/Case, but you lose the case action, the Salesforce user behind the connection needs permission to create leads, and the action needs a new name, because reconnecting Salesforce resets actions that keep their original names. For most teams, Zapier is simpler.

How do you stop duplicate contacts and leads?

Key every write on the email, search or upsert instead of creating blindly, and make repeated deliveries harmless.

At-least-once execution means a step is guaranteed to run, but a retry after a network failure can occasionally run it twice. PepoChat's actions work this way.

Where the repeat comes fromWhat happensFix
A returning visitor with the same emailPepoChat updates its contact and sends no second webhook; an action can fire againUpsert in HubSpot; find or create in Salesforce
A webhook retry after a timeoutPepoChat retries after 1 and 10 minutes with the same deliveryIdSkip a delivery ID you have already processed
An action retried after a failureThe write can, rarely, run twiceUpsert or find first, as above
The visitor types a different emailA second, separate recordMerge in the CRM; ask returning visitors to verify their email
A new create for an existing Salesforce leadA matching duplicate rule rejects the save with DUPLICATES_DETECTEDSearch before creating

PepoChat behaviour from its lead notification and custom action docs; HubSpot and Salesforce behaviour read in their documentation on 19 October 2026.

HubSpot does most of the work. Its deduplication article, updated 8 September 2026, says HubSpot automatically deduplicates contacts by email and companies by domain, but companies created through the API are not deduplicated by domain, so a Zap that also creates companies should search for the domain first.

Salesforce does not treat email as unique, so two leads can share an address unless a duplicate rule stops them. Through the API, a rule with an alert behaves differently from the screen: Salesforce's duplicate rule header reference says a request saves an alerted duplicate only when it sets allowSave to true, which defaults to false, and a blocking rule refuses the save either way. Searching first, as Zapier's Find or Create Record does, avoids the error.

Upserting has one cost: the latest values win. A summary kept in a single property is overwritten by the next qualifying chat, so if sales needs the history, add each summary as a note with Zapier's HubSpot action Create Engagement, or as a Task in Salesforce.

What makes a chat a lead worth sending to the CRM?

A chat is worth a CRM record when the visitor asked something only a sale can answer, left an email where they can be reached, and is not an existing customer with a support problem. Everything else belongs in the chat history, the helpdesk or nowhere.

Lead qualification is the filter that decides which conversations become sales records, based on intent, fit and timing rather than on the fact that someone typed an email address.

PepoChat has no lead-scoring engine, so you write the rules yourself in three places. The Lead Capture timing decides when the agent asks for details, the action's "when to use" text decides which chats trigger the CRM route, and a filter in the automation drops what slips through, such as a test lead or a personal address on a B2B product. The strongest signal needs no question at all: a visitor who booked a meeting in the chat has qualified themselves.

QuestionAsk it?WhyWhere the answer goes
What are you trying to solve?Yes, after answering their questionSeparates buyers from support requests and job seekersSummary or Description
Work emailYes, onceThe CRM key and the follow-up channelEmail
CompanyYes for B2B productsRequired on a Salesforce lead; routes to an account ownerCompany
Team size or volumeOnly when price depends on itSizes the opportunitySummary or a custom field
TimelineYes, when they mention buyingSets how fast sales should callSummary
BudgetNoVisitors leave; sales can ask on the callNot collected
Phone numberOnly if someone will callEvery extra field costs answersPhone
Card numbers, health or ID detailsNeverSensitive data does not belong in a sales recordNot collected

Put the same rules in front of the agent. PepoChat's agent asks for contact details once, in one sentence, and keeps helping if the visitor declines; the agent instructions can add a line such as "Never ask about budget." The SaaS setup guide and the coaches and consultants guide show qualifying questions for those businesses.

Two men in business clothes discuss sales charts on a laptop and a clipboard at a cafe table with coffee cups
A qualified chat lead should reach the salesperson with the reason it qualified, so the first call starts from the visitor's own question.

How should the team hear about a new chat lead?

Alert the person who will follow up, in the tool they already watch, when the CRM record is created. PepoChat's When a new lead arrives card can email every member, post a card to Slack and call the webhook, all from one event.

The channels fire once per contact, the first time an email is captured in your workspace. The team email is the one paid-only channel, on Starter and Growth, while the Slack card and the webhook work on every plan; the lead notification docs show what each sends. A pre-chat form lead waits about 20 seconds so the alert can link to the conversation, and a workspace sends at most 120 notifications an hour, after which contacts are saved but not announced.

In the CRM, let ownership rules do the routing: Salesforce applies active lead assignment rules to leads created through its REST API by default, and in HubSpot the Zap can set the contact owner. A visitor who wants a person right now needs a handoff, not a lead, and the agent escalates the conversation to the team inbox, as the human handoff docs describe.

You need a lawful basis for storing the details and a notice that says what you do with them; under the GDPR the basis is usually consent or legitimate interests. What follows is practical guidance, not legal advice.

The notice starts in the chat. PepoChat's Lead Capture card has an optional consent text of up to 300 characters, shown under the pre-chat form, for a line such as "We use your email to follow up on this chat and keep it in our CRM." When the agent asks in conversation instead, it asks only for the fields you enabled and stops if the visitor declines, so your privacy policy should say the chat may ask for contact details and where they go.

Data minimisation means sending only what sales will use: the summary rather than the transcript, with the summary input's description telling the agent to leave out card numbers, health details and identity documents. In HubSpot, set the default property Legal basis for processing contact's data from the Zap, and add chat leads to marketing email only when they ask.

Plan for deletion in two places. PepoChat's Contacts page has no delete button yet, so removing a contact there takes a message to support, and the CRM copy has to be deleted separately. The GDPR guide for chatbots and PepoChat's privacy notes cover the rest of what a support chat stores.

Is HubSpot's own chatbot enough?

For capturing leads into HubSpot, often yes: HubSpot's free rule-based chatbot writes answers straight into contact properties, with no sync to build. For AI answers from your own content, HubSpot's customer agent needs Service Hub Professional or Enterprise.

HubSpot's guide to bot actions, updated 13 October 2026, lists what the rule-based chatbot can do: ask a question and save the answer to a contact property, set property values, submit a ticket and book a meeting. Knowledge base lookup needs Service Hub Professional or Enterprise, triggering a webhook needs Data Hub Professional or Enterprise, and handing a chat to the customer agent needs a seat and HubSpot Credits.

Our HubSpot vs Intercom comparison priced the customer agent on 16 October 2026 at $100 per Service Hub Professional seat a month, a $1,500 onboarding fee and 50 credits, or $0.50, per resolved conversation. If you already pay for Professional, the native agent reads the CRM record it sits on and never needs a sync, an advantage no outside chatbot has. On HubSpot's free or Starter CRM, a separate AI support agent can answer from your content while the webhook or upsert routes above keep HubSpot as the system of record.

What to do next

  • Switch on Lead Capture with "When the agent needs a follow-up", connect the new-lead webhook to a Zap and send one real lead into your CRM; the contacts docs explain every capture setting.
  • Read the lead generation guide for capture timing, consent wording and the full webhook payload.
  • Start a free PepoChat workspace: the webhook, the Slack card and every integration action are on the free plan with 200 AI replies a month, and new-lead emails come with Starter or Growth on the pricing page.

Frequently asked questions

Can a chatbot add leads to HubSpot automatically?
Yes. The chatbot collects a name and email in the conversation, then creates or updates the HubSpot contact keyed on that email, through Zapier's Create or Update Contact action or HubSpot's batch upsert endpoint. As of October 2026, PepoChat's new-lead webhook can feed such a Zap, while its built-in HubSpot actions only find contacts and create tickets.
Should a chatbot create a Salesforce lead or a contact?
Create a lead for a visitor who is not yet in Salesforce, because Salesforce describes a lead as a prospect and a contact as a person associated with an account. Search by email first: if the visitor is already a contact, create a task for the account owner, or a case for a support issue, instead. A Salesforce lead needs a last name and a company.
How does a chatbot avoid creating duplicate CRM records?
Key every write on the visitor's email and update rather than blindly create. HubSpot deduplicates contacts by email and offers an upsert keyed on email; in Salesforce, search before creating, because email is not unique and a matching duplicate rule rejects API saves. Treat repeats as normal: PepoChat's webhook retries reuse one delivery ID, and its actions run at least once.
What questions should a chatbot ask to qualify a lead?
Ask what the visitor is trying to solve after answering their question, then a work email, the company for B2B products, and team size or timeline only when price or urgency depends on it. Skip budget, ask for a phone number only if someone will call, and never collect card numbers or health details. A meeting booked in the chat is the strongest signal.
Do I need consent to store chat leads in a CRM?
You need a lawful basis and a clear notice. Under the GDPR the basis is usually consent or legitimate interests, and your privacy notice should say the chat may ask for contact details and where they go. Show a short consent line with the chat form, send only the fields sales will use, and delete the CRM copy when someone asks. This is not legal advice.
Is HubSpot's own chatbot enough for capturing leads?
Often, yes. HubSpot's free rule-based chatbot saves answers straight into contact properties. AI answers from your own content need HubSpot's customer agent, which as of October 2026 requires Service Hub Professional, at $100 per seat a month, or Enterprise, plus $0.50 per resolution. A separate AI agent on a cheaper tier needs a webhook or upsert route into HubSpot.

Try this on your own site in ten minutes

PepoChat includes every feature on the free plan — 200 AI replies and 5 knowledge sources a month, no credit card.