Daily Python Projects

Daily Python Projects

Build a Google Sheets New Data Tracker with Python

Level: Real World

Ardit Sulce's avatar
Ardit Sulce
Dec 17, 2025
∙ Paid

Note: You can take todays’ project as a video course for free. Here is the link to the class: https://www.skool.com/automateit/classroom/226049c3?md=b1efebee17c6497d808af820eea580f9

Your task for today is to create a script that monitors a Google Sheets spreadsheet and detects only the new rows that have been added since the last time you ran the script — perfect for tracking form submissions, survey responses, or any data that gets added to a sheet over time.

Project Task

Create a Google Sheets new data tracker that:

  • Uses the Google Sheets API to fetch spreadsheet data

  • Connects to your Google Sheet using API credentials

  • Tracks which rows have already been processed

  • Stores the last processed row number in a text file

  • Detects and returns only the new rows added since last run

  • Loads API keys and spreadsheet IDs securely from environment variables

  • Displays both all rows and just the new rows for comparison

  • Automatically updates the tracking file after each run

This project gives you hands-on practice with Google APIs, state management, file persistence, and incremental data processing — essential skills for building automation that tracks changes over time.

Expected Output


ALL ROWS: [
  [’Name’, ‘Email’, ‘Response’],
  [’John Doe’, ‘john@example.com’, ‘Yes’],
  [’Jane Smith’, ‘jane@example.com’, ‘No’],
  ... (25 rows total)
]

NEW ROWS: [
  [’Alice Brown’, ‘alice@example.com’, ‘Yes’],
  [’Bob Wilson’, ‘bob@example.com’, ‘Maybe’],
  [’Carol Davis’, ‘carol@example.com’, ‘Yes’],
  [’David Lee’, ‘david@example.com’, ‘No’],
  [’Emma White’, ‘emma@example.com’, ‘Yes’]
]


Join the Python & AI Builders Skool Community

Got questions to ask the author about this project? Join our Python & AI Builders community for weekly Python & AI videos and discussions:

https://skool.com/automateit

Skeleton and Solution

Below you will find both a downloadable skeleton.py file to help you code the project with comment guides and the downloadable solution.py file containing the correct solution.

Get the code skeleton here:

Keep reading with a 7-day free trial

Subscribe to Daily Python Projects to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Ardit Sulce · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture