|
Node.js 20Python 3.11Next.js 15GitHub ActionsLinkedIn API v2Facebook Graph APIGroq AILive

Autonomous AI Marketing Employee

A fully self-operating system that hunts leads, sends cold emails, monitors replies in real-time, posts to social media via official APIs, and generates weekly business intelligence โ€” all without human intervention.

Live Pipeline Stats

Updated: 9:18:33 PM
485
Total Prospects
CRM database
0
Emails Sent
via Brevo API
0%
Reply Rate
target: >5%
0
Hot Leads
interested replies
25
Automation Modules
JS + Python scripts
3
GitHub Workflows
daily cron jobs
300/day
Email Capacity
150 init + 150 follow-up
0
Social Posts (7 days)
LinkedIn + Facebook

System Architecture

GitHub Actions (Daily Cron)
  โ””โ”€ orchestrator.js โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Master Pipeline
       โ”‚
       โ”œโ”€ Step 1: Process Approved Vault Posts
       โ”‚   โ””โ”€ AI_Employee_Vault/Approved/*.md โ†’ LinkedIn API + Facebook API
       โ”‚
       โ”œโ”€ Step 2: Check Email Replies (IMAP)
       โ”‚   โ””โ”€ email-watcher.js โ†’ classifyEmail() โ†’ Needs_Action/emails/
       โ”‚
       โ”œโ”€ Step 3: Prospect Hunting
       โ”‚   โ”œโ”€ prospect-hunter.js โ†’ SerpAPI + Apollo.io (owner contacts)
       โ”‚   โ””โ”€ free-prospect-sources.js โ†’ Google CSE + web scraping
       โ”‚
       โ”œโ”€ Step 4: Email Outreach
       โ”‚   โ””โ”€ email-sender.js โ†’ Brevo API โ†’ 300 emails/day (6 templates)
       โ”‚
       โ”œโ”€ Step 5: Blog โ†’ Social Media
       โ”‚   โ””โ”€ blog-to-social.js โ†’ social-api-poster.js โ†’ LinkedIn + Facebook
       โ”‚
       โ”œโ”€ Step 6: WhatsApp Lead Generation
       โ”‚   โ””โ”€ whatsapp-lead-generator.js โ†’ phone extraction โ†’ wa.me links
       โ”‚
       โ””โ”€ Step 7: CEO Briefing + Dashboard Update
           โ””โ”€ ceo-briefing.js โ†’ Briefings/*.md + Dashboard.md

Prospect Database โ€” Niche Breakdown

restaurant
285
smallBusiness
62
lawyer
45
healthcare
38
ecommerce
31
realEstate
24
Total prospects485

GitHub Actions Workflows

9:00 AM UTC

daily-blog-automation.yml

  1. 01.Groq AI generates 2 blog posts
  2. 02.Commits to GitHub
  3. 03.Vercel deploys + ISR revalidates
  4. 04.Posts to social media
2:00 PM UTC

daily-client-acquisition.yml

  1. 01.Process approved vault posts
  2. 02.Check IMAP email replies
  3. 03.Hunt 50+ new prospects
  4. 04.Send 300 emails (initial + follow-up)
  5. 05.Post to LinkedIn + Facebook
  6. 06.Generate WhatsApp leads
  7. 07.Update CEO briefing + dashboard
Hourly

email-automation-cron.yml

  1. 01.Next.js API route trigger
  2. 02.Follow-up sequence scheduler
  3. 03.Reply rate tracking

Active Modules โ€” automation-system/src/

๐Ÿง 
orchestrator.js
Master Pipeline
๐Ÿ”
prospect-hunter.js
SerpAPI + Apollo Lead Discovery
๐ŸŒ
free-prospect-sources.js
Google CSE + Web Scraping
๐Ÿ“ง
email-sender.js
Brevo SMTP Outreach (6 templates)
๐Ÿ‘๏ธ
email-watcher.js
IMAP Real-Time Reply Monitor
๐Ÿ“ก
social-api-poster.js
LinkedIn v2 + Facebook Graph API
โœ๏ธ
blog-to-social.js
Blog Content โ†’ Social Media
๐Ÿ’ฌ
whatsapp-lead-generator.js
Phone Extraction + wa.me Links
๐Ÿ“Š
ceo-briefing.js
Weekly Business Intelligence Report
๐Ÿ—„๏ธ
database.js
lowdb JSON CRM (485+ prospects)
๐Ÿ“
email-templates.js
6 Industry-Specific Templates
๐Ÿค–
blog_automation_agent.py
Groq AI Blog Generation

Tech Stack

Frontend

Next.js 15React 19TypeScriptTailwind CSSFramer Motion

Backend

Node.js 20Python 3.11ES ModulesNext.js API Routes

AI / LLM

Groq AINLP ClassifierEmail Intelligence

APIs

LinkedIn v2 UGCFacebook Graph v22Brevo SMTPSerpAPIApollo.ioGoogle CSE

Database

lowdb JSONVercel KVPostgreSQL (Neon)

DevOps

GitHub ActionsDocker (166MB)VercelWindows Task Scheduler

Key Engineering Decisions

๐Ÿ“ก

Official APIs over Browser Automation

Replaced Playwright (fragile, blocked by anti-bot) with LinkedIn v2 UGC API and Facebook Graph API v22. Result: 100% reliability in CI/CD environments, no browser installation needed.

๐Ÿง 

Human-in-the-Loop by Design

AI generates social posts โ†’ saves to Pending_Approval/ folder โ†’ human moves to Approved/ โ†’ orchestrator auto-publishes. Full auditability without giving AI unchecked posting rights.

๐Ÿ”„

Graceful Degradation

Each of the 7 orchestrator steps is wrapped in try/catch. If LinkedIn API fails, the email step still runs. If SerpAPI quota is hit, fallback to Google CSE. System never fully stops.

๐Ÿ’ฐ

Cost-Optimized from Day One

Built entirely on free tiers: Apollo (10K contacts/month), Brevo (300 emails/day), Google CSE (100 searches/day), Vercel (free hosting). Monthly operating cost: $0.

AI Employee Vault Status

โณ
0
Pending Approvals
Social posts awaiting review
๐Ÿ””
0
Action Items
Hot leads & tasks
๐Ÿ“ฌ
0
Email Replies (7d)
Detected via IMAP
๐Ÿ”ฅ
0
Interested Leads (7d)
High priority follow-up

Want this built for your business?

This entire system was built by one developer โ€” from architecture to deployment. Available for freelance contracts, remote positions, and consulting engagements.

๐Ÿ“ Karachi, Pakistan (Remote โ€” US Hours)โ€ข๐Ÿ’ผ Available for Contract & Full-Timeโ€ขโšก 8+ Years Experience