Case

Automated Email Campaigns with Gmail API

Email marketing pipeline using Gmail API, AI personalization (DeepSeek) and Google Sheets tracking for 5-touch prospecting campaigns.

active Mar 2026 filtered
Cover for Automated Email Campaigns with Gmail API

Step 01

Problem

Manual email campaigns are slow, inconsistent and don't scale. Sending personalized follow-ups to dozens of contacts takes hours and it's easy to lose track of who received what.

Step 02

Context and constraints

I built a complete automated email marketing pipeline using the Gmail API for multi-touch campaigns with AI personalization, Google Sheets status tracking and daily rate limiting.

Role: Full pipeline developer: Gmail API integration, multi-touch campaign orchestration, DeepSeek personalization, Sheets tracking and rate control.

Step 03

Key decisions

  • Gmail API with persistent OAuth: no dependency on paid email marketing services.
  • DeepSeek generates each campaign touch with a different angle (intro, value, sector insight, closing).
  • Google Sheets as contact database: each row = one contact with status, current touch and date.
  • 5 touches per contact with randomized spacing (+4d, +6d, +7d, +7d) for natural pacing.
  • Configurable daily limit (25/day) with randomized send spacing (2-5s) to avoid blocks.

Step 04

Outcomes

  • Fully automated 5-touch campaigns with zero manual intervention.
  • AI personalization with different approach in each touch.
  • Real-time contact status tracking in Google Sheets.

Metrics

  • 25 sends/day with randomized 2-5s spacing.
  • 5 touches per contact with 4-7 day gaps.
  • DeepSeek personalization for each campaign touchpoint.

Step 05

Learnings and next improvement

Email Campaign Automator

Automated email marketing pipeline with Gmail API, AI personalization and Google Sheets tracking.

Tech stack

  • Language: Python 3.11+
  • APIs: Gmail API (persistent OAuth), Google Sheets API
  • AI: DeepSeek for content personalization
  • Control: Daily limit, randomized spacing, 5-touch cycle

Campaign structure

Each contact receives 5 touches with different approaches:

  1. Introduction — initial contact, no meeting pressure
  2. Value add — relevant content for their sector
  3. Industry insight — comment on trends
  4. Specific question — opens conversation
  5. Professional close — last opportunity, respectful

Step 06

Project visual for Automated Email Campaigns with Gmail APIProject visual for Automated Email Campaigns with Gmail API