Scheduled Order Sync Automation
GitHub Actions-driven Python pipeline that syncs e-commerce export files into team Google Sheets twice daily with deduplication and structured status columns.
// Architecture flow
Overview
A zero-touch automation that pulls Matrexify Shopify order exports from Google Drive, deduplicates them, and writes them into the team's tracking Google Sheet twice a day. Includes dropdown columns for status and customer sentiment so the operations team can act on the data immediately.
Problem
Operations teams were manually copying daily order exports into a tracking sheet at the start and middle of every day. Errors and lag were constant. When the responsible person was off, the sync simply didn't happen and the team flew blind.
Approach
Move the sync to scheduled CI: GitHub Actions runs a Python script twice a day (07:30 and 14:30 Beirut time). The script reads the latest export from Drive, deduplicates by order ID against the existing sheet, appends new rows, and reapplies dropdown formatting so status columns stay editable.
Architecture
- Runtime: Python on GitHub Actions Ubuntu runners.
- Schedule: Cron-based, runs at 07:30 and 14:30 Beirut, even when laptops are off.
- Auth: Google Cloud service account with scoped access to Drive and Sheets only.
- Dedup: Order ID-based, against existing sheet content.
- Status formatting: Dropdown columns reapplied via Sheets API on every run.
Tech stack
- Runtime: Python (pip requirements.txt)
- Automation: GitHub Actions cron schedule
- APIs: Google Drive API, Google Sheets API
- Auth: Google Cloud service account (JSON, stored as a GitHub secret)
Engineering highlights
- Idempotent: re-running the script twice in a row never creates duplicates.
- Off-laptop: runs in CI, so it doesn't depend on anyone being at their machine.
- Documented: README + runbook so the next person can rotate credentials without reverse-engineering anything.
- Tight scope: scoped IAM, read-only Drive access, append-only Sheets writes.
Outcome
Live. Eliminates manual sheet updates, runs reliably twice a day, and gives the team confidence that the tracking sheet is always within hours of reality.
Lessons
- Boring automation is often the highest-ROI work. This script saved the team a recurring tax forever.
- GitHub Actions is an excellent place to run scheduled internal automations: free, observable, and version-controlled.
- Service accounts with the smallest possible scope are worth the few extra minutes of setup.
Want to dig deeper?
Ask my AI agent anything about how this was built, what tradeoffs I made, or how it could fit your team.
Ask my AI →// related projects
Multi-domain Data Mapping Tool
Streamlit dashboard that maps source spreadsheets against a master classification workbook using a five-tier match strategy with rapidfuzz fuzzy matching.
Product Data Enrichment Dashboard
AI-assisted product enrichment pipeline with confidence scoring, source-tracked LLM proposals, and a queue-based architecture that never silently overwrites master data.
E-commerce Delivery Performance Dashboard
Multi-tenant logistics analytics platform merging Shopify orders with carrier delivery data across four stores, with regional SLA tracking and weighted operations scorecards.