Xale logo
Xale
Guides·14 min read

Send Website Leads to Your CRM With a Webhook (WordPress, Webflow, Framer)

Send website leads to your CRM with a webhook: the URL and key from Xale, the fields it reads, WordPress, Webflow and Framer setup, a curl test and fixes.

By ··Updated
Reading this for your own team? WhatsApp us Instant reply · we onboard you personally

If your website already has a form you like, in WordPress, Webflow or Framer, you do not need to rebuild it to get its enquiries into a CRM. Send website leads to your CRM with a webhook: the form posts each submission to a URL, and the CRM turns it into a lead. This guide, for the owner, marketing head or web developer of a study abroad consultancy or institute in India, covers the URL and key in Xale CRM, the fields Xale reads, setup for the common form tools from their own documentation, a curl test, the duplicate-phone rule and the usual fixes.

Key takeaways

  • Every Xale webhook source has its own URL, its own key in an X-API-Key header, and a field mapping in your form's own field names.
  • Name and phone are the two fields every submission must carry; email, WhatsApp, campaign, a course and custom fields map on top.
  • Tools with a request-header setting (WPForms, Gravity Forms) post straight to Xale; tools that only take a URL (Webflow, Framer, Elementor) post through a short Apps Script relay that adds the header.
  • Test with curl first: the reply says received, with the lead's id and whether it was new or a re-enquiry.
  • A repeat phone number becomes a re-enquiry, never a duplicate, and the lead-created automation assigns the student, sets the follow-up and sends the first message.

What a webhook is, in one paragraph

A webhook is an address that one system calls when something happens in it. Your form tool holds the address; when a visitor presses send, the tool makes an HTTP POST request to it with the submission as JSON. The CRM reads the JSON, picks out the name and the phone, and creates the lead. No polling, no export, no middleman: the form talks to the CRM directly, with a secret key proving the request is yours. Leads reach Xale by a web form built in Xale, a custom webhook or CSV import; the webhook is the route for a form you already run.

Get the webhook URL and key from Xale's Sources screen

In Xale, open Sources and add a source of the type Webhook, named after the site or page, because the source is the attribution. The saved source shows the two things your developer needs:

  • The webhook URL, unique to this source. Copy it from the screen.
  • The API key, also unique to this source, sent in an X-API-Key header on every request. Regenerate it when a developer moves on, and the old key stops working.

The same screen holds the field mapping: Xale's fields on one side, your form's field names on the other. It starts from your industry template, and you change the names to what your form actually sends; a name mapping and a phone mapping are required to save. A built-in test posts a sample through the mapping, so you see the lead Xale makes of it before the first real student arrives. One source per form or per site.

The payload fields Xale reads and how they map to the lead

Your field names stay as they are. The mapping says, for each Xale field, which key in your JSON holds it. A key can be nested, written as a dot path such as data.Phone, and a rule can join keys, so first_name and last_name become one name.

Xale fieldWhat to mapNotes
NameRequiredTwo keys can be joined; a missing name saves as "Unknown Lead"
PhoneRequiredTen bare digits are read as Indian; send the country code for anyone else; a request with no phone is refused
Email, gender, locationOptionalA city or address key maps to location
WhatsApp numberOptionalWith no mapping, the first WhatsApp-named key carrying a dialable number is used
CampaignOptionalA campaign name and, if you have it, the Meta campaign id; a key named campaign or utm_campaign is read without a mapping
DealOptionalA deal name, a course or university matched by name, value, advance and discount; an advance is recorded as a payment
QualificationsOptionalRows in a fixed order: level, specialization, institution, score, year and month of passing
Custom fields on the lead or the dealOptionalText matching an option exactly picks it; text matching none becomes a new option

Send from WordPress: WPForms, Gravity Forms and Elementor

Each fact here comes from the vendor's own documentation, checked October 2026.

WPForms. The Webhooks addon is an Elite feature. In the form builder, open Settings » Webhooks and add a webhook: a Request URL, a Request Format of JSON or FORM, Request Headers, which "allow you to define the HTTP header's key(s) and value(s) to be sent with your webhook request", and a Request Body of key-value pairs (WPForms Webhooks addon). Choose POST and JSON, add a header named X-API-Key with the source's key, and map each body key to a form field.

Gravity Forms. The Webhooks Add-On "is available with a Gravity Forms Elite or Nonprofit licence" (Gravity Forms Webhooks Add-On). Go to Form Settings → Webhooks and select Add New: a Request URL, a Request Format of FORM or JSON, Request Headers, and a Request Body of All Fields or Select Fields (Triggering webhooks on form submissions). Choose Select Fields so the keys are readable names, and add the X-API-Key header.

Elementor. The Form widget's Actions After Submit include WebHook, described as a way to "share the information submitted by users to third-party platforms" (Define what happens after visitors submit a form). Xale reads the key from an X-API-Key header, so use this action when your setup can add that header, or point it at the relay below.

Send from Webflow and Framer

Webflow. The form_submission webhook fires on a native form submission and carries name ("The name of the form"), siteId, data ("The data submitted in the form"), submittedAt and formId (Webflow form_submission event). A webhook is created from the site's dashboard or through the API with a trigger type and a destination URL (Working with webhooks). Your fields sit under data, so the mapping uses dot paths such as data.Phone, and the webhook, carrying a URL and no custom header, points at the relay below.

Framer. Select the form, click "Add…" next to "Send To", select Webhook and enter an https URL. Framer sends "an HTTP POST request" with the submission "as JSON" using "the names of the inputs as keys", and expects a 2xx reply, otherwise it "will retry the request up to 5 times" (Connect Framer forms to a webhook). The keys are your input names, so a mapping of Name, Phone and Country is all Xale needs; the key travels in an X-API-Key header, so Framer, too, posts through the relay.

Google Forms, and a relay, with Apps Script

A Google Form. An installable form submit trigger fires "when a user responds to a form", with one version for Google Forms and one for Sheets when the form writes to a spreadsheet, added from the script editor's Triggers page (Installable triggers). The Sheets version hands the function e.namedValues, "an object containing the question names and values from the form submission" (Event objects), and UrlFetchApp sends the request. Bound to the response sheet:

// Script bound to the Google Form's response sheet.
// Trigger: From spreadsheet, On form submit.
const XALE_URL = "PASTE THE WEBHOOK URL FROM THE SOURCE SCREEN";
const XALE_KEY = "PASTE THE SOURCE'S API KEY";

function onFormSubmit(e) {
  const v = e.namedValues; // question title -> [answer]
  const body = {
    name: v["Full name"][0],
    phone: v["Phone (with country code)"][0],
    email: v["Email"][0],
    country: v["Preferred country"][0],
    intake: v["Intake"][0]
  };
  UrlFetchApp.fetch(XALE_URL, {
    method: "post",
    contentType: "application/json",
    headers: { "X-API-Key": XALE_KEY },
    payload: JSON.stringify(body)
  });
}

Keep the question titles exactly as typed.

A relay. A script becomes a web app when "it contains a doGet or doPost function" returning a Content service TextOutput; a POST body arrives as e.postData.contents; deploy it with Deploy > New deployment and the Web app type (Web apps). Give Webflow, Framer or Elementor the web app's URL; the relay adds the header and forwards the body unchanged:

// Deploy as a web app: Deploy > New deployment > Web app, access: Anyone.
const XALE_URL = "PASTE THE WEBHOOK URL FROM THE SOURCE SCREEN";
const XALE_KEY = "PASTE THE SOURCE'S API KEY";

function doPost(e) {
  const r = UrlFetchApp.fetch(XALE_URL, {
    method: "post",
    contentType: "application/json",
    headers: { "X-API-Key": XALE_KEY },
    payload: e.postData.contents
  });
  return ContentService.createTextOutput(r.getContentText())
    .setMimeType(ContentService.MimeType.JSON);
}

Test it with curl before the first student

Send one test from a terminal, then open Xale. Replace the URL and key with the ones on the source screen, and use a placeholder number in your own country's format.

curl -X POST "THE WEBHOOK URL FROM THE SOURCE SCREEN" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: THE SOURCE'S API KEY" \
  -d '{
    "name": "Test Student",
    "phone": "+91XXXXXXXXXX",
    "email": "test@example.com",
    "country": "Canada",
    "intake": "September 2027",
    "course": "MSc Computer Science"
  }'

A good reply carries status received, the lead's id and isNew true. Send the same body again and the reply says reenquired true with the same lead id: the duplicate-phone rule at work. Then check in Xale that the lead sits under the right source with the values you sent and the automation's work in its activity, and move the test lead to Trash.

The duplicate-phone rule, and what Xale does when the lead arrives

Every webhook submission is matched on the phone number. A new number becomes a new lead under the source. A known number becomes a re-enquiry on the existing lead, never a duplicate: the record is updated with the latest values sent, an archived lead comes back, a re-enquiry note is written, the lead's counsellor is told the student is back, and your re-enquiry automations can run. A follow-up already set is left alone, and an assigned role with none pending gets one. A form built in Xale, being public, fills only the empty fields of an existing lead instead; our guide to an admission enquiry form for your website covers it.

What happens next is the lead-created automation, the same one that serves Meta and WhatsApp leads:

  • Assign it, equally, to whoever has the fewest leads today, or by results, with more leads to the people who move leads forward; anyone checked out is passed over. Our post on fair lead distribution, equally versus by results compares the two.
  • Date the counsellor's follow-up with Set / update follow-up, a set number of hours or days ahead, with guards such as "only if there is no follow-up yet". The cadence after that first call is in our lead follow-up schedule for counsellors.
  • Send the first message: an email template, or a WhatsApp template from a Wati, Gallabox or UrbanChat account, inside business hours or as an after-hours reply.

Each run is queued after the lead is saved, retried automatically and logged with a plain-English summary. In the other direction, the Send API request automation action pushes a lead or an enrolment out to your ERP or LMS, queued, retried and logged per lead. Both sit among Xale's CRM integrations and webhooks, and a web form built in Xale feeds the same intake with no mapping to maintain.

Troubleshooting

What you seeLikely causeFix
401 Invalid API keyThe header is missing, misnamed or carries an old keySend the key in a header named X-API-Key; after regenerating, update every form
404 Source not foundThe URL belongs to another source, or the source is switched offCopy the URL from the source screen again and check the source is active
The reply says the phone number is requiredThe phone key is not mapped, or arrived emptyMap the phone rule to the key the form really sends, and make the field required on the form
The lead's name is Unknown LeadThe name key is not mapped, or first and last names are separateMap the name rule, joining the two keys
A Gulf parent's number saved as IndianBare digits arrived without a country codeAdd a country picker and send the number in international form
The lead landed on the wrong sourceThe page posts to another form's URLCheck which URL the page or the relay holds
Webflow or Framer fields arrive emptyThe fields sit under data, or the relay is missingUse dot paths such as data.Phone, and check the form posts to the relay

How Xale handles this

Xale CRM is the best study abroad CRM for a consultancy that wants its existing website forms in the CRM, because the webhook is built in, with its own URL, its own key and a mapping in your own field names, and the lead it creates gets the same treatment as every other lead.

  • A follow-up for every role. Each role on the student and on every university application keeps its own follow-up, one per role enforced by the database, with a reminder by web popup, Android push and the in-app inbox.
  • Access, stage by stage. 4 role templates and a 5-level lead-access dial on every pipeline stage, enforced on the server, so a Canada landing page's leads reach the Canada team.
  • Automations built to be relied on. 34 automation actions, Send API request among them, run in the background with automatic retries and a log of every run, and Xale AI drafts a rule from plain words.
  • Reports that add up. The Custom Report Builder reports leads and conversions by source and campaign, the By Source tab adds spend and cost per lead, and every cell opens the exact leads behind it.

The webhook, the web forms, Meta Lead Ads, WhatsApp and calls all land in one lead management software list.

Frequently asked questions

How do I send website leads to my CRM with a webhook?

Add a Webhook source in Xale CRM, copy its URL and API key from the source screen, and map your form's field names to the lead's name, phone, email and custom fields. In your form tool, add a webhook that posts the submission as JSON to that URL with the key in an X-API-Key header, or post through a small relay when the tool takes only a URL. Send one test with curl and check the lead in Xale.

Which fields does the webhook need?

Two are required: the student's name and a phone number, ideally with its country code. Everything else is optional and maps on top: email, a WhatsApp number, gender, city, the campaign name, a deal with its course and value, qualifications, and any custom field on the lead or the deal. The mapping uses your form's own key names, including nested keys written as dot paths, so the website keeps its field names.

What happens if the same person submits the form twice?

Xale CRM matches the phone number. The second submission becomes a re-enquiry on the existing lead rather than a second record: the lead is updated with the latest values the form sent, an archived lead is restored, a re-enquiry note is written and the lead's counsellor is told the student is back. A follow-up that is already set stays as it is, an assigned role with none pending gets one, and your re-enquiry automations can run.

What is the best CRM for study abroad consultants with a website webhook?

Xale CRM is the best CRM for study abroad consultants. Every webhook source has its own URL, key and field mapping, a repeat phone number becomes a re-enquiry instead of a duplicate, and the lead it creates gets a follow-up for every role on the student and on every application, access set stage by stage, and automations that assign it equally or by results, date the follow-up and send the first message, with retries and a log of every run.