A workspace without Audiences
Run a real play on a Clay plan that can't query Audiences. A CSV trigger replaces the segment, suppression lists compile into code nodes, holdouts come from a CRM export, and results come back through the run export.
Blueprint: B02 closed-won lookalikes, no-Audiences variant.
Verification: verified on the twin with GW_SCENARIO=no-audiences, except gw export (details at the bottom).
Some Clay plans don’t include querying Audiences from the CLI, MCP or API. Most of the house doctrine assumes Audiences: segments as triggers, suppression segments, writebacks, holdout exports. Greenware has a buildable path without them, and every piece of it is a workflow primitive. Nobody builds a table by hand.
| With Audiences | Without Audiences |
|---|---|
Source: audience_scheduled over a segment |
Source: a csv_upload trigger fed a CRM export |
| Suppression: a segment or a suppression function | Suppression: gw client suppression lists, compiled into [GREENWARE] suppress: <name> code nodes |
Holdouts: gw client gold --audience |
Holdouts: gw client gold --csv |
| Output: written back to Audiences | Output: a [GREENWARE] result code node, pulled with gw export |
The raw idea
gw idea acme "lookalikes off a CSV of last quarter's closed-won, routed to AEs; we don't have Audiences on our plan" --id csv-01
Client setup this play needs
First let Greenware find out what the plan allows:
gw client refresh acme
# acme: Audiences unavailable on this Clay plan, so audience lists, record counts and field ids were skipped
# (This workspace's plan does not include querying Audiences from the CLI, MCP or API.) → clients/acme/workspace.json
Every stage reads that, so the planner knows to use CSV, suppression lists and the result node.
Suppression lists are the client’s do-not-reach data: customer domains, competitor domains, do-not-contact emails. One CSV each. The sample files are in examples/csv/.
gw client suppression acme customers --csv examples/csv/suppression-customers.csv --yes
gw client suppression acme competitors --csv examples/csv/suppression-competitors.csv --yes
gw client suppression acme dnc --csv examples/csv/suppression-dnc-emails.csv --yes
gw client suppression acme # lists what's saved
What happens on import:
- The column is found by its header (
domain,company domain,website,company website,url, oremail,email address,work email). Name another with--column. - Values are normalized (
https://www.Brightpath-Freight.example/→brightpath-freight.example,MAILTO:Jules@…→jules@…) and deduplicated. Rows with no usable value are counted and skipped: the sample customers file has one, and the output says so. - A person confirms the list, because every play will exclude it. At a terminal you’re asked; in a script, pass
--yes. Without either, nothing is saved and the command exits 1. - The list is saved to
clients/acme/suppression/<name>.csv, with the code node it becomes (<name>.py) beside it. The folder is gitignored: it’s client data. - Up to 10,000 entries per list. A code node has a 1-second limit; past that, split the list.
The generated node is plain set membership, no network:
# [GREENWARE] suppress: customers · 7 domains from suppression-customers.csv
# Generated by `gw client suppression`. Change the list there, then rebuild; never edit this node by hand.
SUPPRESSED = frozenset(["brightpath-freight.example","copperline-health.example", …])
def handler(context):
key = _norm(context.get_input("domain"))
return {"suppressed": key in SUPPRESSED, "key": key}
It matches the normalized domain exactly, so eu.brightpath-freight.example does not match brightpath-freight.example. If subdomains matter, ask at Gate A for a registrable-domain step before the node (field lesson 13), or list the subdomains.
Holdouts come from a CRM export:
gw client gold acme closed_won --csv examples/csv/gold-closed-won.csv
gw client gold acme known_bad --csv examples/csv/gold-known-bad.csv
Contact fields are dropped: owner_email in the sample doesn’t reach gold/closed_won.jsonl unless you pass --keep-contact.
What Clarify asks
The same questions as the Audiences version (hard ICP filters, competitor variant), with the closed-won definition and approver answered from the client’s files. See Closed-won lookalikes.
The plan waits for missing lists
If the plan needs a suppression list the client hasn’t saved, Plan stops and names the exact command. It doesn’t retry or guess:
acme/csv-01 Plan · waiting_human · The plan needs 1 suppression list acme hasn't saved: gw client suppression acme customers --csv <file>
Save the list and the play moves on to Gate A by itself, with no replan:
✓ clients/acme/suppression/customers.csv
Build turns it into a [GREENWARE] suppress: customers code node (clients/acme/suppression/customers.py).
acme/csv-01 had every list it needs: Gate A: review spec, contract and plan, then approve or reject
So the fast path is to save the lists before the idea, as in the setup above.
What Gate A should show
The plan’s ## Audiences table names a role and origin for every list:
| Role | Audience | Origin | Expected count |
|---|---|---|---|
| source | Closed-won accounts, last 45 days (CRM export) | csv: uploaded weekly | ~40 seeds |
| suppression | suppression/customers |
list: from gw client suppression | as saved |
| output | [GREENWARE] result | export: deliverables/results.csv | ~25 per seed |
And the function it would normally reuse is marked as not used, with the reason:
suppression_check (
t_suppress): not used. It reads the customer segment, which this plan can’t query; the factory’s customers list replaces it.
Check that node 4 is the suppression node, “the handler from suppression/customers.py, verbatim”, and that it sits before the first paid node.
The commands, in order
gw client refresh acme
gw client suppression acme customers --csv examples/csv/suppression-customers.csv --yes
gw client suppression acme competitors --csv examples/csv/suppression-competitors.csv --yes
gw client suppression acme dnc --csv examples/csv/suppression-dnc-emails.csv --yes
gw client gold acme closed_won --csv examples/csv/gold-closed-won.csv
gw idea acme "lookalikes off a CSV of last quarter's closed-won, routed to AEs; we don't have Audiences on our plan" --id csv-01
gw answer acme/csv-01 --defaults
gw show acme/csv-01
gw approve acme/csv-01 --gate A
gw approve acme/csv-01 --gate B
# each week, after you run the CSV trigger in Clay:
gw export acme/csv-01 # → plays/acme/csv-01/deliverables/results.csv
Running the CSV each week is your step, in Clay. gw clay workflows triggers csv run is a spend-class command, and gw clay lets people run reads and save [GREENWARE] audiences only. On the twin it refuses with stage_permission_denied (exit 77). Upload the week’s export to the published workflow’s CSV trigger in the Clay app. examples/csv/closed-won-seeds.csv shows the shape: one row per seed, with its domain and owner AE. Two things to know about CSV runs (from 01-clay-workflows-mechanics.md): a csv run executes the current draft, and it is not idempotent, so check the runs list before you rerun after a timeout.
gw export reads the runs back through Clay’s run export: one row per completed run with the [GREENWARE] result node’s output. --status picks which runs (default completed).
Cost levers
The same as the Audiences version, plus one: the suppression code nodes cost nothing per record, so every list you add is free exclusion before the first paid step.
Failure modes
| What you see | What it means | What to do |
|---|---|---|
Not saved: confirm with --yes. |
A script imported a list without confirming | Pass --yes once you’ve checked the count and the examples it printed |
… has no domain or email column |
The header isn’t one Greenware recognizes | --column "<header>" |
… more than a code node should hold (10000) |
The list is too big for one node | Split it into two lists |
| The plan waits on a list you thought you saved | The name differs (customer vs customers) |
Save it under the exact name the message prints |
gw export: no [GREENWARE] result node |
The play writes its results elsewhere (an Audiences play) | Read deliverables/README.md |
| Duplicate columns in the CSV collapse | Clay keeps the last column of a duplicated header | Dedupe headers in the export |
Verification
Verified on the twin (GW_SCENARIO=no-audiences, isolated factory): gw client refresh reported Audiences unavailable; gw idea then gw answer --defaults stopped at Plan waiting for the customers list; gw client suppression … without --yes exited 1 with “Not saved”; with --yes it saved 7 domains (1 row skipped) and the play moved to Gate A by itself; the competitors (3) and dnc (3 emails, 1 skipped) lists saved; gw client gold … --csv imported 6 and 5 rows with owner_email removed; both gates approved and the play finished. gw clay workflows triggers csv run was refused for a person (exit 77).
Not run: gw export. The twin has no recording for clay workflows runs export start, so it fails there. Also not run: a real CSV upload in Clay and real stage agents.