How to Build an Apify Lead Generation Workflow
Turn an Apify Actor dataset into a recurring, enriched, deduplicated, and reviewable GTM workflow without losing source evidence.
Apify is powerful for finding structured data on the web. A production lead-generation workflow needs more than an Actor run: it needs a stable schema, deduplication, enrichment, validation, acceptance rules, review states, and a safe destination.
Apify's official platform documentation supports running Actors programmatically, reacting to events with webhooks, and connecting Actor output to AI agents and workflow tools. gtmcli uses that output as the source for an editable GTM workflow.
The architecture
Apify Actor
↓ dataset + source URLs
gtmcli table
↓ normalize + deduplicate
company and people enrichment
↓ email/mobile + validation
code-column ICP score
↓ approval queue
CRM or sequencerStep 1: choose a defensible source
Start with a website, directory, marketplace, or public surface that is relevant to the use case. Review the source's terms, access controls, personal-data implications, and the Actor's own documentation. Technical accessibility is not the same as permission.
- Prefer a source that exposes stable company identifiers or domains.
- Preserve the source URL and collection time for every row.
- Test how pagination, missing fields, duplicates, and rate limits behave.
Step 2: test the Actor on a small run
Run enough records to expose schema variation without creating a costly cleanup problem. Inspect the raw dataset before adding enrichment. Save the exact Actor input that produced the test.
Step 3: define the row contract
Map raw fields into a stable set of company name, domain, source URL, source category, source location, collected-at timestamp, and source-specific evidence. Keep the raw identifier so you can trace or replay a record.
Step 4: deduplicate before enrichment
Do not pay to enrich the same company repeatedly. A domain is often the best company key, but marketplace listings and local businesses may need a composite key. Decide how subsidiaries, franchises, and multiple locations should behave.
Step 5: enrich only what changes the decision
Attach company context, identify relevant people, find a contact path, and validate the result. Every field should answer a qualification or routing question. Decorative fields increase cost and maintenance without improving the decision.
Step 6: score transparently
Use a code column or model step for fit, but keep the inputs and thresholds visible. A useful score can explain why a record passed. Avoid using a model to infer sensitive traits or make high-impact decisions about people.
score = industry_fit * 30
+ employee_fit * 25
+ geography_fit * 15
+ source_signal * 20
+ contactability * 10Step 7: add a review gate
The workflow can prepare a CRM import or sequencer audience without launching it. Route ambiguous records, catch-all emails, uncertain matches, and policy exceptions into a visible review queue.
Step 8: schedule the complete system
Once the pilot is stable, choose a cron schedule or webhook trigger. Add a maximum row count, retry limit, idempotency key, duplicate rule, alert condition, and kill switch before the first unattended run.
Metrics to watch
- New unique companies per Actor run
- Percentage mapped without manual repair
- Company and person enrichment match rate
- Verified contact rate and catch-all share
- Accepted records per dollar and per operator hour
- Duplicate, policy-exception, and failed-run rate
Build it with an agent
A coding agent can inspect the Actor schema, configure mappings, write transformations, add code-column scoring, and prepare the schedule. The operator should still approve source rules, acceptance criteria, and downstream writes.
Run my saved Actor every Tuesday. Deduplicate by domain, enrich companies and VP contacts, validate work emails, score ICP fit, and queue scores above 85 for review. Never launch outreach automatically.
Sources and next steps
Review Apify's official lead-generation use case.
Read Apify's current integration documentation.
See the gtmcli Apify integration and build the governed workflow around the Actor.