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
Check plan limits
Verify Apollo credits remaining, daily cap by plan, and available prospect pool slots. Sets pullLimit = min(config, planCap, apolloRemaining, 500).
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.
Add to leads
Deduplicates against your existing pipeline (by email). Scores each contact on 4 dimensions. Persists new leads to PostgreSQL.
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.
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.
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.
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
| Step | Day | Subject | Angle |
|---|---|---|---|
| 1 | 0 | Quick idea for {{companyName}} | AI-personalized first line from research brief |
| 2 | 3 | Following up — {{companyName}} | Gentle bump, reference step 1 |
| 3 | 7 | One more thought | Loom video offer or case study |
| 4 | 14 | Should I close the loop? | Breakup email — respects their time |
Daily caps by plan
| Plan | New contacts/day |
|---|---|
| Starter | 3 |
| Growth | 10 |
| Scale | 25 |
| Enterprise | 100 |
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.