This CRM is built around Google Workspace, so customers depend on their Gmail and Calendar data syncing reliably. The Google libraries behind the core sync engine were out of date. That blocked Rails and gem upgrades, kept security fixes out of reach, and had piled up in house workarounds. Google's newer APIs also brought breaking changes.
What I built
I moved the core sync engine to the current Google API libraries and rewrote the logic around their breaking changes. I added sync tokens, stored in Redis, so each run only pulls what changed. I set up separate Google Cloud environments to test the new behavior outside production, added logging to trace real execution paths, removed dead code, and introduced RuboCop rules agreed with the team.
Why it was hard
A large, long lived codebase where nobody was sure which branches still ran. The new libraries changed syntax and returned data all over the code. It had to ship with zero downtime for a product whose users live in Gmail and Calendar, and it needed agreement across the backend team on how far to go.
Outcome
Shipped without disrupting service. After the first run, syncs became light enough to run every few minutes, so customer data stayed fresher. Dead code went away, and fewer ingestion errors meant fewer customer complaints and fewer calls to engineers.