Skip to content

bitsandbrains/ai-outreach-automation-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿท๏ธ Project Title

AI Outreach Automation Platform


๐Ÿงพ Executive Summary

The AI Outreach Automation Platform is a modular, workflow-driven system built on n8n that automates the entire B2B outreach lifecycle. It covers lead acquisition, AI-driven personalization, outbound LinkedIn and email outreach, connection engagement, and intelligent reply handling.

The system integrates Apollo, Apify, OpenAI, SerpAPI, Unipile, Google Sheets, Gmail, and PostgreSQL to deliver scalable, compliant, and human-like outreach automation.


๐Ÿ“‘ Table of Contents

  • ๐Ÿงฉ Project Overview
  • ๐ŸŽฏ Objectives & Goals
  • โœ… Acceptance Criteria
  • ๐Ÿ’ป Prerequisites
  • โš™๏ธ Installation & Setup
  • ๐Ÿ”— API Documentation
  • ๐Ÿ–ฅ๏ธ UI / Frontend
  • ๐Ÿ”ข Status Codes
  • ๐Ÿš€ Features
  • ๐Ÿงฑ Tech Stack & Architecture
  • ๐Ÿ› ๏ธ Workflow & Implementation
  • ๐Ÿงช Testing & Validation
  • ๐Ÿ” Validation Summary
  • ๐Ÿงฐ Verification Tools
  • ๐Ÿงฏ Troubleshooting & Debugging
  • ๐Ÿ”’ Security & Secrets
  • โ˜๏ธ Deployment
  • โšก Quick-Start Cheat Sheet
  • ๐Ÿงพ Usage Notes
  • ๐Ÿง  Performance & Optimization
  • ๐ŸŒŸ Enhancements & Features
  • ๐Ÿงฉ Maintenance & Future Work
  • ๐Ÿ† Key Achievements
  • ๐Ÿงฎ High-Level Architecture
  • ๐Ÿ—‚๏ธ Project Structure
  • ๐Ÿงญ How to Demonstrate Live
  • ๐Ÿ’ก Summary, Closure & Compliance

๐Ÿงฉ Project Overview

This platform automates outbound sales and partnership outreach using AI and workflow orchestration. Each phase is isolated into its own workflow, ensuring fault tolerance, scalability, and auditability.


๐ŸŽฏ Objectives & Goals

  • Automate lead sourcing from Apollo
  • Generate highly personalized messages using AI
  • Send LinkedIn invites and emails programmatically
  • Track outreach state across systems
  • Respond intelligently to inbound LinkedIn messages

โœ… Acceptance Criteria

CriteriaCondition
Lead CreationLeads stored in Google Sheets
PersonalizationAI icebreakers generated
OutreachLinkedIn & email sent
TrackingStatus updated in Sheets & DB
Reply HandlingAI replies logged and sent

๐Ÿ’ป Prerequisites

  • n8n (self-hosted or cloud)
  • Google Workspace account
  • Apollo.io account
  • Apify API token
  • Unipile LinkedIn API access
  • OpenAI API key
  • PostgreSQL database

โš™๏ธ Installation & Setup

  1. Clone repository
  2. Configure environment variables
  3. Import workflows into n8n
  4. Configure credentials
  5. Activate workflows sequentially

๐Ÿ”— API Documentation

This system relies on a tightly integrated set of third-party APIs. Each API serves a distinct, isolated responsibility within the outreach lifecycle. All integrations are orchestrated via n8n using secure credentials and scoped permissions.

API Integration Matrix

API / Service Purpose Workflow Phase Data In Data Out
Apollo API Lead discovery & filtering 01 โ€“ Lead Acquisition ICP criteria Company & profile URLs
Apify API Profile & data scraping 01 โ€“ Lead Acquisition Apollo URLs Structured lead data
SerpAPI Public web research 02 โ€“ AI Personalization Name, company Contextual insights
OpenAI API AI personalization & replies 02, 03, 05 Context prompts Structured messages
Unipile API LinkedIn automation 03, 04, 05 Profile ID, message Delivery status
Gmail API Email outreach 03 โ€“ Outbound Outreach Email content Send confirmation

๐Ÿ–ฅ๏ธ UI / Frontend

This system is backend-driven. Google Sheets acts as the operational UI:

  • Lead visibility
  • Status tracking
  • Audit and compliance review

๐Ÿ”ข Status Codes

  • LN_invitationSent: YES / NO
  • LN_invitationAccepted: YES / NO
  • EmailSent: YES / NO
  • LN_noofmessages: Integer

๐Ÿš€ Features

  • End-to-end automated B2B outreach lifecycle
  • AI-driven lead research and contextual personalization
  • Multi-channel execution (LinkedIn + Email)
  • Human-like randomized delays to reduce automation risk
  • Stateful lead and conversation tracking
  • Webhook-driven real-time engagement handling
  • Structured AI outputs with deterministic parsing
  • Audit-ready logging using Google Sheets and PostgreSQL

Feature-to-Workflow Mapping

Feature Workflow
Lead sourcing 01-lead-acquisition
AI icebreakers 02-ai-personalization
LinkedIn & email outreach 03-outbound-outreach-execution
Auto first message 04-connection-engagement
AI reply bot 05-ai-reply-bot

๐Ÿงฑ Tech Stack & Architecture

Technology Stack

  • Workflow Orchestration: n8n
  • AI / LLM: OpenAI
  • Lead Intelligence: Apollo, Apify
  • Research: SerpAPI
  • LinkedIn Automation: Unipile
  • Email: Gmail API
  • Data Store: Google Sheets, PostgreSQL

ASCII Component Architecture

User / Scheduler
      |
      v
+------------------+
|      n8n         |
| Orchestration    |
+------------------+
      |
      +--> Apollo ----> Apify
      |
      +--> SerpAPI
      |
      +--> OpenAI
      |
      +--> Unipile ---> LinkedIn
      |
      +--> Gmail
      |
      +--> Google Sheets
      |
      +--> PostgreSQL

๐Ÿ› ๏ธ Workflow & Implementation

Sequential Execution Flow

  1. User triggers lead acquisition or scheduler initiates workflow
  2. Apollo URL generation based on ICP
  3. Apify scrapes qualified leads
  4. Leads stored and indexed in Google Sheets
  5. AI research enrichment using SerpAPI
  6. Icebreaker and outreach message generation via OpenAI
  7. LinkedIn invite and email sent via Unipile and Gmail
  8. Status updates written back to Sheets
  9. Webhooks handle acceptance and inbound messages
  10. AI reply bot generates controlled responses

๐Ÿงช Testing & Validation

IDAreaExpected Output
T01Lead FetchRows in Sheets
T02AI OutputIcebreakers
T03OutreachInvite Sent

๐Ÿ” Validation Summary

All workflows execute deterministically, with retries, logging, and validation gates.


๐Ÿงฐ Verification Testing Tools & Command Examples

  • n8n execution logs
  • Google Sheets audit
  • PostgreSQL queries

๐Ÿงฏ Troubleshooting & Debugging

Issue Cause Resolution
Leads not appearing Apify failure Check API quota & input URLs
LinkedIn invites not sent Unipile auth expired Reauthorize LinkedIn provider
AI output malformed Prompt drift Review structured output parser
Workflow stuck Wait node misconfig Validate randomizer bounds

๐Ÿ”’ Security & Secrets

  • No credentials committed
  • Environment-based secret injection
  • Scoped API access

โ˜๏ธ Deployment

  • n8n deployed via Docker or managed cloud
  • Environment variables injected securely
  • Optional dashboard hosted on Vercel
  • Webhooks exposed via HTTPS

โšก Quick-Start Cheat Sheet

  • Import all workflows into n8n
  • Configure credentials (Apollo, OpenAI, Unipile)
  • Set Google Sheets IDs
  • Activate workflows in numeric order

๐Ÿงพ Usage Notes

  • Keep LinkedIn invite volume conservative
  • Warm email domains before outreach
  • Review AI replies weekly

๐Ÿง  Performance & Optimization

  • Batch lead processing
  • Limit AI calls per lead
  • Use conditional branching to skip processed leads

๐ŸŒŸ Enhancements & Features

  • CRM synchronization
  • A/B testing of AI messages
  • Multi-account LinkedIn rotation

๐Ÿงฉ Maintenance & Future Work

  • Prompt tuning lifecycle
  • Workflow versioning
  • Compliance auto-checks

๐Ÿ† Key Achievements

  • Fully automated AI outreach system
  • Human-like, compliant execution
  • Enterprise-grade observability

๐Ÿงฎ High-Level Architecture

Trigger
  โ†“
Lead Acquisition
  โ†“
AI Personalization
  โ†“
Outbound Outreach
  โ†“
Connection Engagement
  โ†“
AI Reply Bot
  โ†“
Audit & Storage

๐Ÿ—‚๏ธ Project Structure

AI-OUTREACH-AUTOMATION/
โ”œโ”€โ”€ config/
โ”‚   โ”œโ”€โ”€ .env.example
โ”‚   โ”œโ”€โ”€ credentials.example.json
โ”‚   โ””โ”€โ”€ n8n-settings.example.json
โ”œโ”€โ”€ diagrams/
โ”‚   โ”œโ”€โ”€ 01-lead-acquisition/
โ”‚   โ”‚   โ”œโ”€โ”€ workflow-lead-acquisition-1.png
โ”‚   โ”‚   โ”œโ”€โ”€ workflow-lead-acquisition-2.png
โ”‚   โ”‚   โ””โ”€โ”€ workflow-lead-acquisition-3.png
โ”‚   โ”œโ”€โ”€ 02-ai-personalization/
โ”‚   โ”œโ”€โ”€ 03-outbound-outreach-execution/
โ”‚   โ”œโ”€โ”€ 04-connection-engagement/
โ”‚   โ””โ”€โ”€ 05-ai-reply-bot/
โ”œโ”€โ”€ workflows/
โ”‚   โ”œโ”€โ”€ 01-lead-acquisition/
โ”‚   โ”œโ”€โ”€ 02-ai-personalization/
โ”‚   โ”œโ”€โ”€ 03-outbound-outreach-execution/
โ”‚   โ”œโ”€โ”€ 04-connection-engagement/
โ”‚   โ””โ”€โ”€ 05-ai-reply-bot/
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ architecture-overview.md
โ”‚   โ”œโ”€โ”€ workflow-lifecycle.md
โ”‚   โ”œโ”€โ”€ data-model.md
โ”‚   โ”œโ”€โ”€ setup-guide.md
โ”‚   โ”œโ”€โ”€ security-compliance.md
โ”‚   โ”œโ”€โ”€ limitations-and-risk.md
โ”‚   โ””โ”€โ”€ compliance-and-usage.md
โ”œโ”€โ”€ CONTRIBUTING.md
โ””โ”€โ”€ README.md

๐Ÿงญ How to Demonstrate Live

  1. Trigger lead acquisition
  2. Show sheet population
  3. Send LinkedIn invite
  4. Receive reply
  5. Observe AI response

๐Ÿ’ก Summary, Closure & Compliance

This AI Outreach Automation platform represents a production-grade, compliance-aware, and scalable solution for modern B2B outreach. The architecture enforces separation of concerns, controlled AI usage, and audit-ready operations, making it suitable for enterprise deployment.

About

Modular, enterprise-grade AI outreach automation platform orchestrated with n8n. Automates lead acquisition, AI-driven research, enrichment & personalization, LinkedIn & email execution, engagement state tracking, event-driven workflows, & AI-powered conversational reply automation using OpenAI, Apollo, Apify, Unipile, Google Sheets, & PostgreSQL.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors