Script to clean up my contacts
This is a Google Apps Script script written in TypeScript using clasp that cleans up contacts according to several rules.
My google account is nearly 20 years old and it has accumulated a lot of cruft in its contacts. Things that are no longer relevant or don’t even exist anymore (MSN usernames, anyone?).
Additionally my contacts have gone through several migrations, particularly phone numbers, and I had been extra careful and never removed numbers before. So Colombia changes how they address landlines, I kept the old landlines, Argentina adds a 9 to mobiles, I keep the pre-migration one, and so on…
Additionally I want to get rid of corporate emails and other things like that.
This is flexible enough that the rules are easy to change.