Skip to main content

Run your first workflow

Job: take one real GTM record, run a workflow, and see whether Deepline returns useful enrichment before you scale to a list. Start with a prebuilt workflow. Write code only when you need custom routing, custom waterfalls, or scheduled automation.

Before you start

You need the Deepline CLI installed from the main Quick Start, plus an approved workspace.

1. Authenticate

deepline auth register
deepline auth status --json
You should see connected: true and the workspace you are using.

2. Inspect the workflow

Before running anything, ask Deepline what the workflow expects:
deepline plays describe prebuilt/person-linkedin-to-email --json
Look for required inputs and example output. If you are using Claude Code, ask it to summarize the schema in plain English.

3. Pilot one real record

Use a real lead you are allowed to enrich. Placeholder people may return no result.
deepline plays run prebuilt/person-linkedin-to-email \
  --input '{"linkedin_url":"https://www.linkedin.com/in/real-person/","first_name":"Jane","last_name":"Smith","company_name":"Acme","domain":"acme.com"}' \
  --watch
Good outcome: the run finishes and returns verified contact data or a clear no-result reason.

4. Scale to a list

Once one record looks right, move to a CSV-capable play and pilot a few rows:
head -n 4 leads.csv > /tmp/leads-pilot.csv

deepline plays run docs-examples/sdk-v2/lead-email-waterfall.play.ts \
  --csv /tmp/leads-pilot.csv \
  --watch

deepline runs export <run-id> --out /tmp/leads-pilot-enriched.csv
Inspect the output before running the full file.

5. Create a custom workflow

Use a custom workflow when your process has business logic:
  • search once a week and send new matches to Salesforce
  • run a different enrichment path for VPs vs directors
  • try providers in your preferred waterfall order
  • score accounts and export a chart
import { definePlay } from 'deepline';

type SearchInput = {
  query: string;
  owner_email: string;
};

export default definePlay('weekly-new-accounts', async (ctx, input: SearchInput) => {
  const search = await ctx.tools.execute({
    id: 'company_search',
    tool: 'test_rate_limit',
    input: { key: input.query },
    description: 'Find matching companies.',
  });

  const routing = {
    owner_email: input.owner_email,
    matched: search.status === 'SUCCESS',
  };

  return { routing };
});
Check custom workflow files before running them:
deepline plays check weekly-new-accounts.play.ts
This validates the workflow without starting a run.

Ask Claude Code

Read the Deepline SDK quickstart.
Inspect prebuilt/person-linkedin-to-email.
Pilot one real record.
If the output looks right, help me run a 3-row CSV pilot.
Do not run the full file until I review the pilot output.
Use plays check whenever Claude Code writes or edits a play. It catches SDK syntax and play-shape problems before money or time gets spent.