> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runspark.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Lead Capture

> Automatically capture leads from any form or website

Spark OS can automatically capture leads from any form provider — Typeform, JotForm, Google Forms, Wufoo, or any tool that supports webhooks.

## How It Works

1. You create a **webhook URL** in Spark (Automations tab → Lead Capture → Connect)
2. You paste that URL into your form provider's webhook settings
3. When someone fills out the form, the data is sent to Spark automatically
4. A **contact is created** with the submitted information
5. Your **agent processes the lead** based on your instructions

## Setting Up Lead Capture

### Step 1: Get Your Webhook URL

Go to your agent's **Automations** tab. You'll see a **Lead Capture** card. Click **Connect** to generate your unique webhook URL.

### Step 2: Configure Instructions

Tell your agent what to do when a new lead arrives:

> "When a new lead arrives, review their submission data, create a summary note, calculate a quote based on our pricing guide, and draft a response email for review."

### Step 3: Add to Your Form Provider

Copy the webhook URL and paste it into your form provider:

<AccordionGroup>
  <Accordion title="Typeform">
    Go to Connect → Webhooks → Add Webhook. Paste the Spark webhook URL. Typeform sends JSON automatically.
  </Accordion>

  <Accordion title="Typeform">
    Connect → Webhooks → Add Webhook. Paste the URL.
  </Accordion>

  <Accordion title="Any Provider">
    Look for "Webhooks," "HTTP POST," or "API integration" in your form tool's settings. Paste the Spark webhook URL. Send a test submission to verify.
  </Accordion>
</AccordionGroup>

### Step 4: Test It

Submit a test entry through your form. Check:

* ✅ Contact created in Spark
* ✅ Agent processed the lead (check chat for the summary)
* ✅ Notes and data captured correctly

## Field Mapping

Spark automatically maps common fields:

| Your Form Field                 | Maps To         |
| ------------------------------- | --------------- |
| name, first\_name + last\_name  | Contact name    |
| email, email\_address           | Contact email   |
| phone, phone\_number, mobile    | Contact phone   |
| company, organization, business | Contact company |

All other fields are stored in the contact's metadata and available to your agent for interpretation.

<Tip>
  You don't need to configure field mapping for every form. Spark handles common fields automatically, and your agent interprets business-specific fields from the raw submission data.
</Tip>
