Core Engine

Outbound Engine

The outbound engine is the autonomous pipeline that runs every day at 6 AM IST without any manual intervention. It's the core of LeadOS.

Daily run flow

Step 1

Check plan limits

Verify Apollo credits remaining, daily cap by plan, and available prospect pool slots. Sets pullLimit = min(config, planCap, apolloRemaining, 500).

Step 2

Prospect via Apollo

Pulls contacts from your saved ICP search. Checks the DynamoDB cache first — never re-fetches a contact already in the system. Records Apollo credit spend.

Step 3

Add to leads

Deduplicates against your existing pipeline (by email). Scores each contact on 4 dimensions. Persists new leads to PostgreSQL.

Step 4

AI research

Fetches the company website (up to 3,000 characters). Claude generates: company summary, pain point, reason to buy, outreach angle. Saved as a research brief on the lead.

Step 5

Enroll in sequence

Enrolls each lead in your configured sequence (or auto-creates the default 4-step sequence). Sets nextSendAt based on the first step delay.

Step 6

Send emails

Processes all sequence steps due now. If a step body contains {{ai_personalize}}, Claude writes a custom first line using the research brief. Sends via connected mailbox → fallback to SES.

Step 7

Log the run

Saves a run record: prospectsFound, added, researched, enrolled, emailsSent. Visible in the run history table on the Outbound page.

Default 4-step sequence

StepDaySubjectAngle
10Quick idea for {{companyName}}AI-personalized first line from research brief
23Following up — {{companyName}}Gentle bump, reference step 1
37One more thoughtLoom video offer or case study
414Should I close the loop?Breakup email — respects their time

Daily caps by plan

PlanNew contacts/day
Starter3
Growth10
Scale25
Enterprise100

Apollo credit safety

Before any Apollo API call, LeadOS runs assertCanSpend() — if you're at your monthly or daily budget, the call is blocked and the run skips gracefully. Credits are logged after every successful call. Monthly budgets reset on the 1st of each month.

Trigger a manual run

On the Outbound page, click Run Now at any time. This triggers the same full pipeline as the scheduled 6 AM run, respecting the same daily cap. Useful for testing or catching up after a pause.

Run history

The Outbound page shows a table of all past runs with: date, prospectsFound, prospectsAdded, researched, enrolled, emailsSent. Click any run to open the run detail modal with per-step logs.