Reads config/icp.json from the sales repo and searches Apollo with it, then removes everyone who appears as a recipient in recent Gmail drafts or sent mail. Writing twice to the same person is the one unrecoverable mistake in outreach - it costs the address and the reputation of the sending domain - so the exclusion happens here, before an agent spends a token on someone already in the pipe. Apollo returns a placeholder like [email protected] for contacts a plan has not revealed; those are dropped rather than passed on, since a draft addressed to one looks valid right up until it bounces. dry_run (default true) returns two sample leads with no API key attached.
Finds leads matching your ICP, researches each one, writes an email to the ones that deserve it, and leaves them in Gmail drafts. You open a draft and press send.
Nothing is ever sent without you.
Everything the engine knows lives in a GitHub repo. config/icp.json holds the Apollo filters — that is the targeting, versioned, so changing who you contact is a pull request. The skills say what makes a lead worth an email, what counts as a reason to write, and how outreach sounds.
Apollo answers "who matches the filters". It cannot tell you whether there is a reason to write, and that is the agent's job: it looks for a concrete, checkable fact about that company — a job posting, something they shipped — and drops the lead if it cannot find one. Expect it to drop several. A generic email costs the address permanently.
Every run opens a pull request with two folders: sent/ for the emails written, dropped/ for the companies it passed on and why. Merging it keeps the record the next run reads — so the engine stops re-researching the same company every week, and stops writing twice to the same person.
1. Add four resources in Windmill
2. Run init_sales_repo
Creates the repo with the skills and a starting ICP. Set dry_run: false to actually create it.
3. Check config/icp.json
Titles, countries, company sizes. This decides who gets contacted, so read it once before the first real run.
4. Run the sales_run flow
Set dry_run: false and go. You get drafts in Gmail and a pull request. Count on a few minutes: the agent researches each company before writing.
To make it weekly, enable the sales_run schedule — Monday morning.
Edit the ICP when the leads are wrong. Edit the skills when the emails are wrong: icp for who is worth writing to, research for what counts as a reason, voice and format-email for how it reads.
Read the drops, not just the emails. They are in the pull request with their reasons, and they tell you more about your targeting than the emails do. A run that drops everything usually means the ICP is too broad.
Merge the PR once you have sent the drafts. That is what keeps the memory: the next run reads it and leaves those companies alone.
Use Windmill AI sessions to change the engine itself — how many leads per run, what the agent is told, what gets recorded. Describe what you want and iterate from there.