Skip to main content

Overview

The Outreach class handles automated business outreach through Google Maps scraping and email campaigns. It scrapes business information and sends personalized outreach emails.

Constructor

Outreach()
Constructor for the Outreach class. Initializes the outreach system and checks for Go installation. Returns: None Example:
from classes.Outreach import Outreach

outreach = Outreach()

Methods

is_go_installed

def is_go_installed() -> bool
Checks if Go is installed on the system. Returns: bool - True if Go is installed, False otherwise

unzip_file

def unzip_file(zip_link: str) -> None
Downloads and unzips the Google Maps scraper.
The link to the zip file
Returns: None

build_scraper

def build_scraper() -> None
Builds the Google Maps scraper from source. Returns: None

run_scraper_with_args_for_30_seconds

def run_scraper_with_args_for_30_seconds(args: str, timeout=300) -> None
Runs the scraper with specified arguments for a given timeout period.
args
str
required
The arguments to run the scraper with
timeout
int
The time to run the scraper for (default: 300 seconds)
Returns: None

get_items_from_file

def get_items_from_file(file_name: str) -> list
Reads and returns items from a CSV file.
file_name
str
required
The name of the file to read from
Returns: list - The items from the file

set_email_for_website

def set_email_for_website(index: int, website: str, output_file: str)
Extracts an email address from a website and updates a CSV file with it.
index
int
required
The row index in the CSV file where the email should be appended
website
str
required
The URL of the website to extract the email address from
output_file
str
required
The path to the CSV file to update with the extracted email
Returns: None

start

def start() -> None
Starts the complete outreach process. This method:
  1. Checks if Go is installed
  2. Downloads and unzips the scraper
  3. Builds the scraper
  4. Runs the scraper to collect business information
  5. Extracts email addresses from business websites
  6. Sends personalized outreach emails
Returns: None Example:
from classes.Outreach import Outreach

# Initialize outreach
outreach = Outreach()

# Start the complete outreach workflow
outreach.start()

Complete Workflow

The Outreach class follows this workflow:
  1. Initialization: Verifies Go installation and loads configuration
  2. Scraper Setup: Downloads and builds the Google Maps scraper
  3. Business Discovery: Scrapes Google Maps for businesses in the specified niche
  4. Email Extraction: Visits business websites to find contact emails
  5. Email Campaign: Sends personalized outreach emails using templates

Configuration Requirements

The Outreach class requires the following configuration:
  • google_maps_scraper_niche: Target business niche
  • email_credentials: SMTP credentials for sending emails
    • username: Email username
    • password: Email password
    • smtp_server: SMTP server address
    • smtp_port: SMTP port number
  • outreach_message_subject: Email subject template
  • outreach_message_body_file: Path to email body template file
  • scraper_timeout: Maximum scraper execution time

Email Template Variables

Email templates support the following variables:
  • {{COMPANY_NAME}}: Replaced with the scraped company name

Build docs developers (and LLMs) love