Class Contact

  • All listed Contact methods within Google Apps Script's ContactsApp service are deprecated and should not be used in new scripts.

  • These methods provided functionality for managing contact data, including adding, retrieving, and modifying details like names, addresses, and phone numbers.

  • Each deprecated method's documentation includes its description, parameters, return type, and required authorization scopes.

  • Developers should use the People API advanced service as a modern alternative for interacting with contact data.

  • While the documentation provides examples of deprecated methods, they are for illustrative purposes only and should be avoided in new development.

Contact

Deprecated. Instead, use the People API advanced service

A Contact contains the name, address, and various contact details of a contact.

Deprecated methods

MethodReturn typeBrief description
(削除) addAddress(label, address) (削除ここまで)(削除) AddressField (削除ここまで)Adds an address to the contact with either a standard or custom label.
(削除) addCompany(company, title) (削除ここまで)(削除) CompanyField (削除ここまで)Adds a company to the contact.
(削除) addCustomField(label, content) (削除ここまで)(削除) CustomField (削除ここまで)Adds a custom field to the contact with either an extended or custom label.
(削除) addDate(label, month, day, year) (削除ここまで)(削除) DateField (削除ここまで)Adds a date to the contact with either an standard or custom label.
(削除) addEmail(label, address) (削除ここまで)(削除) EmailField (削除ここまで)Add an email address with a standard label (home, work, etc.) or a custom label
{@code
// The code below retrieves a contact named "John Doe" and adds the email
// address "j.doe@example.com" to the ContactsApp.Field.HOME_EMAIL label.
(削除) addIM(label, address) (削除ここまで)(削除) IMField (削除ここまで)Adds an IM address to the contact with either a standard or custom label.
(削除) addPhone(label, number) (削除ここまで)(削除) PhoneField (削除ここまで)Adds a phone number to the contact with either a standard or custom label.
(削除) addToGroup(group) (削除ここまで)(削除) Contact (削除ここまで)Adds this contact to the given contact group.
(削除) addUrl(label, url) (削除ここまで)(削除) UrlField (削除ここまで)Adds a URL to the contact with either a standard or custom label.
(削除) deleteContact() (削除ここまで)voidDeletes this contact.
(削除) getAddresses() (削除ここまで)(削除) AddressField[] (削除ここまで)Gets all the addresses for this contact.
(削除) getAddresses(label) (削除ここまで)(削除) AddressField[] (削除ここまで)Gets all the addresses for this contact matching a particular field.
(削除) getCompanies() (削除ここまで)(削除) CompanyField[] (削除ここまで)Gets all the companies for this contact.
(削除) getContactGroups() (削除ここまで)(削除) ContactGroup[] (削除ここまで)Gets all the contact groups that contain this contact.
(削除) getCustomFields() (削除ここまで)(削除) CustomField[] (削除ここまで)Gets all the custom fields for this contact.
(削除) getCustomFields(label) (削除ここまで)(削除) CustomField[] (削除ここまで)Gets all the custom fields for this contact matching a particular field.
(削除) getDates() (削除ここまで)(削除) DateField[] (削除ここまで)Gets all the dates for this contact.
(削除) getDates(label) (削除ここまで)(削除) DateField[] (削除ここまで)Gets all the dates for this contact matching a particular field.
(削除) getEmailAddresses() (削除ここまで)String[]Gets a list of the email addresses available for this Contact.
(削除) getEmails() (削除ここまで)(削除) EmailField[] (削除ここまで)Gets the email addresses of this contact.
(削除) getEmails(label) (削除ここまで)(削除) EmailField[] (削除ここまで)Gets the email addresses for this contact matching a particular field.
(削除) getFamilyName() (削除ここまで)StringGets the family name (last name) of the contact as a string.
(削除) getFullName() (削除ここまで)StringGets the full name (given name and last name) of the contact as a string.
(削除) getGivenName() (削除ここまで)StringGets the given name (first name) of the contact as a string.
(削除) getHomeAddress() (削除ここまで)StringGets the home address of this Contact, or empty string if none exists.
(削除) getHomeFax() (削除ここまで)StringGets the home fax number of this Contact or empty string if none exists.
(削除) getHomePhone() (削除ここまで)StringGets the home phone number of this Contact or empty string if none exists.
(削除) getIMs() (削除ここまで)(削除) IMField[] (削除ここまで)Gets all the IM addresses for this contact.
(削除) getIMs(label) (削除ここまで)(削除) IMField[] (削除ここまで)Gets all the IM addresses for this contact matching a particular field.
(削除) getId() (削除ここまで)StringReturns the unique id of this contact.
(削除) getInitials() (削除ここまで)StringGets the contact's initials.
(削除) getLastUpdated() (削除ここまで)DateGets the date this contact was last updated.
(削除) getMaidenName() (削除ここまで)StringGets the maiden name of the contact as a string.
(削除) getMiddleName() (削除ここまで)StringGets the middle name of the contact as a string.
(削除) getMobilePhone() (削除ここまで)StringGets the mobile phone number of this Contact or empty string if none exists.
(削除) getNickname() (削除ここまで)StringGets the nickname of the contact as a string.
(削除) getNotes() (削除ここまで)StringGets the notes associated with this contact, or an empty string if there are no notes.
(削除) getPager() (削除ここまで)StringGets the pager phone number of this Contact or empty string if none exists.
(削除) getPhones() (削除ここまで)(削除) PhoneField[] (削除ここまで)Gets all the phone numbers for this contact.
(削除) getPhones(label) (削除ここまで)(削除) PhoneField[] (削除ここまで)Gets all the phone numbers for this contact matching a particular field.
(削除) getPrefix() (削除ここまで)StringGets the prefix to the contact's name.
(削除) getPrimaryEmail() (削除ここまで)StringGets the primary email address of the contact as a string.
(削除) getShortName() (削除ここまで)StringGets the short name of the contact as a string.
(削除) getSuffix() (削除ここまで)StringGets the suffix to the contact's name.
(削除) getUrls() (削除ここまで)(削除) UrlField[] (削除ここまで)Gets all the URLs for this contact.
(削除) getUrls(label) (削除ここまで)(削除) UrlField[] (削除ここまで)Gets all the URLs for this contact matching a particular field.
(削除) getUserDefinedField(key) (削除ここまで)StringGets the user defined value associated with the given key.
(削除) getUserDefinedFields() (削除ここまで)ObjectGets all the user defined fields for this Contact and returns them as the properties of a JavaScript Object.
(削除) getWorkAddress() (削除ここまで)StringGets the work address of this Contact, or empty string if none exists.
(削除) getWorkFax() (削除ここまで)StringGets the work fax number of this Contact or empty string if none exists.
(削除) getWorkPhone() (削除ここまで)StringGets the work phone number of this Contact or empty string if none exists.
(削除) removeFromGroup(group) (削除ここまで)(削除) Contact (削除ここまで)Removes this contact from the given contact group.
(削除) setFamilyName(familyName) (削除ここまで)(削除) Contact (削除ここまで)Sets the family name (last name) of the contact.
(削除) setFullName(fullName) (削除ここまで)(削除) Contact (削除ここまで)Sets the full name (given name and last name) of the contact.
(削除) setGivenName(givenName) (削除ここまで)(削除) Contact (削除ここまで)Sets the given name (first name) of the contact.
(削除) setHomeAddress(addr) (削除ここまで)voidSets the home address of this Contact.
(削除) setHomeFax(phone) (削除ここまで)voidSets the home fax number of this Contact.
(削除) setHomePhone(phone) (削除ここまで)voidSets the home phone number of this Contact.
(削除) setInitials(initials) (削除ここまで)(削除) Contact (削除ここまで)Sets the contact's initials.
(削除) setMaidenName(maidenName) (削除ここまで)(削除) Contact (削除ここまで)Sets the maiden name of the contact.
(削除) setMiddleName(middleName) (削除ここまで)(削除) Contact (削除ここまで)Sets the middle name of the contact.
(削除) setMobilePhone(phone) (削除ここまで)voidSets the mobile phone number of this Contact.
(削除) setNickname(nickname) (削除ここまで)(削除) Contact (削除ここまで)Sets the nickname of the contact.
(削除) setNotes(notes) (削除ここまで)(削除) Contact (削除ここまで)Sets the notes associated with this contact.
(削除) setPager(phone) (削除ここまで)voidSets the pager number of this Contact.
(削除) setPrefix(prefix) (削除ここまで)(削除) Contact (削除ここまで)Sets the prefix to the contact's name.
(削除) setPrimaryEmail(primaryEmail) (削除ここまで)voidSets the primary email address of this Contact.
(削除) setShortName(shortName) (削除ここまで)(削除) Contact (削除ここまで)Sets the short name of the contact.
(削除) setSuffix(suffix) (削除ここまで)(削除) Contact (削除ここまで)Sets the suffix to the contact's name.
(削除) setUserDefinedField(key, value) (削除ここまで)voidSets a single user defined field for this Contact, to be stored with a given key.
(削除) setUserDefinedFields(o) (削除ここまで)voidSets the user defined fields for this Contact with the properties of the given Object.
(削除) setWorkAddress(addr) (削除ここまで)voidSets the work address of this Contact.
(削除) setWorkFax(phone) (削除ここまで)voidSets the work fax number of this Contact.
(削除) setWorkPhone(phone) (削除ここまで)voidSets the work phone number of this Contact.

Deprecated methods

(削除) addAddress(label, address) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds an address to the contact with either a standard or custom label.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and adds the address
// "123 Main St, Some City, NY 10011" with the ContactsApp.Field.WORK_ADDRESS
// label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constaddress=contacts[0].addAddress(
ContactsApp.Field.WORK_ADDRESS,
'123 Main St, Some City, NY 10011',
);

Parameters

NameTypeDescription
labelObjectthe label of the new address, either from ContactsApp.Field or a custom string
addressStringthe new address

Return

(削除) AddressField (削除ここまで) — the newly created field

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) addCompany(company, title) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds a company to the contact.

// The code below retrieves a contact named "John Doe" and adds the company
// "Google" and the job title "Product Manager".
constcontacts=ContactsApp.getContactsByName('John Doe');
consturl=contacts[0].addCompany('Google','Product Manager');

Parameters

NameTypeDescription
companyStringthe name of the company to add to this contact
titleStringthe job title associated with this contact for this company

Return

(削除) CompanyField (削除ここまで) — the newly created field

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) addCustomField(label, content) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds a custom field to the contact with either an extended or custom label.

The label can be either from ContactsApp.ExtendedField or a custom label string.

// The code below retrieves a contact named "John Doe" and adds the custom field
// ContactsApp.ExtendedField.HOBBY with the value "hiking".
// Note that ContactsApp.ExtendedField.HOBBY is not the same as a custom field
// named 'HOBBY'.
constcontacts=ContactsApp.getContactsByName('John Doe');
contacts[0].addCustomField(ContactsApp.ExtendedField.HOBBY,'hiking');

Parameters

NameTypeDescription
labelObjectthe label of the new address, either from ContactsApp.ExtendedField or a custom string
contentObjectthe value to store in the custom field

Return

(削除) CustomField (削除ここまで) — the newly created field

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) addDate(label, month, day, year) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds a date to the contact with either an standard or custom label.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and adds a
// ContactsApp.ExtendedField.BIRTHDAY with the value "April 19, 1950".
constcontacts=ContactsApp.getContactsByName('John Doe');
constbirthday=contacts[0].addDate(
ContactsApp.Field.BIRTHDAY,
ContactsApp.Month.APRIL,
19,
1950,
);

Parameters

NameTypeDescription
labelObjectthe label of the new date, either from ContactsApp.Field or a custom string
monthMonth the month, from ContactApps.Month
dayIntegerthe day
yearIntegerthe year

Return

(削除) DateField (削除ここまで) — the newly created date

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) addEmail(label, address) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Add an email address with a standard label (home, work, etc.) or a custom label

// The code below retrieves a contact named "John Doe" and adds the email
// address "j.doe@example.com" to the ContactsApp.Field.HOME_EMAIL label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constemailField=contacts[0].addEmail(
ContactsApp.Field.HOME_EMAIL,
'j.doe@example.com',
);

Parameters

NameTypeDescription
labelObjectthe label of the new email, either from ContactsApp.Field or a custom string
addressStringthe new email address

Return

(削除) EmailField (削除ここまで) — the newly added field

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) addIM(label, address) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds an IM address to the contact with either a standard or custom label.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and adds the IM address
// "ChatWithJohn" with the ContactsApp.Field.AIM label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constemail=contacts[0].addIM(ContactsApp.Field.AIM,'ChatWithJohn');

Parameters

NameTypeDescription
labelObjectthe label of the new IM address, either from ContactsApp.Field or a custom string
addressStringthe new IM address

Return

(削除) IMField (削除ここまで) — the newly created field

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also

  • (削除) getIMs() (削除ここまで)

(削除) addPhone(label, number) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds a phone number to the contact with either a standard or custom label.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and adds the phone number
// "212-555-1234" with the ContactsApp.Field.WORK_PHONE label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constphone=contacts[0].addPhone(
ContactsApp.Field.WORK_PHONE,
'212-555-1234',
);

Parameters

NameTypeDescription
labelObjectthe label of the new phone number, either from ContactsApp.Field or a custom string
numberStringthe new phone number

Return

(削除) PhoneField (削除ここまで) — the newly created field

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) addToGroup(group) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds this contact to the given contact group.

// The code below creates a new contact and then adds it to the contact group
// named "Work Friends"
letcontact=ContactsApp.createContact('John','Doe','john.doe@example.com');
constgroup=ContactsApp.getContactGroup('Work Friends');
contact=contact.addToGroup(group);

Parameters

NameTypeDescription
group(削除) ContactGroup (削除ここまで)the contact group to add this contact to

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) addUrl(label, url) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Adds a URL to the contact with either a standard or custom label.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and adds the URL
// "http://www.example.com" with the ContactsApp.Field.WORK_WEBSITE label.
constcontacts=ContactsApp.getContactsByName('John Doe');
consturl=contacts[0].addUrl(
ContactsApp.Field.WORK_WEBSITE,
'http://www.example.com',
);

Parameters

NameTypeDescription
labelObjectthe label of the new address, either from ContactsApp.Field or a custom string
urlStringthe new URL

Return

(削除) UrlField (削除ここまで) — the newly created field

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) deleteContact() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Deletes this contact.

constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
contacts[i].deleteContact();
}

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getAddresses() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the addresses for this contact.

// The code below logs the addresses of all the contacts whose names contain
// "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getAddresses());
}

Return

(削除) AddressField[] (削除ここまで) — a list of addresses

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getAddresses(label) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the addresses for this contact matching a particular field.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and logs the addresses
// associated with that contact that are in the ContactsApp.Field.WORK_ADDRESS
// label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constaddresses=contacts[0].getAddresses(ContactsApp.Field.WORK_ADDRESS);
for(constiinaddresses){
Logger.log(addresses[i].getAddress());
}

Parameters

NameTypeDescription
labelObjectthe label to match, either from ContactsApp.Field or a custom string

Return

(削除) AddressField[] (削除ここまで) — a list of addresses

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getCompanies() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the companies for this contact.

// The code below logs the company names of all the contacts whose names contain
// "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
constcompanies=contacts[i].getCompanies();
for(constjincompanies){
Logger.log(companies[j].getCompanyName());
}
}

Return

(削除) CompanyField[] (削除ここまで) — a list of companies

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getContactGroups() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the contact groups that contain this contact.

// The code below gets a contact named "John Doe" and retrieves all the contact
// groups that the contact belongs to
constcontacts=ContactsApp.getContactsByName('John Doe');
constgroups=contacts[0].getContactGroups();

Return

(削除) ContactGroup[] (削除ここまで) — the groups containing this contact

See also


(削除) getCustomFields() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the custom fields for this contact.

// The code below retrieves a contact named "John Doe" and logs the custom
// fields associated with that contact
constcontacts=ContactsApp.getContactsByName('John Doe');
constfields=contacts[0].getCustomFields();
for(constiinfields){
Logger.log(fields[i].getValue());
}

Return

(削除) CustomField[] (削除ここまで) — a list of custom fields

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getCustomFields(label) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the custom fields for this contact matching a particular field.

The label can be either a standard label from ContactsApp.ExtendedField or a custom label string.

// The code below retrieves a contact named "John Doe" and logs the custom
// fields associated with that contact that are in the
// ContactsApp.ExtendedField.HOBBY label.
constcontacts=ContactsApp.getContactsByName('John Doe');
consthobbies=contacts[0].getCustomFields(ContactsApp.ExtendedField.HOBBY);
for(constiinhobbies){
Logger.log(hobbies[i].getValue());
}

Parameters

NameTypeDescription
labelObjectthe label to match, either from ContactsApp.ExtendedField or a custom string

Return

(削除) CustomField[] (削除ここまで) — a list of custom fields

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getDates() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the dates for this contact.

// The code below retrieves a contact named "John Doe" and logs the label of the
// date associated with that contact
constcontacts=ContactsApp.getContactsByName('John Doe');
constdates=contacts[0].getDates();
for(constiindates){
Logger.log(dates[i].getLabel());
}

Return

(削除) DateField[] (削除ここまで) — a list of dates

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getDates(label) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the dates for this contact matching a particular field.

The label can be either a standard label from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and logs the day of the
// month associated with that contact that are in the ContactsApp.Field.BIRTHDAY
// label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constbirthdays=contacts[0].getDates(ContactsApp.Field.BIRTHDAY);
for(constiinbirthdays){
Logger.log(birthdays[i].getDay());
}

Parameters

NameTypeDescription
labelObjectthe label to match, either from ContactsApp.Field or a custom string

Return

(削除) DateField[] (削除ここまで) — a list of dates

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getEmailAddresses() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets a list of the email addresses available for this Contact.

Return

String[] — a list of email addresses available for this Contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getEmails() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the email addresses of this contact.

// The code below retrieves a contact named "John Doe" and logs the email
// addresses associated with that contact
constcontacts=ContactsApp.getContactsByName('John Doe');
constemails=contacts[0].getEmails();
for(constiinemails){
Logger.log(emails[i].getAddress());
}

Return

(削除) EmailField[] (削除ここまで) — the list of email addresses for the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getEmails(label) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the email addresses for this contact matching a particular field.

The label can be either a standard label from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and logs the email
// addresses associated with that contact that are in the
// ContactsApp.Field.HOME_EMAIL label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constemails=contacts[0].getEmails(ContactsApp.Field.HOME_EMAIL);
for(constiinemails){
Logger.log(emails[i].getAddress());
}

Parameters

NameTypeDescription
labelObjectthe label to match, either from ContactsApp.Field or a custom string

Return

(削除) EmailField[] (削除ここまで) — the list of email addresses for the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getFamilyName() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the family name (last name) of the contact as a string.

// The code below logs the family name of all the contacts whose names contain
// "John"
constcontacts=ContactsApp.getContactsByName('John');
for(constiincontacts){
Logger.log(contacts[i].getFamilyName());
}

Return

String — the family name of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getFullName() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the full name (given name and last name) of the contact as a string.

// The code below logs the full name of all the contacts whose names contain
// "John"
constcontacts=ContactsApp.getContactsByName('John');
for(constiincontacts){
Logger.log(contacts[i].getFullName());
}

Return

String — the full name of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getGivenName() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the given name (first name) of the contact as a string.

// The code below logs the given name of all the contacts whose names contain
// "Smith"
constcontacts=ContactsApp.getContactsByName('Smith');
for(constiincontacts){
Logger.log(contacts[i].getGivenName());
}

Return

String — the given name of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getHomeAddress() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the home address of this Contact, or empty string if none exists.

Return

String — the home address of this Contact, or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getHomeFax() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the home fax number of this Contact or empty string if none exists.

Return

String — the home fax number of this Contact or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getHomePhone() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the home phone number of this Contact or empty string if none exists.

Return

String — the home phone number of this Contact or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getIMs() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the IM addresses for this contact.

// The code below logs the IM addresses of all the contacts whose names contain
// "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getIMs());
}

Return

(削除) IMField[] (削除ここまで) — a list of IM addresses

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getIMs(label) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the IM addresses for this contact matching a particular field.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and logs the IM addresses
// associated with that contact that are in the ContactsApp.Field.GOOGLE_TALK
// label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constimAddresses=contacts[0].getIMs(ContactsApp.Field.GOOGLE_TALK);
for(constiinimAddresses){
Logger.log(imAddresses[i].getAddress());
}

Parameters

NameTypeDescription
labelObjectthe label to match, either from ContactsApp.Field or a custom string

Return

(削除) IMField[] (削除ここまで) — a list of IM addresses

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getId() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Returns the unique id of this contact.

constcontact=ContactsApp.createContact(
'John',
'Doe',
'john.doe@example.com',
);
constid=contact.getId();

Return

String — the id of this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getInitials() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the contact's initials.

// The code below logs the initials of all the contacts whose names contain
// "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getInitials());
}

Return

String — the initials of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getLastUpdated() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the date this contact was last updated.

// The code below logs the last updated date of all the contacts whose names
// contain "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getLastUpdated());
}

Return

Date — the date this contact was last updated

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getMaidenName() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the maiden name of the contact as a string.

// The code below logs the maiden name of all the contacts whose names contain
// "Jane"
constcontacts=ContactsApp.getContactsByName('Jane');
for(constiincontacts){
Logger.log(contacts[i].getMaidenName());
}

Return

String — the maiden name of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getMiddleName() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the middle name of the contact as a string.

// The code below logs the middle name of all the contacts whose names contain
// "Smith"
constcontacts=ContactsApp.getContactsByName('Smith');
for(constiincontacts){
Logger.log(contacts[i].getMiddleName());
}

Return

String — the middle name of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getMobilePhone() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the mobile phone number of this Contact or empty string if none exists.

Return

String — the mobile phone number of this Contact or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getNickname() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the nickname of the contact as a string.

// The code below logs the nickname of all the contacts whose names contain
// "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getNickname());
}

Return

String — the nickname of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getNotes() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the notes associated with this contact, or an empty string if there are no notes.

// The code below logs the notes of all the contacts whose names contain "John
// Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getNotes());
}

Return

String — the notes associated with this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getPager() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the pager phone number of this Contact or empty string if none exists.

Return

String — the pager phone number of this Contact or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getPhones() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the phone numbers for this contact.

// The code below logs the phone numbers of all the contacts whose names contain
// "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getPhones());
}

Return

(削除) PhoneField[] (削除ここまで) — a list of phone numbers

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getPhones(label) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the phone numbers for this contact matching a particular field.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and logs the phone
// numbers associated with that contact that are in the
// ContactsApp.Field.WORK_PHONE label.
constcontacts=ContactsApp.getContactsByName('John Doe');
constphones=contacts[0].getPhones(ContactsApp.Field.WORK_PHONE);
for(constiinphones){
Logger.log(phones[i].getPhoneNumber());
}

Parameters

NameTypeDescription
labelObjectthe label to match, either from ContactsApp.Field or a custom string

Return

(削除) PhoneField[] (削除ここまで) — a list of phone numbers

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getPrefix() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the prefix to the contact's name.

// The code below logs the prefix of all the contacts whose names contain "John
// Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getPrefix());
}

Return

String — the prefix of the contact's name

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getPrimaryEmail() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the primary email address of the contact as a string.

// The code below logs the primary email address of all the contacts whose names
// contain "John Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getPrimaryEmail());
}

Return

String — the primary email address of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getShortName() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the short name of the contact as a string.

// The code below logs the short name of all the contacts whose names contain
// "Johnathan"
constcontacts=ContactsApp.getContactsByName('Johnathan');
for(constiincontacts){
Logger.log(contacts[i].getShortName());
}

Return

String — the short name of the contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getSuffix() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the suffix to the contact's name.

// The code below logs the suffix of all the contacts whose names contain "John
// Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getSuffix());
}

Return

String — the suffix of the contact's name

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getUrls() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the URLs for this contact.

// The code below logs the URLs of all the contacts whose names contain "John
// Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
Logger.log(contacts[i].getUrls());
}

Return

(削除) UrlField[] (削除ここまで) — a list of URLs

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getUrls(label) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the URLs for this contact matching a particular field.

The label can be either from ContactsApp.Field or a custom label string.

// The code below retrieves a contact named "John Doe" and logs the URLs
// associated with that contact that are in the ContactsApp.Field.WORK_WEBSITE
// label.
constcontacts=ContactsApp.getContactsByName('John Doe');
consturls=contacts[0].getUrls(ContactsApp.Field.WORK_WEBSITE);
for(constiinurls){
Logger.log(urls[i].getAddress());
}

Parameters

NameTypeDescription
labelObjectthe label to match, either from ContactsApp.Field or a custom string

Return

(削除) UrlField[] (削除ここまで) — a list of URLs

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) getUserDefinedField(key) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the user defined value associated with the given key.

Parameters

NameTypeDescription
keyStringthe key can be any basic type (String, int, etc.)

Return

String — the user defined content that has been stored with this key

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getUserDefinedFields() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets all the user defined fields for this Contact and returns them as the properties of a JavaScript Object.

Return

Object — the user defined fields for this Contact, as properties of a JavaScript Object

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getWorkAddress() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the work address of this Contact, or empty string if none exists.

Return

String — the work address of this Contact, or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getWorkFax() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the work fax number of this Contact or empty string if none exists.

Return

String — the work fax number of this Contact or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) getWorkPhone() (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Gets the work phone number of this Contact or empty string if none exists.

Return

String — the work phone number of this Contact or empty string if none exists

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) removeFromGroup(group) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Removes this contact from the given contact group.

// The code below gets all the contacts named "John Doe" and then removes each
// of them from the "Work Friends" contact group
constcontacts=ContactsApp.getContactsByName('John Doe');
constgroup=ContactsApp.getContactGroup('Work Friends');
for(constiincontacts){
contacts[i]=contacts[i].removeFromGroup(group);
}

Parameters

NameTypeDescription
group(削除) ContactGroup (削除ここまで)the contact group to remove this contact from

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setFamilyName(familyName) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the family name (last name) of the contact.

// The code below changes the family name of all the contacts whose names are
// "John Doe" to "Doe-Smith"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
contacts[i].setFamilyName('Doe-Smith');
}

Parameters

NameTypeDescription
familyNameStringthe new family name of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setFullName(fullName) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the full name (given name and last name) of the contact.

// The code below changes the full name of all the contacts whose names are
// "John Doe" to "Johnny Doe"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
contacts[i].setFullName('Johnny Doe');
}

Parameters

NameTypeDescription
fullNameStringthe new full name of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setGivenName(givenName) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the given name (first name) of the contact.

// The code below changes the given name of all the contacts whose names are
// "John Doe" to "Johnny"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
contacts[i].setGivenName('Johnny');
}

Parameters

NameTypeDescription
givenNameStringthe new given name of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setHomeAddress(addr) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the home address of this Contact.

Parameters

NameTypeDescription
addrStringthe home address to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setHomeFax(phone) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the home fax number of this Contact.

Parameters

NameTypeDescription
phoneStringthe home fax number to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setHomePhone(phone) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the home phone number of this Contact.

Parameters

NameTypeDescription
phoneStringthe home phone number to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setInitials(initials) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the contact's initials.

// The code below sets the initials of all the contacts whose names are
// "Johnathan Doe" to "JD"
constcontacts=ContactsApp.getContactsByName('Johnathan Doe');
for(constiincontacts){
contacts[i].setInitials('JD');
}

Parameters

NameTypeDescription
initialsStringthe new initials of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setMaidenName(maidenName) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the maiden name of the contact.

// The code below changes the maiden name of all the contacts whose names are
// "Jane Doe" to "Smith"
constcontacts=ContactsApp.getContactsByName('Jane Doe');
for(constiincontacts){
contacts[i].setMaidenName('Smith');
}

Parameters

NameTypeDescription
maidenNameStringthe new maiden name of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setMiddleName(middleName) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the middle name of the contact.

// The code below changes the middle name of all the contacts whose names are
// "John Doe" to "Danger"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
contacts[i].setMiddleName('Danger');
}

Parameters

NameTypeDescription
middleNameStringthe new middle name of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setMobilePhone(phone) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the mobile phone number of this Contact.

Parameters

NameTypeDescription
phoneStringthe mobile phone number to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setNickname(nickname) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the nickname of the contact.

// The code below changes the nickname of all the contacts whose names are "John
// Doe" to "JohnnyD"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
contacts[i].setNickname('JohnnyD');
}

Parameters

NameTypeDescription
nicknameStringthe new nickname of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setNotes(notes) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the notes associated with this contact.

// The code below sets the notes of all the contacts whose names are "John Doe"
// to "Met him at the hackathon"
constcontacts=ContactsApp.getContactsByName('John Doe');
for(constiincontacts){
contacts[i].setNotes('Met him at the hackathon');
}

Parameters

NameTypeDescription
notesStringthe notes to be stored for this contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setPager(phone) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the pager number of this Contact.

Parameters

NameTypeDescription
phoneStringthe pager number to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setPrefix(prefix) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the prefix to the contact's name.

// The code below sets the prefix of all the contacts whose names are "Johnathan
// Doe" to "Mr"
constcontacts=ContactsApp.getContactsByName('Johnathan Doe');
for(constiincontacts){
contacts[i].setPrefix('Mr');
}

Parameters

NameTypeDescription
prefixStringthe new prefix of the contact's name

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setPrimaryEmail(primaryEmail) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the primary email address of this Contact.

Parameters

NameTypeDescription
primaryEmailStringthe primary email address to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setShortName(shortName) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the short name of the contact.

// The code below changes the short name of all the contacts whose names are
// "Johnathan Doe" to "John"
constcontacts=ContactsApp.getContactsByName('Johnathan Doe');
for(constiincontacts){
contacts[i].setShortName('John');
}

Parameters

NameTypeDescription
shortNameStringthe new short name of the contact

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setSuffix(suffix) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the suffix to the contact's name.

// The code below sets the suffix of all the contacts whose names are "Johnathan
// Doe" to "Jr"
constcontacts=ContactsApp.getContactsByName('Johnathan Doe');
for(constiincontacts){
contacts[i].setSuffix('Jr');
}

Parameters

NameTypeDescription
suffixStringthe new suffix of the contact's name

Return

(削除) Contact (削除ここまで) — this contact

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

See also


(削除) setUserDefinedField(key, value) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets a single user defined field for this Contact, to be stored with a given key.

Parameters

NameTypeDescription
keyStringthe key can be any basic type (String, int, etc.)
valueStringthe value can be any basic type (String, int, etc.)

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setUserDefinedFields(o) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the user defined fields for this Contact with the properties of the given Object.

Parameters

NameTypeDescription
oObjectan Object with one or more properties in the form {key: value}

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setWorkAddress(addr) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the work address of this Contact.

Parameters

NameTypeDescription
addrStringthe work address to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setWorkFax(phone) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the work fax number of this Contact.

Parameters

NameTypeDescription
phoneStringthe work fax number to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

(削除) setWorkPhone(phone) (削除ここまで)

Deprecated. This function is deprecated and should not be used in new scripts.

Sets the work phone number of this Contact.

Parameters

NameTypeDescription
phoneStringthe work phone number to set

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.google.com/m8/feeds

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年12月02日 UTC.