Fun Weird Things:
Sick of paying $19/month just to send a follow-up email after someone fills out a form? Here's how I replaced an entire chunk of my CRM and automation stack using Python + a Gmail API + a Google Sheets trigger.
This article walks you through an end-to-end Python automation for solo founders and devs looking to cut SaaS costs and own their stack.
⚙️ What You'll Build
A Python script that:
- Monitors a Google Sheet for new leads (like Typeform or Tally exports)
- Sends a customized follow-up email via Gmail
- Logs sent status + timestamps
- Can be run via cron, PythonAnywhere, or a simple server
🧱 Prerequisites
- Google Sheet with lead data
- Gmail account with API access (OAuth or App Password)
-
smtplib
,gspread
,oauth2client
installed - Basic knowledge of Python
🧪 Step 1: Connect to Google Sheets
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = ["https://spreadsheets.google.com/feeds",
"https://www.googleapis.com/auth/drive"]
creds = ServiceAccountCredentials.from_json_keyfile_name('creds.json', scope)
client = gspread.authorize(creds)
sheet = client.open("Leads").sheet1
data = sheet.get_all_records()
📤 Step 2: Send Email via Gmail
import smtplib
from email.mime.text import MIMEText
def send_email(to_email, name):
subject = f"Nice to meet you, {name}!"
body = f"Hey {name}, just following up on your interest in our product..."
msg = MIMEText(body)
msg['Subject'] = subject
msg['From'] = "you@example.com"
msg['To'] = to_email
with smtplib.SMTP_SSL("smtp.gmail.com", 465) as server:
server.login("you@example.com", "your_app_password")
server.send_message(msg)
🔄 Step 3: Full Automation Loop
for i, row in enumerate(data):
if row["Followed Up"] == "No":
send_email(row["Email"], row["Name"])
sheet.update_cell(i+2, 3, "Yes") # Assuming column 3 is 'Followed Up'
🧪 Optional: Run Daily with PythonAnywhere
- Free tier supports daily scheduled tasks
- Paste your script and run via Task Scheduler
- Try PythonAnywhere
💸 What You're Replacing
- No-code tools like Zapier, Make, or Pabbly
- Lightweight CRM automations (e.g., Pipedrive drip emails)
- Basic onboarding emails from HelpScout, Intercom
🧠 Takeaways for Indie Hackers
- You don’t need a SaaS for everything — Python can cover 80% of basic automation needs
- Own your stack, control your data, reduce costs
- Great for MVPs, solopreneur systems, or one-off product launches
🔗 Bonus Resources
- Google Sheets + Python (gspread)
- Send Email with Gmail + Python
- PythonAnywhere Scheduler
- Gmail App Password Setup
🔥 Want more no-SaaS Python automations?
Drop a comment with the tool you'd love to replace next (Calendly, Airtable, Notion?) and I’ll write the next one.
Attention writers! If you’ve ever published on Dev.to, you may be eligible for your special Dev.to drop. Click here here. for verified Dev.to users only. – Admin