Private operating system for high-velocity agency growth

Agency CRM Pro

Generate qualified leads, automate cold email follow-ups, track replies, move deals through the pipeline, and schedule meetings from one focused CRM workspace.

Read Documentation
AI audit decisions Verified outreach lanes Proposal + meeting automation
About Agency CRM

Generate, verify, contact, and close leads with fewer manual steps.

The portal brings sourcing, templates, reply handling, proposal PDFs, and meeting coordination into one operating system.

01Lead Sources

Fetch prospects from Apollo, LeadGorilla, CSV imports, and manual forms.

02Email Automation

Send first emails, scheduled follow-ups, HTML templates, Gmail, and custom SMTP delivery.

03AI Coordination

Gemini can be switched on/off from Profile. Off mode keeps normal saved template emails active.

04Reply Tracking

IMAP sync stores client body, subject, sender, timestamps, and stage movement in the timeline.

05Meetings

Detect requested times, ask for alternate approval on conflicts, then generate a unique meeting link.

06Proposals + Won

Send PDF proposals, track sent files, and move approved proposal replies into Won automatically.

Built for agencies

Stop losing leads because follow-up depends on memory.

Every lead gets a clear next action, every reply gets classified, and every proposal stays attached to the deal history.

Missed replies

Client emails are pulled back into the CRM timeline so the team sees context before acting.

Wrong first pitch

AI checks lead category, website, social signals and service intent before choosing the first outreach angle.

Manual meeting chaos

Meeting requests, conflicts and confirmation options are handled without overwriting booked slots.

Proposal confusion

Company profiles, audit PDFs and proposals stay separate so clients receive the right document at the right stage.

Zero-manual workflow

From raw lead to booked meeting, the CRM keeps moving.

A structured automation path for agencies that want fewer tabs, faster response time, and cleaner pipeline control.

01Import or source leads

CSV, manual entry, Apollo and source integrations bring contacts into one lead table.

02Scan the website

The CRM checks speed signals, title, meta, headings, schema, screenshots and social links.

03Choose the offer

AI selects website audit, landing page concept, SEO audit, social strategy, ecommerce or 360 marketing.

04Send and follow up

First email, follow-ups, reply intent, proposal requests and meeting scheduling stay connected.

Decision intelligence

Every first touch feels prepared, not random.

The system turns lead data into a practical outreach angle, then attaches the right audit, design concept or strategy PDF before the client asks.

Website audit report Landing page concept SEO priority findings Social media strategy design Ecommerce development plan 360 marketing roadmap
Encrypted settings

API keys, SMTP credentials and automation controls stay in profile settings.

Human-safe fallbacks

If AI is off or unavailable, saved templates and rule-based decisions continue the workflow.

Full timeline visibility

Email, WhatsApp, proposals, meetings and AI decisions remain attached to each lead.

Generate leads automatically

Ready to run your outreach from one CRM?

First email on/off toggle Gemini automation on/off toggle Editable templates with HTML/CSS Encrypted profile API settings Proposal PDF and meeting timeline

Dashboard

Leads by service
Pipeline overview
Recent leads
Import from Apollo.io CSV
1
Apollo.io → People Search → Filters → Export CSV
2
CSV file neeche drop karo — fields auto-map honge
3
Service auto-classify hogi — confirm karo
Apollo CSV drop karo ya click karo
Manual Lead Add
Pending Leads
Left se lead select karo
Email + WhatsApp automatically ready milega
Email + WhatsApp Templates
Aaj ke Follow-ups
All Pending Follow-ups
Project Overview & Quick Reference

Yeh section application ke internal architecture, key components, files aur APIs ki details provide karta hai taake developer is project ke technical design ko asaani se samajh sakein.

1. Core Features & Modules

  • Lead Ingestion & Sources: Fetch leads from Apollo API, LeadGorilla business search, CSV import, and Manual forms.
  • Outreach Automation: Node-cron sends automatic follow-ups. New leads can receive AI-decided first outreach with separate audit/design PDFs: web design leads get a landing page concept, SEO leads get an SEO audit report, and proposals/company profiles stay separate.
  • Gemini AI Coordination: Personalized email drafting, intent analysis, and auto-reply sync. Can be toggled on/off; falls back to static templates if disabled.
  • IMAP Sync: Reads incoming client replies, logs them into lead history timeline, and automatically shifts pipeline stages.
  • Meeting Scheduler: Auto-detects requested meeting slots, detects booking conflicts, suggests alternative timings, and confirms with a Jitsi meeting link.
  • Proposal Generator: Dynamically compiles details into HTML templates and produces custom branded PDFs only for proposal emails.

2. Key Files & Technical Structure

FileRole & Responsibilities
server.jsExpress backend APIs, database read/writes (JSON flat files), authentication, and proposal PDF generator logic.
emailService.jsNodemailer transporters for Gmail/custom SMTP and text-to-HTML wrapper.
emailScheduler.jsOutreach daily batch engine and delay calculator.
replyProcessor.jsIMAP email poller, reply clean-up, stage classifier, and meeting slot allocation/conflict resolver.
openaiService.jsGemini API integration, system instructions, and JSON parser for email drafting.
leadgorilla.jsLeadGorilla local business scraper API wrapper.
js/app.jsMain frontend SPA controller, UI renderer, modal controller, and API fetch calls.
Full System Documentation

1. Overview

Backend server.js Express par run hota hai, frontend index.html, css/style.css, aur js/app.js se browser mein chalta hai. Data JSON files mein store hota hai.

System public landing page show karta hai. Dashboard access sirf login ke baad milta hai. Default login pehli dafa admin / admin123 hai, jise Profile Settings se change karna chahiye.

Latest system mobile responsive hai: dashboard, pipeline, tables, settings, modals aur landing page mobile par adjust hote hain.

2. Lead Workflow Lanes

LaneAutomatic RuleManual Rule
Lead IntakeApollo, LeadGorilla, CSV ya manual lead save hoti hai. Manual form category save karta hai. CSV import common headers auto-map karta hai: full name, company, phone/WhatsApp, email, website, source aur service required. Duplicate email/API id skip hota hai.Missing/incorrect fields All Leads se edit honge.
First OutreachFirst Email Auto Send on ho to new valid-email lead par AI Decision Engine lead/source/service/website analyze karta hai aur best angle choose karta hai: website audit, website layout, social media audit/planning, SEO strategy, 360 marketing ya ecommerce development. Stage Contacted hota hai.First Email Auto Send off ho to Outreach/All Leads se manual send.
RepliesIMAP reply timeline mein save hota hai. WhatsApp QR inbound queries bhi lead timeline mein save hoti hain. AI intent + keyword fallback stage decide karta hai. Agar client pooche ke Media Feathers ko project kyun dein, system company benefits, case studies link aur portfolio link ke sath profile reply bhejta hai.Confusing reply par AI draft/manual stage buttons use karein.
MeetingsMeeting/call intent par stage Meeting. Time missing ho to availability ask email. Time booked ho to options email. Confirmed option par final meeting link.Pipeline Meeting card se schedule/reschedule manually.
Proposals/WonPricing/proposal reply par stage Proposal. Client approval only after sent proposal moves to Won.Proposal PDF hamesha manually send hota hai.
Development safety: run npm run test:automation after automation changes. Ye reply intent, proposal-to-won guard, meeting conflict slots, pending option selection aur reply cleanup verify karta hai.

3. Profile Settings

SectionFieldsNotes
Portal ProfilePortal Name, Slogan, Logo Text, Logo Upload, Favicon/PDF Icon UploadLanding page, sidebar, browser icon aur proposal PDF branding update hoti hai.
Super Admin LoginAdmin ID, current password, new passwordPassword change ke liye current password required hai.
Lead APIsApollo, LeadGorillaSecret values masked hoti hain; blank chorne se old value keep rehti hai.
AI AutomationGemini On/Off, Gemini API Key, Gemini Model, AI Auto Send RepliesGemini key encrypted save hoti hai. Off mode mein normal templates chalte rehte hain.
EmailGmail, custom SMTP, TLS settings, From/Reply-ToGmail ya company SMTP dono supported hain.
RepliesIMAP host, port, user, passClient replies read karne ke liye.
AutomationFirst Email Auto Send, cron, daily limit, delayFirst email on/off yahin se control hoti hai.
MeetingsMeeting base URLUnique meeting links ke liye.
Encrypted files portal_secrets.json aur portal_secret.key ko server par safe rakhna hai. portal_secret.key delete ho gaya to old encrypted values decrypt nahi hongi.

4. Gemini Automation Setup

SettingRecommendedPurpose
GEMINI_API_KEYYour Gemini keyGemini API access.
GEMINI_MODELgemini-2.5-flash-liteEmail drafting and reply classification.
AI_EMAIL_AUTOMATIONtrue or Profile toggle OnOn par first/follow-up emails AI personalize karega. Off par normal saved templates use honge.
AI_AUTO_SEND_REPLIESfalseFalse par AI draft banata hai; true par non-meeting replies auto-send kar sakta hai.

AI Processing Flow:

  • New lead email: AI Decision Engine lead context se service angle choose karta hai aur usi angle ka email/PDF send karta hai. Web design lead ko business category ke mutabiq landing page design concept PDF milta hai. SEO lead ko website SEO audit report PDF milti hai. Ye proposal ya company profile nahi hota.
  • Follow-up email: scheduler saved aiServiceAngle aur aiFollowupPlan ke mutabiq contextual follow-up generate karta hai.
  • Client reply: AI intent classify karta hai: meeting, reschedule, pricing/proposal, approved/onboarding/won, interested, company/profile/why Media Feathers question, not interested, unsubscribe.
  • AI draft: lead modal/timeline mein Send AI Draft button ke sath show hoti hai.
  • Gemini off/fail: normal template email aur keyword classifier automatically use hota hai.
Safe mode ke liye AI_AUTO_SEND_REPLIES=false rakhein. Is mode mein AI sirf draft banayega, email aap button se send karenge.

5. Reporting

  • Reporting menu: email sent, opener/opened email, bounced email, replies aur proposal sent metrics one place par show hoti hain.
  • Recent events: email_log.json aur lead timelines merge hote hain.
  • WhatsApp separate: WhatsApp reporting aur QR login separate WhatsApp menu mein hain.

6. WhatsApp QR

  • WhatsApp QR Login: WhatsApp menu se QR start/refresh/stop hota hai. Session local whatsapp-web-session/ folder mein save hota hai.
  • 6 minute interval: QR session connected ho to outbound WhatsApp queue default WHATSAPP_QR_MESSAGE_INTERVAL_MS=360000 use karti hai.
  • New QR / Relink: Mobile se device unlink ho jaye ya status stale lage to local session clear karke fresh QR generate hota hai.
  • WhatsApp Chats: WhatsApp menu mein QR linked phone account ki real chat list aur selected conversation ka thread show hota hai.
  • Proposal follow-up: Proposal wali WhatsApp chats analyze karke next follow-up QR/Cloud sender se queue/send hota hai.

7. Email System Config

AI Decision Engine

Chosen AngleEmail TypeAttachment
Website DesignLanding page design concept outreach{company}-website-layout-concept.pdf
SEOWebsite SEO audit report outreach{company}-seo-audit-report.pdf
General website contextWebsite audit outreach{company}-website-seo-audit.pdf
Social / 360 / EcommerceService-specific pitch and follow-up lane{company}-social-media-audit.pdf, {company}-social-media-strategy-design.pdf, {company}-360-marketing-plan.pdf, {company}-ecommerce-development-plan.pdf
Decision saved fields: websiteAudit, websiteAuditSummary, websiteAuditIssues, websiteSocialLinks, aiServiceAngle, aiOfferType, aiReason, aiConfidence, aiFollowupPlan. Website ho to system page open karke status, speed signal, title, meta description, headings, canonical, viewport, schema, image alt issues aur social links scan karta hai. PDF mein actual findings, priority issues aur business-category strategy include hoti hai. Screenshot Playwright available ho to capture hota hai to PDF mein actual screenshot page embed hota hai; warna screenshot status show hota hai. Smart first attachment proposal/company profile se alag hoti hai.
First Email Auto SendGemini AutomationResult
OnOnSmart first email automatically send hoti hai. Content Gemini personalize karta hai, attachment system audit/design PDF choose karta hai; proposal/company profile nahi.
OnOff/failSmart first email automatically send hoti hai. Built-in landing concept/SEO audit/body aur PDF use hota hai.
OffOnFirst email automatically nahi jati. Manual send par Gemini content/draft generate kar sakta hai.
OffOffFirst email automatically nahi jati. Manual send par saved template use hota hai.
Gmail SMTP blocked/proxy ho to company SMTP use karein: EMAIL_PROVIDER=smtp, SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS.
Certificate mismatch aaye to hosting SMTP settings check karein. Temporary bypass SMTP_TLS_REJECT_UNAUTHORIZED=false hai.

6. Troubleshooting Quick Reference

IssueReasonSolution
Cannot POST /api/auth/loginOld server process running.Restart server: pm2 restart agency-crm or node server.js.
Gemini email nahi ban rahiGemini key or quota issue.Verify key in Profile settings. Falls back to static template automatically.
First email nahi jatiFirst Email Auto Send is disabled.Enable First Email Auto Send in Profile Automation settings.
Email certificate mismatchSMTP reject unauthorized enabled.Set SMTP_TLS_REJECT_UNAUTHORIZED=false in .env as a temp bypass.
Replies update nahi hotiIMAP connection details invalid.Verify IMAP details and check connection logs on server.