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

# Connect your app to Clay

> Connect your app to Clay, a go-to-market data platform, to search people and companies, run enrichment routines, and query Clay tables from your Lovable app.

export const connector_0 = "Clay"

[Clay](https://www.clay.com/) is a go-to-market (GTM) data platform for finding, enriching, and acting on people and company data. The Clay connector lets your Lovable app search Clay's database with structured filters, run Clay routines (enrichment functions and workflows) against your records, and query Clay tables. It's designed for sales and marketing apps that need live prospecting and enrichment data.

With Clay, your app can:

* Search Clay's database of people by title, keywords, and company
* Search companies by domain, industry, and firmographics
* Run enrichment routines against submitted records
* Query Clay tables with structured filters

It's a good fit for prospecting tools, lead enrichment workflows, account research dashboards, and internal GTM apps built on top of your Clay workspace.

## Common use cases and example apps

| Example app                | Example prompt                                                                                                         | Description                                                                                                                                                                          |
| :------------------------- | :--------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Prospect list builder      | *Use Clay and build a tool where I can search for founders at fintech companies and save them to a list.*              | **Turn Clay people search into a focused prospecting UI.**<br />The app creates a Clay search from your filters, pages through results, and lets you save the people worth pursuing. |
| Account research dashboard | *Use Clay and build a dashboard that shows firmographic details for a list of target companies.*                       | **Research target accounts without leaving your app.**<br />The app searches Clay for each company by domain and renders industry, size, and revenue data side by side.              |
| Lead enrichment form       | *Use Clay and build a form where I paste a company domain and get back enriched company data using my Clay routine.*   | **Run Clay enrichment on demand from a simple UI.**<br />The app submits the domain to a Clay routine, tracks the run until it completes, and displays the enriched result.          |
| Bulk enrichment tracker    | *Use Clay and build an app where I upload a CSV of leads, run them through my enrichment routine, and watch progress.* | **Manage large enrichment jobs with a clear lifecycle.**<br />The app submits records to a Clay routine in batches and shows submitted, processing, and done states for each.        |
| Market mapping tool        | *Use Clay and build an app that maps companies in a segment by industry and revenue band.*                             | **Explore a market segment with Clay company data.**<br />The app runs company searches with structured filters and visualizes the results by firmographic attributes.               |
| Clay table viewer          | *Use Clay and build an internal page that shows rows from my Clay table filtered by status.*                           | **Give your team a tailored window into a Clay table.**<br />The app queries the table with structured filters and renders only the fields the team needs.                           |

## How to connect Clay

Who can create Clay connections depends on your plan and workspace settings. See [Who can create connections](/integrations/introduction#who-can-create-connections).

You can create multiple Clay connections using different API keys, which is useful for separating environments (for example, development and production) or connecting different Clay workspaces.

When the connection is created, you can link it to the projects where you want to use it. Anyone building in a project can ask Lovable in chat to link their project to it.

### Prerequisites

Before connecting Clay, make sure you have:

* A Clay account with access to the workspace you want to connect
* A Clay Public API key
* Permission to **create connections** in your Lovable workspace (see [Who can create connections](/integrations/introduction#who-can-create-connections))

<Note>
  Searches and routine runs made through this connector consume Clay credits and count toward your Clay plan's rate limits. Billing is handled directly by Clay, not Lovable.
</Note>

### Step 1: Get a Clay API key

A Clay Public API key lets your Lovable app authenticate with the Clay Public API.

To create a Clay API key:

<Steps>
  <Step title="Open your Clay account">
    Sign in to [Clay](https://app.clay.com/) with the account that has access to your workspace.
  </Step>

  <Step title="Open API keys">
    Go to **Settings → Account → API keys (beta)**.
  </Step>

  <Step title="Create a key">
    Create a new API key and give it a descriptive name, for example `Lovable integration`.
  </Step>

  <Step title="Copy the key">
    Copy the key and store it securely.
  </Step>
</Steps>

<Warning>
  Your API key functions like a password. Keep it secure and never share it publicly. You'll need it in the next step.
</Warning>

<Note>
  The connector requires a **Public API key** created under **API keys (beta)**. Clay's legacy workspace API key will not work.
</Note>

See Clay's documentation for more: [Clay authentication](https://developers.clay.com/public-api/authentication).

### Step 2: Connect Clay to Lovable

You can create multiple connections using different API keys.

<Steps>
  <Step title="Open Clay in Connectors">
    Go to **Connectors → App connectors** and select **Clay**.
  </Step>

  <Step title="Add a connection">
    Click **Add connection**.
  </Step>

  <Step title="Configure the connection">
    1. **Display name**: name the connection, for example `Clay Prod`.
    2. **API key**: paste your Clay Public API key.
  </Step>

  <Step title="Choose who can use this connection">
    Under **Who can use this connection**, decide who in your workspace can use the connection. You start as the only person with access:

    * **Only you** (default): leave the access list as is; only you can use the connection and its associated data.
    * **Invite specific people**: add workspace members by email; only you and the people you add can use the connection and its associated data.
    * **Invite entire workspace**: click **Invite entire workspace** to make the connection available to everyone in your Lovable workspace.

    See [Who can manage connections](/integrations/introduction#who-can-manage-connections) for more information.
  </Step>

  <Step title="Connect">
    Click **Connect**. Lovable verifies the key with Clay before saving the connection.
  </Step>
</Steps>

When connected, anyone building in a project can ask Lovable in chat to link their project to Clay (based on configured connection-level access). Your Lovable apps can then start searching people and companies, running routines, and querying tables.

## Working with routines and tables

* **Routines run asynchronously.** Apps submit records to a routine, then poll for results while Clay processes them. Design flows around a submitted, processing, and done lifecycle rather than expecting instant answers. Routine executions consume Clay credits, so surface expected volume before large runs.
* **Tables require a table id.** There is no list-tables endpoint in Clay's Public API. To query a table, provide its id, found in the Clay URL after `/tables/`, in your prompt.
* **Table queries require Clay Enterprise.** Clay makes the tables endpoint available on its Enterprise plans only; people and company search and routines work on other Clay plans.

## Limitations

The Clay connector cannot:

* Query Clay tables unless your Clay workspace is on a Clay Enterprise plan
* Receive Clay webhooks or real-time events
* Bypass Clay rate limits or credit consumption. Searches and routine runs count toward your Clay plan.
* Rotate API keys automatically. To rotate, generate a new key in Clay and update the Lovable connection.
* Support per-end-user Clay login. Each connection represents a single Clay workspace shared across all projects linked to it.

## How to unlink projects from a {connector_0} connection

Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects.

To unlink projects:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors** and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to manage.
  </Step>

  <Step title="Select projects">
    Under **Linked projects**, check the projects you want to unlink.
  </Step>

  <Step title="Confirm">
    Click **Unlink projects** and confirm.
  </Step>
</Steps>

When unlinked, those projects will no longer have access to {connector_0} through this connection. If a project needs {connector_0} again, you can link it to any available connection.

## How to delete a {connector_0} connection

Workspace admins and owners can delete {connector_0} connections. Other members can delete a connection if they created it, or if they have been explicitly granted access to it.

<Warning>
  Deleting a connection is permanent and cannot be undone. It will remove the credentials from all linked projects, and any apps using this connection will stop working until a new connection is added.
</Warning>

Before deleting, review the **Linked projects** section to see which projects are currently using the connection.

To delete a connection:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors** and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to remove.
  </Step>

  <Step title="Review linked projects">
    Review the **Linked projects** section.
  </Step>

  <Step title="Delete">
    Under **Delete this connection**, click **Delete** and confirm.
  </Step>
</Steps>
