Skip to content

Capturing leads automatically

Web forms, webhooks, Meta and Google Lead Ads, and the on-site pixel.

3 min readUpdated 30 July 2026
Lead capture
Six intake paths, one lead record
Meta Lead Ads
Campaign, adset, ad and form attached to the lead
Google Ads
GCLID captured at the form for offline conversions
WhatsApp
An inbound message becomes a lead and a thread
Website forms
Public capture endpoint, no login, spam-guarded
IVR & calls
A call to a virtual number creates or matches a lead
CSV & REST API
Bulk migration and anything else you already run
Whichever path a lead arrives on, deduplication runs before assignment — so two agents never call the same person.

Manual entry does not scale and import is for history. This is how leads arrive on their own.

Capture sources

Webhooks, website forms, landing pages and IVR feeds are configured in Settings → Integrations (the Inbound Webhooks & APIs screen). Meta Lead Ads are set up under Marketing → Manage Facebook.

Each source gets its own credential and its own settings, which means you can tell exactly where a lead came from and switch one channel off without touching the others.

Web forms and webhooks

Create a capture source of type Webhook. You get a URL containing a token:

https://atomcrm.ai/api/capture/YOUR_TOKEN_HERE

POST a JSON body to it:

json
{
  "name": "Aarav Patel",
  "phone": "9812300045",
  "email": "aarav@example.com",
  "city": "Mumbai",
  "message": "Interested in the annual plan"
}

The response tells you whether a lead was created or matched an existing one.

Per-source settings worth knowing:

  • Default stage — where these leads land
  • Assign to — override distribution and send this source to one person
  • Require a signature — rejects any delivery that does not send the source's shared secret in an X-Capture-Signature or X-Webhook-Secret header
  • Lead source — the source these leads are filed under, unless the payload's source_token names another
Note
The token is the credential. Anyone who has it can create leads in your workspace. Treat it like a password, and rotate it if a form using it is ever publicly exposed in a way you did not intend.

Meta Lead Ads

Go to Marketing → Manage Facebook and connect your account.

Once connected, pick which pages and which lead forms to subscribe to. Leads arrive within seconds of submission, carrying their campaign, ad set and ad — which is what makes cost-per-conversion reporting possible later.

You can also send conversions *back* to Meta so its optimisation learns from closed deals rather than form fills. See Marketing → Conversions API.

Marketing → Google Conversions connects your Google Ads account. This does two things:

  1. Maps your stages to conversion actions, so you choose which stage counts as a conversion in Google Ads.
  2. Uploads offline conversions, so Google optimises toward leads that actually closed.

The on-site pixel

For your own marketing site. Once a Meta pixel is set up under Marketing → Conversions API, turn on its On-site pixel events card, which then gives you an endpoint and a snippet to copy:

html
<script>
var eventId = crypto.randomUUID();
fbq('track', 'Lead', {}, { eventID: eventId });
fetch('https://atomcrm.ai/api/pixel/YOUR_SITE_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ event_name: 'Lead', event_id: eventId, event_source_url: location.href })
});
</script>

It forwards your site's browser events, such as PageView and Lead, to Meta's Conversions API from our server, with a shared event ID so Meta counts each conversion once. Only the sites you list under Allowed sites can post.

Inbound calls

If you use a supported telephony provider, calls to your tracked numbers create leads automatically, with the recording attached. See Telecalling.

Checking that capture is working

Settings → Integrations shows, per webhook, how many deliveries it has received, when the last one arrived, and how many failures in a row it has had.

A source that has received nothing for a day it normally would is the single most common cause of "our leads dropped" — and the anomaly detector will usually flag it before anyone notices manually.

Something unclear or missing? Tell us and we will fix the page — send us a note.

Capturing leads automatically — Documentation — atomcrm.ai