Daniele Debiagi
Daniele Debiagi

Reputation: 37

Is it possible to delete Google Other Contacts via Apps Script?

Scenario

I'm a Google Workspace for Education admin. Every year we rename students' group names, but not their email addresses (ie '1st class' [email protected] becomes '2nd class' [email protected])

when teachers search for groups (in Gmail, Classroom, etc.), autocompletion shows both the old and the new name: this is confusing, although groups and members are ok

this happens because on every first interaction with the group, user's Contacts app automatically save it in Other contacts; at new year's change, a new Other contact is added (not updating the previous one)

Long solution

Every teacher open Contacts > Other contacts and manually deletes the 'old groups', every new year

What I would

on new year beginning, a script that searches for Other contacts and deletes every students group if found (both a script that perform this on every user with domain-wide authority delegation to service account, or a web app that every teachers runs as himself would be ok); so no more old autocompletion, and new ones recreated at next interaction

I'm able to write down the script by myself, but I can't solve the followings

The problem

People API methods don't seem to support this in any way

but if I try this last thing from Contacts web app, I can add the Other Contact to Contacts, and this operation moves (not copies) the contact!

so:

  1. am I missing anything that could do what I need via Apps script?
  2. is there a way to replicate this last behavior (moving from Other contacts to Contacts, instead of creating a copy) in Apps script?

thank you in advance

Upvotes: 1

Views: 537

Answers (1)

Kessy
Kessy

Reputation: 1994

As mentioned in the documentation, you are only able to Read, Copy, and Search "Other contacts".

You can create a Feature Request on Google's Issue tracker to ask for the contact to be editable.

Upvotes: 2

Related Questions