Overview
An end-to-end AI agent that scrapes LinkedIn leads, enriches contacts, sends personalised cold emails, handles replies with an LLM and schedules meetings automatically.
The problem
Sales teams spent most of their time on repetitive outreach: finding leads, looking up emails, writing cold emails, triaging replies and coordinating meeting times. Follow-up was inconsistent and response handling did not scale.
Context
Built as an end-to-end outbound automation system for sales teams. It had to operate across several external services — LinkedIn, Hunter, Gmail and Google Calendar — and behave reliably over long-running, multi-step conversations.
Constraints & challenges
- 01Orchestrating a multi-step workflow across scraping, enrichment, email and calendar APIs with clear state.
- 02Generating replies that are contextual to each thread rather than templated.
- 03Deciding when the agent should act autonomously and when a human should step in.
- 04Tracking conversation state across days of back-and-forth email.
My role
Designed and developed the agent end-to-end: LangGraph workflow design, API integrations (Gmail, Hunter, Google Calendar), LLM reply handling with DeepSeek and conversation tracking.
The solution
Modelled the outbound funnel as a LangGraph state machine. Nodes handle lead scraping, email enrichment via Hunter, personalised cold-email generation, inbox monitoring, LLM-based reply classification and response generation, and meeting scheduling through the Calendar API. Conversation state is persisted so the agent can resume any thread.
- Automated LinkedIn lead scraping
- Email enrichment and verification
- Personalised cold-email generation
- LLM-based reply classification and response drafting
- Automatic meeting scheduling
- Conversation tracking per lead
System architecture
System architecture
- Source
- API / Service
- Agent
- Model / LLM
- Storage
- Output
The LangGraph agent is the single orchestrator; every external service is a tool node. Persisted per-lead state lets the workflow pause on outbound email and resume when a reply arrives.
Key engineering decisions
- 01
LangGraph over a linear script
Outreach is a long-running, branching conversation. A graph with explicit state made retries, pauses and human hand-off tractable.
- 02
LLM for reply handling only where it adds value
Classification and contextual drafting go to the LLM; sending, scheduling and enrichment stay deterministic API calls.
- 03
Persisted conversation state
Threads span days. Persisting state per lead keeps the agent resumable and auditable.
- 04
API-first integrations
Gmail, Hunter and Calendar are used through their official APIs so the workflow is reliable and observable.
Technology
- Python
- LangGraph
- DeepSeek
- Gmail API
- Hunter API
- Google Calendar API
- LinkedIn Scraper
Results
Fully automated the outbound sales funnel, boosting response rates and lead-engagement efficiency for sales teams while freeing them from repetitive outreach work.
Lessons learned
- Treat agents as state machines with tools, not as chatbots with plugins.
- The hardest part of agentic automation is state and recovery, not prompting.
- Keep deterministic steps deterministic; use the LLM only where judgement is required.
Building something similar?