# Clay

## What It Does

Pushes all available visitor data to a Clay table webhook when a workflow fires. Data is flattened into a single-level JSON object that maps directly to Clay table columns, ready for enrichment and routing.

## Authentication

Webhook URL + optional auth token. When adding Clay as a connection step in an automation, enter your Clay webhook URL (must start with `https://api.clay.com/`) and optionally add an authentication token for secure delivery.

## Data Sent to Clay

All visitor data is sent as a flat JSON object. Every available field is included:

### Identity

| Field                 | Type             |
| --------------------- | ---------------- |
| `person_id`           | String           |
| `name`                | String           |
| `first_name`          | String (derived) |
| `last_name`           | String (derived) |
| `profile_picture_url` | String           |
| `linkedin_url`        | String           |
| `gender`              | String           |
| `age_min`             | Number           |
| `age_max`             | Number           |

### Address

| Field             | Type                                     |
| ----------------- | ---------------------------------------- |
| `address_street`  | String                                   |
| `address_city`    | String                                   |
| `address_state`   | String                                   |
| `address_zip`     | String                                   |
| `address_country` | String                                   |
| `location`        | String (composite: city, state, country) |

### Contact

| Field             | Type                                      |
| ----------------- | ----------------------------------------- |
| `work_email`      | String (first work email)                 |
| `personal_email`  | String (first personal email)             |
| `work_phone`      | String (first work phone)                 |
| `personal_phone`  | String (first personal phone)             |
| `work_emails`     | Array (all work emails with validity)     |
| `personal_emails` | Array (all personal emails with validity) |
| `work_phones`     | Array (all work phones with type)         |
| `personal_phones` | Array (all personal phones with type)     |

### Employment

| Field                  | Type   |
| ---------------------- | ------ |
| `job_title`            | String |
| `company_name`         | String |
| `company_logo_url`     | String |
| `company_linkedin_url` | String |
| `company_industry`     | String |
| `company_revenue_min`  | Number |
| `company_revenue_max`  | Number |
| `company_headcount`    | Number |

### Engagement

| Field                | Type             |
| -------------------- | ---------------- |
| `total_sessions`     | Number           |
| `total_pageviews`    | Number           |
| `total_time_on_site` | Number           |
| `last_seen_at`       | DateTime (ISO)   |
| `visited_pages`      | Array of strings |

### Attribution

| Field                 | Type   |
| --------------------- | ------ |
| `latest_utm_source`   | String |
| `latest_utm_medium`   | String |
| `latest_utm_campaign` | String |
| `latest_utm_term`     | String |
| `latest_utm_content`  | String |
| `latest_entry_path`   | String |
| `latest_exit_path`    | String |

### Audiences

| Field              | Type             |
| ------------------ | ---------------- |
| `active_audiences` | Array of strings |

## Key Behaviors

* **All data included** — Every available visitor field is sent in every request. Missing fields are set to `null` or empty arrays.
* **No deduplication** — Clay handles deduplication on their end. Every workflow trigger sends a request.
* **Flat structure** — Nested data (emails, phones) is sent both as shortcut fields (first value) and as full arrays.
* **Optional authentication** — If an auth token is configured, it is sent via the `x-clay-webhook-auth` header.
* **URL validation** — The webhook URL must start with `https://api.clay.com/` to prevent misconfiguration.

## Using with Workflows

1. Create a Clay table with a webhook source
2. Connect Clay in Midbound and paste the webhook URL
3. Create a workflow triggered by audience entry or new visit
4. All matching visitor data flows into your Clay table automatically

## Related

* [Integrations Overview](/docs/integrations/overview.md)


---

# Agent Instructions: 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 current page URL with the `ask` query parameter:

```
GET https://midbound.ai/docs/integrations/clay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
