This project automates the process of lead generation and cold email outreach. It leverages n8n for workflow automation, Groq's Llama 3 for AI-powered search instruction generation, and PostgreSQL for data storage. The frontend, built with Next.js, provides a user-friendly interface for defining lead requirements, viewing results, and managing settings. This platform streamlines the process of finding and engaging with potential customers, saving time and improving efficiency.
- Automated Lead Generation: Define your ideal customer profile and let the platform automatically generate leads.
- AI-Powered Search Instructions: Uses Groq's Llama 3 to create optimized search queries for Apollo.io.
- Cold Email Automation: Send personalized cold emails to generated leads.
- Workflow Management: Utilizes n8n for flexible and customizable workflow automation.
- User-Friendly Interface: Built with Next.js for a seamless and intuitive user experience.
- Data Storage: Stores lead data and workflow run information in a PostgreSQL database.
- Account Management: Users can manage their account settings, preferences, and data.
- Multi-Step Form: A dynamic form to collect user input for generating leads.
- Authentication: Secure user authentication to protect data.
| Category | Technology | Description |
|---|---|---|
| Frontend | Next.js | React framework for building user interfaces |
| React | JavaScript library for building user interfaces | |
| TypeScript | Superset of JavaScript which adds static typing. | |
| lucide-react | Icon library | |
| next/font/google | Used for importing Google Fonts | |
| @vercel/analytics/next | Used for integrating Vercel Analytics | |
| Backend | n8n | Workflow automation platform |
| Groq API | Used for generating Apollo.io search instructions using the llama-3.1-70b-versatile model. |
|
| Apollo.io API | Used for searching and retrieving leads. | |
| Node.js | JavaScript runtime environment | |
| Database | PostgreSQL | Relational database management system |
| uuid-ossp extension | Provides functions for generating UUIDs (Universally Unique Identifiers). | |
| AI | Groq's Llama 3 | AI model for generating Apollo.io search instructions |
| Other | JSON | Data exchange format |
| Vercel | Hosting platform |
- Node.js (>=18)
- npm or yarn
- PostgreSQL
- n8n
- Groq API Key
- Apollo.io API Key
-
Clone the repository:
git clone <https://github.com/Kashan-Shaikh/Leadvio> cd <Leadvio>
-
Install dependencies:
npm install # or yarn install -
Set up the database:
- Create a PostgreSQL database.
- Run the SQL schema:
psql -U <db_user> -d <db_name> -f backend/db/schema.sql
Replace
<db_user>and<db_name>with your PostgreSQL credentials. -
Configure environment variables:
Create a
.env.localfile in thefrontenddirectory with the following variables:NEXT_PUBLIC_GROQ_API_KEY=<your_groq_api_key> NEXT_PUBLIC_APOLLO_API_KEY=<your_apollo_api_key> NEXT_PUBLIC_N8N_WEBHOOK_URL=<your_n8n_webhook_url>Also, configure the necessary environment variables for the backend n8n workflow (Groq API key, Apollo.io API key, database connection details).
-
Configure n8n:
- Import the workflow from
backend/Lead Generation & Cold Email Automation.jsoninto your n8n instance. - Configure the necessary credentials (Groq API, Apollo.io API, database connection).
- Set the webhook URL in your
.env.localfile.
- Import the workflow from
-
Start the Next.js development server:
npm run dev # or yarn devThis will start the frontend application at
http://localhost:3000. -
Ensure the n8n workflow is active and listening for webhooks.
- Open your browser and navigate to
http://localhost:3000. - Sign up or sign in to your account.
- Navigate to the "Get Leads" page.
- Fill out the form with your lead generation criteria.
- Submit the form.
- View the generated leads on the "Results" page.
- Manage your leads on the "My Leads" page.
- Configure your account settings on the "Settings" page.
├── backend/
│ ├── Lead Generation & Cold Email Automation.json # n8n workflow definition
│ └── db/
│ └── schema.sql # PostgreSQL database schema
├── frontend/
│ ├── app/
│ │ ├── api/
│ │ │ ├── webhook/
│ │ │ │ ├── get-leads/route.ts # API route for triggering lead generation
│ │ │ │ └── status/route.ts # API route for checking workflow status
│ │ ├── dashboard/page.tsx # Main dashboard page
│ │ ├── get-leads/page.tsx # Lead generation form page
│ │ ├── layout.tsx # Root layout for the application
│ │ ├── my-leads/page.tsx # My Leads page
│ │ ├── page.tsx # Landing page
│ │ ├── pricing/page.tsx # Pricing page
│ │ ├── results/page.tsx # Results page
│ │ ├── settings/page.tsx # Settings page
│ │ ├── sign-in/page.tsx # Sign-in page
│ │ └── sign-up/page.tsx # Sign-up page
│ ├── components/ # Reusable UI components
│ ├── lib/
│ │ └── n8n-client.ts # Functions for interacting with the n8n API
│ ├── next.config.mjs # Next.js configuration
│ └── public/ # Public assets
├── package.json
├── README.md
└── tsconfig.json
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Push your changes to your fork.
- Submit a pull request.
This project is licensed under the MIT License.
Kashan Founder of Aivio - aivio.services@gmail.com
Thanks for checking out this project! We hope it helps you automate your lead generation and cold email outreach efforts.