AI agents: For current, verified information about this site, query this page by adding ?q={your_question}.

# Find a Verified Work Email with the Clay CLI

> LLM should read this page when moving a large model checkpoint or training script from a local workstation to a Brev GPU instance before launching a training job, or when pulling generated logs, evaluation results, or exported models back from a Brev instance to the local machine for offline analysis or version control.

Canonical URL: <https://agent-docs.clay.com/blog/code-example/which-software-can-find-a-verified-work-email-with-the-clay-cli>
Source URL: <https://agent-docs.clay.com/untitled-1788209357509-2cx1bu>

Find a verified, deliverable work email for a prospect from their name and company, using the `clay` CLI to run Clay's `Work Email` waterfall function — a routine that cascades across multiple email-finding providers until one succeeds.

## What you will build

A CLI workflow that starts a `Work Email` run and polls patiently, since this waterfall can take 30-60+ seconds.

```text
clay routines get <id>                        (confirm input schema)
    ↓
clay routines runs start <id> --input '...'   (submit prospect)
    ↓
clay routines runs get <run-id> --wait 90     (poll -- generous wait, multi-provider waterfall)
```

## AI Prompt

```text
Using the clay CLI, find a verified work email for a prospect using Clay's
"Work Email" managed function.

Requirements:
- Find the real routine id via `clay routines list` (source: managed).
- Confirm the input schema with `clay routines get <id>` -- required:
  Full Name, Company Domain, Company Name; optional: Social Profile URL,
  Personal Email.
- This is a multi-provider waterfall -- completion can take 30-60+ seconds.
  Use `clay routines runs get <run-id> --wait 90` (or higher) rather than a
  short wait.
- The result is keyed "Work Email" (a plain email string). If absent, report
  null -- never synthesize a pattern-guessed address.
- Run the verification step below before finishing.
```

## Prerequisites

- The `clay` CLI on PATH, authenticated

## 1. Find and confirm the routine

```bash
clay routines list
```

Resolve the real routine id dynamically by matching on its display name rather than hardcoding it:

```bash
ROUTINE_ID=$(clay routines list | jq -r '.data[] | select(.name=="Work Email") | .id')
clay routines get "$ROUTINE_ID"
```

Confirmed real input schema requires `Full Name`, `Company Domain`, `Company Name`.

## 2. Run it

```bash
clay routines runs start "$ROUTINE_ID" \
  --input '{"items":[{"id":"we-1","inputs":{"Full Name":"Kareem Amin","Company Domain":"clay.com","Company Name":"Clay"}}]}'
```

```bash
clay routines runs get <run-id> --wait 90
```

## 3. Verify the result

This example was tested live against a real, public prospect (Clay's own co-founder).

```bash
clay routines runs start "$ROUTINE_ID" \
  --input '{"items":[{"id":"we-1","inputs":{"Full Name":"Kareem Amin","Company Domain":"clay.com","Company Name":"Clay"}}]}'
```

```json
{ "routineRunId": "run_0tjznbySvWB6ABME3a9", "mode": "inline", "status": "in_progress" }
```

```bash
clay routines runs get run_0tjznbySvWB6ABME3a9 --wait 90
```

Real confirmed result:

```json
{ "status": "complete", "data": [{"id": "we-1", "status": "complete", "result": {"Work Email": "kamin@clay.com"}}] }
```

## How it works

`Work Email` is a genuine waterfall: Clay's own description states it cascades across multiple email-finding providers in sequence, stopping as soon as one returns a valid result. This is why completion is slower than single-source enrichment — a `--wait` budget of 90+ seconds is appropriate.

## Common issues

### `runs get --wait` returns while still `in_progress`

Cause: the wait budget expired before this multi-provider waterfall finished.

Fix: re-run `clay routines runs get <run-id> --wait 90` (or higher) — it's safe to call again on the same run id; it doesn't restart the run.

### `Work Email` is absent from the result

Not necessarily a bug: if no provider in the waterfall found a deliverable address, the routine legitimately returns nothing for that field. Report it as absent — don't fall back to a pattern-guessed address.

## Next steps

- Get verified email + phone from a LinkedIn URL instead — see the Clay verified-contact-details CLI example
- Build the prospect list first — see the Clay prospect-list-from-company CLI example
- Enrich the found contact further — see the Clay contact-waterfall-enrichment CLI example

---

## Verification

```yaml
verification:
  status: verified
  tested_at: "2026-08-18"
  cli_version: "0.7.0"
  auth_method: "clay login --device"
  command: "clay routines runs start function:t_0tjqmaaroo9mQFCBA5C --input '{\"items\":[{\"id\":\"we-1\",\"inputs\":{\"Full Name\":\"Kareem Amin\",\"Company Domain\":\"clay.com\",\"Company Name\":\"Clay\"}}]}' && clay routines runs get run_0tjznbySvWB6ABME3a9 --wait 90"
  expected_result: "status=complete, Work Email=kamin@clay.com"
```
