Automate Lead Generation & Email Outreach with Apify, Apollo.io, GP-4 & Google Sheets
## Disclaimer:
Community nodes are used, and the template can only be used on self-hosted n8n instances. 
## This n8n template from [Intuz](https://www.intuz.com/) provides a complete solution to automate your entire B2B lead generation pipeline, from discovering recently funded companies to drafting hyper-personalized outreach emails with AI.
## Who's this workflow for?
- Sales Development Representatives (SDRs)
- Business Development Teams
- Growth Hackers
- Startup Founders
- Marketing Agencies
## How it works
**1. Scrape Funded Companies:** The workflow begins by using Apify to scrape a target list of recently funded companies directly from a Crunchbase search.
**2. Enrich with Apollo.io:** It takes each company and uses the Apollo.io API to find key decision-makers (like VPs, Directors) and enrich their contact information, including finding their email addresses.
**3. Populate Google Sheets:** All the gathered lead data—company name, contact name, title, email, LinkedIn URL, etc.—is neatly organized and added to a Google Sheet.
**4. AI-Personalized Email Crafting:** The workflow sends the leads' information to OpenAI (GPT-4) with a highly specialized prompt, instructing it to write a concise, impactful, and hyper-personalized first touch cold email.
**5. Update Lead List with Email Content:** Finally, the unique, AI-generated email is saved back into the Google Sheet alongside the corresponding lead's information, making it ready for you to send.
## Pre-conditions and Requirements
Before you can successfully execute this workflow, you must have the following accounts, credentials, and assets in place.
**1. n8n Instance:**
You need an active n8n instance (self-hosted).
**2. Apify Account & Crunchbase Access:**
- Apify Account: A registered account on Apify.
- Crunchbase Account: An active, logged-in Crunchbase account (a paid subscription is recommended for accessing detailed search filters).
**3. Apollo.io API:**
You need an Apollo.io plan that includes API access. You can generate the API from settings.
**4. Google Sheet:**
Create a new Google Sheet to store your leads. The workflow is configured for two tabs: one for raw data (HealthCare in the template) and one for email generation (Company sheet).
**5. OpenAI Account:**
An account with OpenAI with API access and billing set up.
## Setup Instructions
**1. Apify Connection:**
- Connect your Apify account in the Run an Actor node.
- You'll need an Apify scraper, [here's the link](https://console.apify.com/actors/BBfgvSNWcySEk1jQO/input)
- In the Custom Body field, update the search.url with your target Crunchbase discovery URL and provide a valid cookie for authentication.
**2. Apollo.io Connection:**
- Connect your Apollo.io account using HTTP Header Authentication in the three Apollo nodes.
- You will need to provide your API key.
**3. Google Sheets Connection:**
- Connect your Google Sheets account.
- Create a spreadsheet and update the Document ID and Sheet Name in the three Google Sheets nodes to match yours. Ensure your sheet columns are set up to receive the data.
**4. OpenAI Connection:**
- Connect your OpenAI account in the Message a model node. The prompt is pre-engineered for high-quality output, but you can tailor it to better fit your specific value proposition.
**5. Activate Workflow:**
- Click Execute workflow to run the automation manually and watch your AI-powered lead list build itself.
## Customization Guide
This workflow is a powerful template. To adapt it to your specific business needs, you should review and modify the following nodes.
**1. Changing Your Target Companies (The Source)**
- Node: Run an Actor
- What to change: The search.url parameter inside the customBody.
- How to do it:
1. Go to Crunchbase and perform a search for your ideal companies (e.g., filter by different funding rounds, industry, location, keywords, etc.).
2. Copy the URL from your browser's address bar after the search results have loaded.
3. Paste this new URL as the value for search.url in the node.
4. You can also adjust count: 10 to pull more or fewer companies per run. Be mindful of Apify and Apollo credit usage.
**2. Defining Your Ideal Contact Persona**
- Node: Apollo - Get User
- What to change: The person_seniorities and person_titles arrays in the jsonBody.
- How to do it:
**1. Seniority:** Modify the person_seniorities list to match who you sell to. Examples: [c_level, founder] or [manager, contributor].
**2. Job Titles:** This is crucial. Replace the existing list of titles (engineering, technology, etc.) with keywords relevant to your target buyer. For example, if you sell to marketing teams, you might use: [marketing, demand generation, growth, content, brand].
**3. Configuring Your Google Sheet Destination**
- Nodes: Append or update row in sheet and Update row in sheet
- What to change: The documentId and sheetName.
n8nFree