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

# Lead Generation

> Harvest qualified leads automatically — describe your ideal customer profile in plain English, pick a source, and let ParsaLink fill your pipeline on a schedule.

<div
  style={{
background: "linear-gradient(135deg, #143D4E 0%, #1C758A 55%, #30C8CA 100%)",
borderRadius: "24px",
padding: "28px",
marginBottom: "28px",
color: "#FFFFFF",
boxShadow: "0 20px 50px rgba(20, 61, 78, 0.22)",
position: "relative",
overflow: "hidden",
border: "1px solid rgba(255,255,255,0.08)"
}}
>
  <div
    style={{
position: "absolute",
top: "-36px",
right: "-36px",
width: "170px",
height: "170px",
background: "rgba(255,255,255,0.08)",
borderRadius: "999px"
}}
  />

  <div
    style={{
position: "absolute",
bottom: "-48px",
left: "-24px",
width: "130px",
height: "130px",
background: "rgba(255,255,255,0.06)",
borderRadius: "999px"
}}
  />

  <div
    style={{
  display: "inline-flex",
  alignItems: "center",
  background: "rgba(255,255,255,0.14)",
  color: "#FFFFFF",
  padding: "7px 14px",
  borderRadius: "999px",
  fontSize: "12px",
  fontWeight: "700",
  marginBottom: "12px",
  letterSpacing: "0.08em",
  textTransform: "uppercase"
}}
  >
    LEAD GENERATION
  </div>

  <p style={{ margin: 0, fontSize: "16px", lineHeight: "1.9", maxWidth: "760px", color: "#FFFFFF" }}>
    Describe the businesses you want to reach, pick a public-records source or an AI-powered web search, and ParsaLink populates your CRM with fresh leads — every day, every week, on whatever schedule you set.
  </p>
</div>

## How It Works

Lead generation is an **automation action** (`generate_leads`) that you can drop into any rule. Most workspaces wire it to a `scheduled` trigger so it fires on a cron (every morning, every Monday, etc.) and quietly drips qualified contacts into the pipeline overnight.

Each run does three things:

1. **Parses your prompt** with an LLM to extract structured search criteria — state, keywords, location, entity type, required contact fields.
2. **Calls the adapter** (web search or a public-records database) with those criteria.
3. **Creates Account + Contact records** stamped with the Source, Stage, and Tags you configured, ready for downstream automations to act on.

<Note>
  The created contacts trigger your existing `contact_created` / `contact_source_changed` rules, so you can chain lead-gen into an email sequence + follow-up task without writing a single line of glue.
</Note>

***

## Adapters

Three adapters ship with every workspace; the right one depends on what you're hunting for.

### Web Search (LLM-powered) · `web_search`

Asks the tenant's configured LLM to find real businesses matching your prompt and return structured JSON. Works best with web-search-capable models (Perplexity, Claude with the web tool, OpenAI with browsing). Falls back to the default chat model if no web-search model is configured — quality then depends on training-data recall.

* **Coverage:** any US state, any industry the LLM can recall
* **Best for:** target lists where you can't predict what registry the businesses are in (marketing agencies, freelance consultants, niche service providers)
* **Trade-off:** results require verification — the prompt asks the model never to fabricate contact details, but always spot-check before bulk emailing.

### Texas Comptroller · `tx_comptroller`

Scrapes the free Texas Comptroller Taxable Entity Search (a public alternative to SOSDirect). Returns business name, registered agent, and mailing address.

* **Coverage:** all entities registered to do business in Texas
* **Best for:** Texas-focused outreach; account-level prospecting where you need contact info via a different channel (the registry doesn't carry email)
* **Returns:** Account records only (no Contact rows — there are no officer names)

### Indiana SOS · `in_sos`

Indiana Secretary of State PublicBusinessSearch. Returns business, entity type, registered agent, address, and officer names.

* **Coverage:** all entities registered with the Indiana SOS
* **Best for:** Indiana outreach with named officers to address
* **Returns:** Account + one Contact per officer

***

## Setting Up a Daily Lead Harvest

The fastest way to get this running is the **Daily Lead Harvest** template in the [Automation Templates](/automations/templates) gallery.

<Steps>
  <Step title="Install the template">
    Go to **CRM → Automations → Browse Templates → Daily Lead Harvest (Web Search)** and click **Install in My Workspace**.
  </Step>

  <Step title="Edit the prompt">
    Open the `generate_leads` step. Rewrite the **Prompt** to describe your ideal customer (industry, location, size, any must-have signals).

    Example: *"Marketing agencies in the Dallas-Fort Worth area founded in the last 2 years. Only include businesses with a publicly listed email so we can reach out."*
  </Step>

  <Step title="Tune the adapter and target">
    Pick the right **Adapter** for the geography (Web Search for anywhere; TX or IN for state-specific). Set **Target count** to the number of qualified leads you want per run.
  </Step>

  <Step title="Stamp Source / Stage / Tags">
    Pick a **Source** (e.g. `AI Outreach`), the **Default Stage** for new accounts and contacts, and any **Tags** so downstream rules can pick them up.
  </Step>

  <Step title="Set the schedule">
    Open the trigger conditions and set `schedule_type` to `daily` and `schedule_hour` to your preferred run hour in UTC. Save and switch the rule to **Active**.
  </Step>
</Steps>

<Tip>
  The template also wires up an AI intro email at +1 hour and a manual follow-up task at +3 days, so the moment lead-gen finds a business, the outreach starts. Tweak the email prompt and task wording to match your tone.
</Tip>

***

## Required Contact Fields

Phrases like *"only contacts with an email"* or *"must have a LinkedIn"* in your prompt are interpreted as **hard requirements** — not preferences.

When a requirement is set:

* The adapter over-fetches and runs up to 4 rounds to hit your target count.
* Businesses without a verified value for the required field are skipped.
* Email values are format-validated as a final safety net — fabricated addresses never reach your CRM.

Supported requirement keywords: **email**, **phone**, **LinkedIn**, **website**.

***

## Prompt Templates

The `generate_leads` action exposes an optional **Prompt template** picker. The picker only lists templates of type `lead_gen_search` — internal parser templates (`lead_gen_parser`) are hidden.

In most cases the built-in template works fine. Custom templates are useful when:

* You want different system prompts per ICP (one rule harvests "agencies", another harvests "manufacturers" with very different prompt wording).
* You want to constrain the LLM to a smaller list of source URLs.
* You want to enforce a max-token budget tighter than the default.

Edit or seed templates at **Admin → LLM → Prompt Templates** (admin role required).

***

## Reviewing a Run

Each scheduled run creates an automation task with a **Run Summary** showing:

* The parsed search query (state, keywords, locations, required fields)
* How many rounds were used
* How many leads were examined / created / skipped as duplicates / skipped for missing required fields
* Each created account and contact uid

Find them under **CRM → Automations → Activity** filtered by your lead-gen rule.

<Warning>
  Lead generation calls cost LLM credits. Each run consumes Parsa Credits proportional to the prompt size and target count. If your workspace runs out mid-run, the action records partial results and surfaces an explicit "out of Parsa Credits" error rather than silently producing zero leads.
</Warning>
