Connect your app to Clay
Connect your Clay workspace to Lovable to search people and companies, run enrichment routines, and query tables directly inside your apps. The connection works both in chat while building and in your live published project.
Anyone building sales, prospecting, or marketing apps who needs live enrichment and company data from Clay.
Do this, in order
- 1
Sign in to Clay, go to Settings > Account > API keys (beta), create a new key, and copy it.
Lovable requires a modern Clay Public API key to communicate with Clay.
- 2
In Lovable, navigate to Connectors, select Clay, and click Connect.
This starts the setup flow to link your Clay account credentials to your Lovable workspace.
- 3
Enter a display name, paste the Clay Public API key, configure sharing settings, and click Connect.
Lovable validates your key with Clay and saves it for your projects to use.
- 4
Open your Lovable project chat and ask Lovable to link your Clay connection and build your feature.
This gives your specific project access to run Clay searches, enrichments, or table queries.
Paste this into your project
Connect this project to my Clay connection. Build a lead enrichment form where I can enter a company domain name, run it through my Clay enrichment routine, display a loading status while it processes, and show the returned company details once finished.
Words decoded
- Enrichment routine
- An automated Clay workflow that takes a piece of information (like an email or company website) and finds extra details about it.
- Firmographics
- Descriptive data about a company, such as its size, industry, location, and annual revenue.
- Asynchronous
- A process that takes time to finish in the background, meaning the app must submit the job and check back later for results instead of getting an instant reply.
Where people get stuck
- Using Clay's legacy workspace API key instead of a key from 'API keys (beta)' will cause authentication to fail.
- Expecting instant results from enrichment routines; routines run in the background and require checking back for completion.
- Trying to query Clay tables on non-Enterprise plans; table access requires a Clay Enterprise subscription.
- Failing to provide a Table ID in your prompt when querying tables; Clay does not allow apps to list tables automatically.
- Running massive batches without considering credit consumption, as every search and routine uses Clay credits billed by Clay.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.