Build an Inbound-Form-to-CRM Bot in 30 Minutes
A lead fills out a form on your site, and HubSpot gets the contact, tags from an AI model and a short summary note with a suggested first reply for a person to edit and send.
Send each form submission to an n8n Webhook node, have an Information Extractor node and an AI chat model tag the lead and write a short summary, create or update the HubSpot contact with the HubSpot node, and log the summary as a note on that contact through HubSpot's Notes API, for a person to review.
When a lead fills out a form on your website, someone usually copies the details into the CRM, reads the message, decides how much it matters and works out what to say first. This build does the copying and the first read. Each submission becomes a HubSpot contact, an AI model adds a few tags and a short summary, and a suggested first reply goes into a note on the contact for a person to edit and send.
It's for forms built outside HubSpot, such as a form on your own site, Typeform or a page builder's form. HubSpot's own forms already create contacts: by default, a HubSpot form submission with a populated email address creates a contact. If you use those, only the AI note steps below apply.
What the 30 minutes assumes
- You use n8n Cloud, where the HubSpot node connects with the Connect my account button and no connection details. On self-hosted n8n, n8n's docs now recommend a HubSpot service key. HubSpot has moved private apps created in its UI to legacy status, and service keys are in public beta. Creating one needs super admin access or the Developer tools access permission, plus the scopes n8n lists, including
crm.objects.contacts.readandcrm.objects.contacts.write. - Your form can send each submission to a webhook URL.
- An AI model is ready in n8n, such as the Anthropic Chat Model node.
For how n8n compares with Zapier and Make, see the Zapier vs Make vs n8n guide.
Step 1: Receive the form
Add a Webhook node with the POST method and set Respond to Immediately, so the form tool gets its answer right away. Use the Test URL while you build. n8n registers the Production URL when you publish the workflow, so switch the form to it before you go live. Send one real test submission and look at the payload to see what your form calls each field.
Step 2: Tag the lead with AI
Add an Information Extractor node and attach a chat model node as its model. In Text, map the lead's name, company, job title and message. Set Schema Type to Generate From JSON Example:
{
"service_interest": "bookkeeping",
"size_segment": "small",
"priority": "warm",
"summary": "Runs a two-location dental practice and wants monthly bookkeeping starting next quarter.",
"suggested_reply": "Thanks for reaching out about monthly bookkeeping for both locations. Would a 20-minute call next week work to go over how you track expenses today?"
}Then set the rules in System Prompt Template:
You tag inbound leads for {YOUR_FIRM}.
service_interest: one of {YOUR_SERVICE_LIST}, or "unclear".
size_segment: "solo", "small", "midsize" or "unknown", from what the lead wrote.
priority: "hot", "warm" or "cold", using these rules: {YOUR_RULES}.
summary: at most 40 words, only facts the lead wrote. Never add details.
suggested_reply: two or three sentences a person can edit and send.
Refer to something specific in the lead's message. No claims about
results, prices or availability.n8n builds the schema from the example's property names and types, treats every field as required, and adds its own format instructions to the prompt. The suggested reply is only a draft. The model can misread a message, and a person should read the note before anything goes to the lead.
Step 3: Create or update the contact
Add a HubSpot node with the Contact resource and the Create/Update a contact operation. Map the email address, first and last name, company, job title and phone from the form. HubSpot treats the email address as the primary unique identifier for avoiding duplicate contacts, so always send it.
If you also set a lifecycle stage such as lead, know that HubSpot's API only moves lifecycle stage forward in the stage order. A form from an existing customer can't set them back to lead, so set this field only for new contacts, or leave it out.
Step 4: Log the summary as a note
The HubSpot node lists Create an engagement under Engagement, but the docs don't say which engagement types it covers. Notes are easiest through HubSpot's Notes API. n8n's docs show how: add an HTTP Request node, set Authentication to Predefined Credential Type and pick the HubSpot credential you already have.
Set the method to POST, the URL to https://api.hubapi.com/crm/objects/2026-09/notes, and send a JSON body like this:
{
"properties": {
"hs_timestamp": "{{ $now.toUTC().toISO() }}",
"hs_note_body": "{{ summary, tags and suggested reply }}"
},
"associations": [
{
"to": { "id": "{{ contact ID from the HubSpot node }}" },
"types": [
{ "associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 202 }
]
}
]
}hs_timestamp is required and sets where the note sits on the contact's timeline. HubSpot accepts a Unix timestamp in milliseconds or a UTC date. hs_note_body can be up to 65,536 characters. Association type 202 is HubSpot's default for a note linked to a contact. When you map the AI's text into the body, wrap it in JSON.stringify() inside the expression, so quotes and line breaks in a lead's message don't break the JSON. The create-note endpoint accepts the crm.objects.contacts.write scope, which is already on n8n's recommended list.
Step 5: Test, then publish
Submit three test forms: a strong fit, a vague one, and one from an email address already in HubSpot. Check that the third updated the existing contact and didn't create a duplicate, and that each contact has a note with the summary and suggested reply. Then switch the form to the Production URL and publish the workflow.
Let HubSpot fill in company details
HubSpot has data enrichment of its own, so company details can come from HubSpot without a separate service. Its help article names job title, industry and company size among the enriched fields. Enrichment is available with Starter, Professional and Enterprise subscriptions of its hubs, and only Professional and Enterprise for Smart CRM and Revenue Hub. A Super Admin can turn on automatic enrichment for new records, since the automatic settings are off by default. For contacts, HubSpot matches on first name, last name and work email address, and for companies on the company domain. HubSpot says data enrichment does not consume HubSpot Credits, though its smart properties do. A lead who writes from a personal email address gives enrichment less to work with, so expect gaps.
What to add next
- An If node after the Information Extractor that sends hot leads to Slack or email, so a person sees them quickly.
- A HubSpot task for the contact owner when priority is hot.
- A weekly review of a few notes against the original messages, to tune the tagging rules.
Start with the contact and the note. Each addition is easier to check once those two are reliable.
Sources
- n8n docs, Webhook node (Test and Production URLs, Respond options) (checked 2026-12-02)
- n8n docs, Information Extractor node (Schema Type, Generate From JSON Example, System Prompt Template) (checked 2026-12-02)
- n8n docs, HubSpot node (Create/Update a contact, HTTP Request with a Predefined Credential Type) (checked 2026-12-02)
- n8n docs, HubSpot credentials (Connect my account on n8n Cloud, service keys, legacy private apps, recommended scopes) (checked 2026-12-02)
- HubSpot Knowledge Base, Allow form submissions without email addresses to create contacts (checked 2026-12-02)
- HubSpot Knowledge Base, Get started with data enrichment (plans, automatic enrichment, no HubSpot Credits) (checked 2026-12-02)
- HubSpot developer docs, Contacts API guide (email as primary unique identifier, lifecycle stage moves forward only) (checked 2026-12-02)
- HubSpot developer docs, Notes API (POST /crm/objects/2026-09/notes, hs_timestamp required, 65,536-character body) (checked 2026-12-02)
- HubSpot developer docs, Create note reference (accepted scopes include crm.objects.contacts.write) (checked 2026-12-02)
- HubSpot developer docs, Associate records (association type 202, note to contact) (checked 2026-12-02)
Get the next one.
Field notes from real deployments, written the way this one was. No schedule promised and nothing sold to you. Unsubscribe whenever.
Let's build yours.
Reading is the easy part. We do the work. Tell us what's broken and we'll tell you straight up whether we can help.
let's talk
