Skip to content
CK/SYSTEMS
live tooling

Letter Generator Agent

Automated website audits and personalized outreach

Role

Solo Developer

Timeframe

2025

Stack

Node.js Python OpenAI Google Places API FPDF

Problem

Agency outreach requires:

  1. Finding businesses in a target area
  2. Auditing their websites for improvement opportunities
  3. Writing personalized letters that reference specific issues
  4. Generating professional PDF documents

This is tedious when done manually for hundreds of businesses.

Solution

Built an automated pipeline:

# 1. Fetch businesses near an address
python scripts/get_places.py "123 Main St, Sydney" 500

# 2. Classify and filter businesses
python scripts/classify_businesses.py

# 3. Audit websites and generate letters
node index.js --input data/good_businesses.csv

# 4. Generate PDFs
python scripts/auto_pdf_generator.py

How It Works

Business Discovery

Uses Google Places API to find businesses within a radius. Extracts:

  • Business name and address
  • Website URL
  • Phone number
  • Business type

AI Classification

OpenAI filters out:

  • Large corporations (not target market)
  • Competitors
  • Businesses without websites
  • Invalid/irrelevant entries

Website Auditing

For each valid business:

  • Lighthouse-style performance check
  • Mobile responsiveness test
  • SEO basics analysis
  • Security (HTTPS) verification

Letter Generation

GPT generates personalized letters that reference:

  • Specific issues found in the audit
  • Business name and industry
  • Actionable recommendations

Technical Details

Why Hybrid Node.js + Python?

  • Node.js: Fast async HTTP for website auditing
  • Python: Better PDF libraries (FPDF, PyPDF2) and data processing

Output

Final deliverable is a merged PDF with:

  • Individual letters per business
  • Consistent branding
  • Professional formatting

Outcomes

  • Automated business discovery via Google Places API
  • AI-powered business classification and filtering
  • Personalized letter generation with website audit data

Need a workflow like this shipped properly?

Send the workflow, bottleneck, or delivery problem. I will tell you whether it fits a governed workflow audit, starter build, or implementation sprint.

Request consulting
Newsletter

Short notes on building AI agents in production.

One email when something worth sharing ships. No fluff, no daily cadence, no recycled growth-thread noise.

Primary use: consulting updates, governed AI workflow lessons, and major project writeups.