A lightweight Python tool that parses CSV transaction data and pushes it into Google Sheets. The script cleans, deduplicates, and sorts transactions so you always have an up-to-date ledger in the cloud.
-
CSV Parsing: Reads all
.csvfiles from a local folder. -
Cleaning & Normalization: Standardizes columns (
date,amount,description,source_file). -
Deduplication: Ensures transactions aren’t uploaded twice.
-
Google Sheets Integration: Appends and maintains sorted data in a live spreadsheet.
pip install -r requirements.txt- numpy
- pandas
- gspread
- google-auth
- python-dotenv
-
Create a project in Google Cloud Console.
-
Enable Google Sheets API and Google Drive API
-
Download your service account credentials and save them as:
JSON/credentials.json
⚠️ Don’t commit this file to GitHub. Make sure .gitignore excludes it. -
Share your target Google Sheet with the service account’s email (found in the JSON).
-
Update csvTest.py with your sheet ID:
sheet = client.open_by_key("<YOUR_SHEET_ID>").sheet1
-
Create a
.envfile in the project root and add your Google service account path:GOOGLE_SHEETS_KEY=/path/to/your/service_account.json
project-root/
│
│── README.md
│── csvTest.py # Main pipeline script
│── requirements.txt
│
│── .env
│── .gitignore
│
├─ Data/ # Your CSV transaction files
│ ├─ transactions1.csv
│ └─ transactions2.csv
└─ JSON/ # Holds service account key (ignored in git)
└─ service_account.jsonRun manually:
python csvTest.py-
Drop new
.csvfiles intoCSVs/. -
Run the script.
-
Transactions are appended into your Google Sheet in chronological order.
-
Duplicates are automatically ignored.
- Automate running with cron (daily/weekly)
- add email or slack notifications when new transactions are added
- possibly implement plaid