AI & Workflow Automation · Sales
From Prospect Search to Campaign-Ready Contact Data
I implemented a sales workflow automation backend that turns prospect searches into enriched, AI-prepared contact data, with tracked processing stages and human controls.
Overview
One coordinated path from search to delivery
I built this completed SaaS backend for a sales-focused client. The workflow takes an Apollo prospect search through contact retrieval, email verification and enrichment, AI-assisted data preparation, and downstream delivery.
Authenticated users can start and monitor background work, receive structured CSV or JSON output, send eligible contacts to a selected outbound campaign, or pass results to another system by webhook.
The challenge
Prospect data needs preparation and a dependable handoff
Preparing prospect data involves more than retrieving a list. Contact records may lack usable email addresses, fields may need consistent formatting, greetings may need to match a chosen language, and finished data still has to reach a file, campaign platform, or another business system.
The solution also had to support long-running work, external API failures, account-level access, optional integrations, and different output destinations.
The solution
Tracked stages instead of disconnected tasks
I implemented an account-based application that manages the workflow as a sequence of processing stages. It estimates search size, checks the account balance, requests confirmation for large jobs, and queues retrieval. Contact records are stored, verified or enriched where applicable, then prepared in batches with OpenAI.
The same workflow creates CSV and JSON outputs. Optional paths send eligible contacts to Smartlead or Instantly or post results to a configured webhook. Separate status fields expose retrieval, enrichment, and AI processing.
How it works
From prospect source to chosen destination
- 01
Configure sources and destinations
An authenticated user connects Apollo and can optionally configure Smartlead, Instantly, and a destination webhook.
- 02
Define the job
The user supplies an Apollo search URL, selects one of six greeting languages, and chooses optional campaign or webhook destinations.
- 03
Review before processing
The backend requests a contact estimate, checks available funds, and pauses large requests for explicit confirmation.
- 04
Retrieve in the background
A worker processes contact pages, saves structured records, and updates job status while the application remains available.
- 05
Improve contact completeness
The workflow applies email verification and can route records without email addresses through an enrichment service.
- 06
Prepare data with AI
Batched OpenAI processing normalizes selected fields and generates language-appropriate salutations. Parsed results are validated before records are updated.
- 07
Deliver the output
The backend generates CSV and JSON files and can hand eligible contacts to Smartlead or Instantly or post results to a webhook.
- 08
Keep a human in control
Users can monitor each stage and cancel pending or running work; administrators have role-restricted operational controls.
What I delivered
Accounts, integrations, processing, and outputs
- Authenticated user accounts and password recovery.
- Per-user contact jobs, records, balances, and processing states.
- Apollo search interpretation, estimation, and queued contact retrieval.
- Email verification and missing-email enrichment paths.
- Batched AI-assisted normalization and salutations in English, French, Dutch, Italian, Spanish, and German.
- Downloadable CSV and JSON output.
- Optional Smartlead, Instantly, and webhook delivery.
- Status views, cancellation, large-job confirmation, and administrator controls.
- Account funding through Stripe and transactional notifications through SendGrid.
- A PostgreSQL-backed Flask application with Gunicorn configuration and a health endpoint.
Reliability and human oversight
Controls around long-running and external work
Large requests require confirmation before queuing. Users can see separate processing states and cancel pending or running work, while an administrator-only view supports inspection and intervention. Dashboard actions require login, records are checked against their owner, and administrative actions require an admin role.
Passwords are hashed, reset links expire, and Stripe callbacks use signature verification. Jobs use explicit states and timestamps; external calls include error paths; and database connections are checked before use. AI results are cleaned, parsed, mapped to expected fields, and validated before updates. Campaign handoffs preserve block-list, unsubscribe, bounce-list, and duplicate protections.
Results and operational impact
Delivered operational capabilities
Six connected business services
Apollo, OpenAI, ZeroBounce, FullEnrich, Smartlead, and Instantly participate directly in contact sourcing, preparation, and outbound delivery.
Six salutation languages
The AI-assisted preparation stage supports English, French, Dutch, Italian, Spanish, and German.
Four output paths
Completed data can be delivered as CSV, JSON, a selected outbound campaign, or a configured webhook.
Visible processing stages
Retrieval, enrichment, and AI preparation have separate statuses rather than appearing as one black box.
Background retrieval
Long-running contact retrieval moves through a queue while the main application remains available.
Human checkpoints
Large-job confirmation, cancellation, optional destinations, and administrator intervention remain explicit controls.
Technology choices
A focused backend for connected sales work
- Python and Flask provide the account, workflow, payment, and integration routes.
- PostgreSQL with SQLAlchemy persists users, jobs, contacts, balances, and processing states.
- OpenAI supports batched, language-aware contact preparation.
- Apollo, ZeroBounce, and FullEnrich cover prospect retrieval, verification, and missing-email enrichment.
- Smartlead and Instantly provide direct outbound campaign handoffs.
- Stripe and SendGrid support account funding and transactional notifications.
- Gunicorn is the configured application server for the Flask service.