Recommended CSV shape
Use a stable row key.
If your file has different column names, ask Claude Code to map your columns to this shape before running.
The play pattern
The workflow maps each row to an email step.Pilot it first
The play owns its CSV contract. A play that declaresinput.csv can be run with --csv. Reserved run flags such as --file keep their command meaning, so a play that declares input.file should be run with --input '{"file":"leads.csv"}'. This example reads rows with ctx.csv(input.csv).
/tmp/leads-pilot-enriched.csv. You want the original columns plus the email and validation columns added by the play.
Verify a tool contract before adding it
A tool name does not define its payload or response structure. Before you add a provider step, examine these items:- The live schema
- The price
- The connection state
- The result getters
- The limits
extract_js if the saved output structure is unknown. Examine the exported pilot. Then, add the smallest applicable extractor.
For a deepline enrich provider step, the extractor receives a wrapper. The raw tool output is under output_data.result. Do not assume that provider fields are at the wrapper root. A saved CSV cell can also include matched_result. Deepline adds this field after extraction. It is not an input to extract_js.
Use the getters from tools describe. Do not write a provider path if an applicable getter is available. If the getter does not match the pilot, keep the raw result. Report the contract difference. Do not scale the run until you know the output structure.
Choose pilot rows deliberately
Do not estimate a full list from the first account or from easy rows. Build a small representative pilot. Include input conditions that can change coverage or cost. Examples include geography, company size, available identifiers, and role seniority. Usedeepline billing balance --json before and after the pilot. Calculate the balance difference. A composed play can put provider charges in child runs. Thus, do not use only the parent run to measure cost.
Keep bulk data in files
Play input is for control parameters and file references. Do not pass a full spreadsheet as inline JSON through--input.
Use ctx.csv(input.csv) with a staged file path instead:
ctx.csv inputs. Deepline
automatically externalizes moderately large retry payloads between 100 KB and
1 MiB so runs can recover from platform retries, but row data should still live
in CSV files.
Run the full file
Why this matters
ctx.dataset makes every row resumable. If row 83 fails, you do not need to rerun the whole list blindly.
If a row is missing required input, keep it in the output and mark it for review instead of deleting it silently.
For scheduled refreshes, add a stale window: