product image

Python → Google Sheets Fix Pack: the 7-day token, the 429 and the duplicate rows

€9

Your Python script writes to Google Sheets on its own, and still runs on day 8.

Your Python script writes to a Google Sheet perfectly on your laptop. You schedule it, and a week later it dies with invalid_grant (token expired), or 429 Quota exceeded, or it “works” and your sheet quietly gets the same row twice.

This Fix Pack solves exactly those three things: a 10-page guide, a tested helper library and two runnable scripts, so you can fix the script you already have.

WHAT YOU GET

  • Fix 1, the 7-day token: why an OAuth refresh token in “Testing” expires after 7 days, and the fix: a service account in 8 steps
  • Fix 2, the 429: Google’s real limits, 60,000 cell writes vs 1 block write, rate limiter + exponential backoff with jitter, request calculator
  • Fix 3, no duplicate rows: idempotent upsert by key (max 3 API requests), the date_time_render_option tip, RAW vs USER_ENTERED
  • Connection Doctor: checks your key, clock, sharing and a write test; explains 18 known errors in plain English
  • 2 runnable examples and 77 offline tests

FOR: you can run a Python script and use pip, and write to Sheets with gspread 6.x. NOT FOR: absolute beginners or no-code users. Needs Python 3.10+ and a free Google account.

HONEST NOTE: tested offline and live against a real Google account (service account, Oct 2026). Not run live: a real OAuth consent flow.

Short version of the Starter Kit (EUR 29: scheduling on GitHub Actions, 3 jobs, templates, 47-page guide), which is a separate product.

14-day no-questions refund. One-time payment, instant download.