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?
| Method | Setup time | Control over design | Reliability | Running cost |
|---|---|---|---|---|
| The CRM's embedded form | An hour or two | Limited to the CRM's options | Good; nothing in between to break | Included in the CRM |
| Your form plugin's CRM integration | A few hours | Full | Varies; failures are often silent | Plugin licence |
| A connector tool (Zapier, Make, n8n) | A few hours | Full | Good, if error alerts are set up | Per task or per run |
| A server-side call to the CRM's API | Two to five days | Full | Best: stored, retried and monitored | Hosting 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:
// 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?