- 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
Common use cases and example apps
How to connect Clay
Who can create Clay connections depends on your plan and workspace settings. See 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)
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.
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:1
Open your Clay account
Sign in to Clay with the account that has access to your workspace.
2
Open API keys
Go to Settings → Account → API keys (beta).
3
Create a key
Create a new API key and give it a descriptive name, for example
Lovable integration.4
Copy the key
Copy the key and store it securely.
The connector requires a Public API key created under API keys (beta). Clay’s legacy workspace API key will not work.
Step 2: Connect Clay to Lovable
You can create multiple connections using different API keys.1
Open Clay in Connectors
Go to Connectors → App connectors and select Clay.
2
Add a connection
Click Add connection.
3
Configure the connection
- Display name: name the connection, for example
Clay Prod. - API key: paste your Clay Public API key.
4
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.
5
Connect
Click Connect. Lovable verifies the key with Clay before saving the connection.
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 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:1
Open Connectors
Open Connectors and select .
2
Open the connection
Open the connection you want to manage.
3
Select projects
Under Linked projects, check the projects you want to unlink.
4
Confirm
Click Unlink projects and confirm.
How to delete a connection
Workspace admins and owners can delete connections. Other members can delete a connection if they created it, or if they have been explicitly granted access to it. Before deleting, review the Linked projects section to see which projects are currently using the connection. To delete a connection:1
Open Connectors
Open Connectors and select .
2
Open the connection
Open the connection you want to remove.
3
Review linked projects
Review the Linked projects section.
4
Delete
Under Delete this connection, click Delete and confirm.