> For the complete documentation index, see [llms.txt](https://docs.distro.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.distro.so/guides/clay.md).

# Clay

Start a Distro workflow from a Clay table, and send routed leads back to Clay.

Distro and Clay connect over HTTP. A Clay table calls a Distro workflow through a webhook endpoint or the API, and a Distro workflow sends rows to a Clay table with **Call Webhook**. Clay has no card under **Integrations**.

| Direction                                      | Distro side          | Clay side                                 |
| ---------------------------------------------- | -------------------- | ----------------------------------------- |
| Clay → Distro                                  | **Webhook received** | An HTTP API column that posts each row    |
| Clay → Distro, with the result in the response | **API call**         | An HTTP API column with a Distro API key  |
| Distro → Clay                                  | **Call Webhook**     | A table that receives rows from a webhook |

## Where Clay fits next to Enrich Lead

**Enrich Lead** returns data inside the run, so later steps can branch, route, and write to the CRM while a visitor waits. Clay returns results after its columns run, and they reach Distro only if Clay sends them back. Keep Clay for research that can finish later, and off the path a live inbound lead takes to the scheduler.

## Call a workflow from Clay

{% stepper %}
{% step %}

### Create the endpoint

Create a workflow with **Webhook received**, bearer authentication, and copy the URL and secret.
{% endstep %}

{% step %}

### Add an HTTP API column in Clay

`POST` to the URL with `Authorization: Bearer <secret>` and a JSON body built from the row, for example `email`, `first_name`, `company_domain`, and `employee_count`.
{% endstep %}

{% step %}

### Capture a sample and map the email

Send one row while the endpoint is listening, or paste the JSON, then set **Lead email field** to `email`.
{% endstep %}

{% step %}

### Route only new records

Add **Match Salesforce Record** by email first and route only on **Not matched**, so a column that re-runs on the same row doesn't reassign an owner.
{% endstep %}
{% endstepper %}

Send one row per request; a list in one body starts one run with the whole list.

## Send rows to Clay

Add **Call Webhook** with `POST` to the Clay table's webhook URL, any token Clay gives you under **Headers** or **Authentication**, and a body with the keys the table expects, such as `email` and `assigned_rep`. Set **Timeout (seconds)**; Distro waits up to 60 seconds. Place the step where waiting costs nothing, such as a CRM-triggered workflow or after **Show Scheduler**. To use Clay's findings, have the table post its results to a Distro endpoint.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.distro.so/guides/clay.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
