Skip to main content
Use Workflows when you want to build and edit Clay logic from an agent or terminal instead of the Clay UI.
Workflows are in Alpha. They are earlier and more experimental than Clay-managed functions and custom functions.

When to use this

  • Agent-first creation and editing in Claude Code, Codex, or Cursor.
  • CLI-based run, inspect, and debug loops.
  • Code inside the flow.
  • A flow created from a prompt, CSV, webhook, Audience, or existing Clay table.
  • Runs that avoid the 50,000 row limit.

1. Install the plugin

Clay plugin quickstart

Install the plugin and configure CLAY_API_KEY.

2. Create or open a Workflow

List existing Workflows:
clay workflows list
Create a new Workflow:
clay workflows create --name "Enrich target accounts"

3. Build and edit with an agent

Ask your agent to build the Workflow. The Clay plugin lets the agent read the Workflow, edit nodes, validate the graph, and test Clay actions before wiring them in. Example prompts:
Build a Workflow that takes a company domain, enriches company data, finds relevant sales leaders, and returns structured output for my CRM.
Turn this Clay table into a Workflow I can run in batches. Keep the same enrichment steps, but add a code step that filters out companies with fewer than 100 employees.

4. Run and inspect

Start a test run:
echo '{"domain":"clay.com"}' | clay workflows runs test wf_abc123 --input -
Fetch run status:
clay workflows runs get wf_abc123 wfr_abc123 --nodes
Inspect failed steps:
clay workflows runs steps wf_abc123 wfr_abc123 --status failed

5. Use snapshots

Use snapshots to inspect changes or restore an earlier Workflow state.
clay workflows snapshots list wf_abc123

Workflows (Alpha)

Learn the Workflow model and how it compares to functions.