How to connect your website forms to your CRM

Send every website enquiry into your CRM with its source intact: four ways to connect a form, which to pick, and the checks that stop leads going missing.

By Sohail Hussain21 November 20265 min read

Connect your website forms to your CRM in one of four ways: embed the CRM's own form, use your form plugin's built-in integration, route submissions through a connector tool such as Zapier, or send them from your website's server straight to the CRM's API. For a site where enquiries are the main business, the server-side route is the most reliable, because each submission is saved on your side first and retried if the CRM is unavailable. Whichever you choose, capture where the visitor came from, avoid duplicate contacts, and check that every submission actually arrives.

Form-to-CRM connections are one of the most common jobs in our APIs and integrations work, and most of them start with an audit of leads that went missing. If you have not picked a CRM yet, HubSpot vs Zoho vs Salesforce for small teams compares the usual choices.

What are the ways to connect a form to a CRM?

MethodSetup timeControl over designReliabilityRunning cost
The CRM's embedded formAn hour or twoLimited to the CRM's optionsGood; nothing in between to breakIncluded in the CRM
Your form plugin's CRM integrationA few hoursFullVaries; failures are often silentPlugin licence
A connector tool (Zapier, Make, n8n)A few hoursFullGood, if error alerts are set upPer task or per run
A server-side call to the CRM's APITwo to five daysFullBest: stored, retried and monitoredHosting only

The embedded form is a perfectly good answer for a small site. The plugin route is where we find most lost leads: an update changes something, the integration stops, and nobody is told. Built-in options have their own limits too; Salesforce's Web-to-Lead, for example, caps the number of leads it accepts per day. The rest of this guide follows the server-side route, because it is the one you can fully trust and the steps apply in part to the others.

Step 1: Decide what a lead record needs

Split the fields into three groups.

Visible fields, kept short: name, email, phone with country code, company if you sell to businesses, and the message. Every extra field costs submissions; contact forms: fields that cost you leads covers which ones to drop, and how to design a contact page that converts covers the page around the form.

Hidden source fields, filled automatically: UTM source, medium and campaign, the first page the visitor landed on, the referring site and the form's name.

Consent, where you need it: a separate, unticked checkbox for marketing emails or WhatsApp updates, stored with the time it was given.

Then map each one to a CRM field. Dropdowns need special care. If the form offers "Website redesign" and the CRM's picklist says "Redesign", the API may reject the record. Agree the values on both sides before writing code.

Step 2: Capture the source before the visitor moves on

Visitors rarely fill in a form on the page they landed on. They arrive on a blog post from a campaign link, read two more pages, then go to the contact page, and by then the campaign parameters have gone from the address bar. Store them on arrival:

js
// Run on every page: keep the first campaign parameters a visitor arrives with
const params = new URLSearchParams(window.location.search);
const keys = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
if (keys.some((k) => params.has(k)) && !localStorage.getItem("first_touch")) {
  const touch = { landing_page: window.location.pathname, referrer: document.referrer };
  keys.forEach((k) => { if (params.has(k)) touch[k] = params.get(k); });
  localStorage.setItem("first_touch", JSON.stringify(touch));
}

On submit, read first_touch and send its values in the hidden fields. Tag your own campaign links consistently with the UTM link builder, or the CRM fills up with "facebook", "Facebook" and "fb" as three different sources. If you serve visitors in the EU or UK, check with your lawyer whether storing this needs consent under your cookie policy.

Step 3: Send the submission from your server to the CRM

The order matters. The browser posts the form to your server. Your server validates it, filters spam and saves it to your own database. Only then does it call the CRM, and it marks the record as synced when the CRM confirms.

Each CRM has its own way in:

  • HubSpot accepts submissions to an existing HubSpot form through its forms submission endpoint, which takes a list of fields plus optional context such as the page URL and HubSpot's tracking cookie. Sending that cookie links the lead to the pages they viewed before submitting.
  • Zoho CRM takes new leads through its REST API, authorised with OAuth, and supports an upsert that checks for an existing record first.
  • Salesforce offers Web-to-Lead for simple cases and its REST API, through a connected app, for anything that needs control.

For spam, start with a hidden honeypot field and a per-IP rate limit on the server. Add a challenge such as reCAPTCHA or Cloudflare Turnstile only if spam keeps getting through, because every challenge also stops some real people.

Step 4: Handle failures and duplicates

The CRM will sometimes say no: it is down for maintenance, the token has expired, a required field is missing. Retry automatically with increasing waits. When retries run out, alert a person with the lead's details so nobody waits on a reply while you debug. Keep an email notification to the sales inbox that does not depend on the CRM at all, as a backstop.

Duplicates come from people who enquire twice, or who are already customers. Search by email and phone before creating anything, and add the new enquiry as an activity on the existing contact. HubSpot de-duplicates contacts by email on its own; with other CRMs, use the API's upsert or duplicate check. Why integrations break covers retries and alerts in more depth. To inspect what your server is actually sending, paste a payload into the webhook payload formatter.

Step 5: Test with real submissions and watch the first week

Submit every form on the site with realistic data: phone numbers with and without country codes, a long message, a name in Arabic or Devanagari, with and without campaign parameters, from a phone and a laptop. For each one, check the CRM record: fields filled, owner assigned, source recorded, notification sent.

Then, for the first week, compare two numbers every morning: submissions stored on your side and leads created in the CRM. They should match. After that, check monthly. A mismatch is the only early warning you get.

If the CRM cannot hold the way you sell, with approvals, custom pricing or a client-facing view, the form is not the problem. Read custom software vs off-the-shelf before adding another connector. Otherwise, submit your own contact form today and find that lead in the CRM. If it takes more than a minute, or it is not there, Step 4 is where to begin.

Was this guide useful?

Questions

Frequently asked.

Should we just use the CRM's own embedded form?

For many small sites, yes. It takes an hour, the CRM handles tracking and duplicates, and nothing sits in between to break. The costs are less control over design and behaviour, an extra script loading from the CRM's servers, and a form that changes when the CRM vendor changes it. If the form is central to your sales, a server-side connection is worth the extra days.

Why do some form submissions never reach the CRM?

The usual causes are a plugin integration that stopped working after an update, an expired API token, a required CRM field the form does not send, a dropdown value the CRM does not recognise, or a spam filter that is too strict. The fix is the same for all of them: store every submission on your side first and compare counts with the CRM.

Sohail Hussain

Founder, MSH Technologies

Sohail has designed and built websites, web apps and AI products for over 12 years, for clients from Singapore-based industrial groups to early-stage SaaS startups. He writes about what actually worked.

Keep reading

Related guides.

All posts

Your next move

Like what you see? Tell us about it.

A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.

India · Working with clients worldwide

Sohail, Founder, replies within 1 working day (Mon–Sat, IST). Free and no obligation.