Skip to content

ross167/press-pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Press Pilot

A self-running email outreach pipeline designed to run as an always-on task on PythonAnywhere. Discovers contacts, sends personalised emails, follows up automatically, monitors for positive replies, and sends a weekly progress report.

This is a skeleton. The architecture and logic are provided. The targeting, segmentation, and messaging are yours to build.


How it works

Phase 1 -- Fixed targets Scrapes a hand-picked list of target sites for contact email addresses. Each site is revisited weekly to catch new contacts.

Phase 2 -- Expanding search Works through a list of segments (locations, industries, topics -- whatever suits your use case) using DuckDuckGo, searching across categories you define. Cycles back to the beginning once complete.

Always running

Frequency Action
Every 60s Send one outreach email (within sending hours)
Every 60s Send follow-ups that are due
Every 5 ticks Scrape next fixed target
Every 10 ticks Run next segment/category search
Every 2 hours Check inbox, alert on positive replies
Every Sunday Send weekly progress report

Setup

1. Install dependencies

pip install requests beautifulsoup4 lxml python-dotenv duckduckgo-search

2. Configure your environment

cp .env.example .env

Fill in every value in .env. At minimum: SMTP credentials, sender name, website URL, and the address where alerts should go.

3. Complete the TODO sections in the script

There are four things you must fill in before the script is useful:

FIXED_TARGETS A list of specific sites you want to scrape for contacts. Format: ("domain.com", "Outlet name", "why they're relevant").

SEGMENTS A list of whatever grouping makes sense for your outreach -- geographic areas, industries, niches, topics. The pipeline works through these one by one.

CATEGORIES The types of outlet to search for within each segment, with DuckDuckGo query templates. Use {segment} as a placeholder.

INITIAL_BODY and FOLLOWUP_BODY Your actual pitch emails. Use {outlet} and {beat} in the initial email, {outlet} and {sent_date} in the follow-up.

4. Test before going live

python outreach.py run --dry-run

This runs the full pipeline in preview mode. Check the log to confirm everything looks correct before sending any real emails.

5. Deploy on PythonAnywhere

  1. Upload outreach.py and your .env file to your PythonAnywhere home directory
  2. Go to the Tasks tab
  3. Under Always-on tasks, set the command to:
    python3 /home/yourusername/outreach.py run
    
  4. Click Create

The log icon next to the task shows live output.


Commands

python outreach.py run               Start the pipeline
python outreach.py run --dry-run     Full preview, no emails sent
python outreach.py test              Re-send test emails and exit
python outreach.py summary           Print dashboard and exit
python outreach.py import <file.csv> Import contacts from CSV

Importing an existing contact list

python outreach.py import my_contacts.csv

Required column: email. Optional: outlet, beat, first_name, last_name.


Notes

Deliverability. Sending from a dedicated domain rather than a personal Gmail address significantly improves deliverability. Low-cost SMTP hosting for custom domains is widely available.

Rate limiting. The default of one email per minute is intentionally conservative. Do not reduce EMAIL_INTERVAL_SECONDS below 30.

DuckDuckGo. The duckduckgo-search library may occasionally hit rate limits. The script handles this gracefully with a wait and retry.

The database (outreach.db) is excluded from the repo by .gitignore. It contains real contact data and should never be committed.


Licence

MIT

About

A self-running email outreach pipeline for Python. Scrapes target sites for contacts, sends personalised emails, follows up automatically, and alerts you to positive replies. Runs as an always-on task on PythonAnywhere. Skeleton: bring your own targets and pitch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages