Build a Lead Generation & Outreach Agent
Level 4, Step 4.5 β Learning Path. Prerequisites: Human in the Loop, Structured Output.
This is one of the highest-value projects you can build with CiniterFlow. It directly generates revenue by automating the most time-consuming part of sales β researching prospects and writing personalized outreach emails.
What You'll Buildβ
A lead outreach system that:
- Takes a list of prospect companies or contacts
- Researches each prospect using web search
- Generates personalized outreach emails based on the research
- Presents each email for human approval before sending
- Processes prospects in batch using iteration
Why This Mattersβ
A sales rep spends 2-3 hours per day researching prospects and writing emails. This agent does the same work in minutes, and the emails are often better because they're informed by real-time web research.
The Architectureβ
Start (Form: prospect list) β LLM (parse list into structured data)
β Iteration (for each prospect)
β Agent (research prospect with web search)
β LLM (generate personalized email)
β Human Input (review all emails)
β Iteration (send approved emails)
β Tool (Gmail/SendGrid)
Step 1: Create the Flowβ
- Create a new Agentflow named "Lead Outreach Agent"
- Configure the Start node:
- Input Type: Form Input
- Form Title: "Prospect Outreach"
- Form Description: "Enter prospect details for personalized outreach"
- Form Inputs:
- Label: "Prospects", Variable:
prospects, Type: String (textarea) - Label: "Your Product/Service", Variable:
product, Type: String - Label: "Outreach Goal", Variable:
goal, Type: String
- Label: "Prospects", Variable:
- Flow State:
prospectList: ""emails: ""
The user will enter prospects like:
1. John Smith, CTO at TechCorp (john@techcorp.com)
2. Sarah Lee, VP Marketing at GrowthCo (sarah@growthco.com)
3. Mike Chen, Head of Operations at ScaleUp (mike@scaleup.io)
Step 2: Parse Prospects into Structured Data (LLM Node)β
Model: GPT-4o-mini (cheap, fast β just parsing text)
System Message:
You are a data parser. Extract prospect information from the user's input into a structured format. Handle various input formats gracefully.
Input Message:
Parse the following prospect list into structured data:
{{ $form.prospects }}
JSON Structured Output:
- Key:
prospects, Type: JSON Array - Schema:
{
"name": { "type": "string", "description": "Full name of the prospect" },
"title": { "type": "string", "description": "Job title" },
"company": { "type": "string", "description": "Company name" },
"email": { "type": "string", "description": "Email address" }
}
Update Flow State: prospectList β {{ output.prospects }}
Step 3: Research Each Prospect (Iteration + Agent)β
Iteration Nodeβ
- Array Input:
{{ $flow.state.prospectList }}
Agent Node (inside iteration)β
Model: GPT-4o-mini
System Message:
You are a sales research assistant. Your job is to research a prospect and their company to find information that will help personalize a sales outreach email.
Look for:
- What the company does and their recent news
- The prospect's role and likely responsibilities
- Pain points the company might have that our product could solve
- Any recent achievements, funding rounds, or announcements
- Shared connections or interests
Keep your research summary concise β 3-5 bullet points of the most useful findings.
Tools:
- Google Custom Search (or Serper): For web research
- Web Scraper: To read company websites and LinkedIn profiles
Input Message:
Research this prospect for a sales outreach:
- Name: {{ $iteration.name }}
- Title: {{ $iteration.title }}
- Company: {{ $iteration.company }}
Our product/service: {{ $form.product }}
Our outreach goal: {{ $form.goal }}
Find information that will help us write a personalized, relevant outreach email.
Step 4: Generate Personalized Email (LLM Node, inside iteration)β
Model: GPT-4o (use the better model for the actual email β this is the output that matters)
System Message:
You are an expert sales copywriter. Write personalized outreach emails that feel genuine, not templated.
Rules:
1. Open with something specific to the prospect (a recent achievement, news, or shared interest)
2. Connect their situation to how our product/service can help
3. Keep it under 150 words β busy executives don't read long emails
4. End with a clear, low-commitment call to action (e.g., "Would a 15-minute call next week make sense?")
5. Tone: Professional but warm. Never salesy or pushy.
6. Never use phrases like "I hope this email finds you well" or "I wanted to reach out"
Subject line: Make it specific and curiosity-inducing. Never generic.
Input Message:
Write a personalized outreach email for:
Prospect: {{ $iteration.name }}, {{ $iteration.title }} at {{ $iteration.company }}
Email: {{ $iteration.email }}
Research findings:
{{ agentAgentflow_0 }}
Our product/service: {{ $form.product }}
Our goal: {{ $form.goal }}
JSON Structured Output:
subject(string): "Email subject line"body(string): "Email body"recipientEmail(string): "Recipient email address"recipientName(string): "Recipient name"
Step 5: Review All Emails (Human Input)β
After the iteration completes, add a Human Input node:
- Description Type: Dynamic
- Prompt: "Present all the generated outreach emails for review. Show each email with the recipient name, subject line, and body. Ask the reviewer to approve or request changes."
- Enable Feedback: Yes
This pauses the flow and lets a human review every email before anything is sent.
If rejected β Loop back to the email generation step with feedback If approved β Continue to sending
Step 6: Send Approved Emails (Iteration + Tool)β
Second Iteration Nodeβ
- Array Input: The approved emails from the previous step
Tool Node (inside iteration)β
- Tool: Gmail (or SendGrid for higher volume)
- Action: Send Message
- Input Arguments:
to:{{ $iteration.recipientEmail }}subject:{{ $iteration.subject }}body:{{ $iteration.body }}
Testingβ
- Start the flow with 2-3 test prospects (use your own email addresses for testing!)
- Enter your product description and outreach goal
- Watch the agent research each prospect
- Review the generated emails β are they personalized? Relevant? Professional?
- Approve and verify emails are sent correctly
Example Inputβ
Prospects:
1. Lisa Park, VP of Engineering at DataFlow Inc (lisa@dataflow.io)
2. James Wilson, Head of AI at CloudScale (james@cloudscale.com)
Product/Service:
CiniterFlow β a visual platform for building AI agents without code. Helps companies automate customer support, data processing, and internal workflows.
Outreach Goal:
Book a 15-minute demo call to show how they can build AI agents for their team.
Tips for Productionβ
- Start small: Test with 5-10 prospects before scaling up
- Personalization is everything: The research step is what makes these emails effective. Give the research agent good tools and clear instructions
- A/B test subject lines: Try different styles and track open rates
- Respect sending limits: Gmail has daily sending limits. For high volume, use SendGrid or a dedicated email service
- Track responses: Create a follow-up flow that handles replies
- Compliance: Make sure your outreach complies with CAN-SPAM, GDPR, or other relevant regulations. Include an unsubscribe option
Taking It Furtherβ
- Add a CRM integration (HubSpot, Airtable) to log outreach and track responses
- Build a follow-up agent that sends a second email if no response after 3 days
- Add LinkedIn research via web scraping for deeper personalization
- Create a scoring system that prioritizes high-value prospects
- Build a response handler that classifies replies (interested, not interested, out of office) and routes accordingly