Class Contact

連絡先

非推奨。代わりに、People API アドバンスト サービスを使用してください。

連絡先には、連絡先の名前、住所、さまざまな連絡先情報が含まれます。

メソッド戻り値の型概要
addAddress(label, address)AddressField標準ラベルまたはカスタムラベルを使用して、連絡先にアドレスを追加します。
addCompany(company, title)CompanyField連絡先に会社を追加します。
addCustomField(label, content)CustomField拡張ラベルまたはカスタムラベルを使用して、連絡先にカスタム フィールドを追加します。
addDate(label, month, day, year)DateField標準ラベルまたはカスタムラベルを使用して、連絡先に日付を追加します。
addEmail(label, address)EmailField標準ラベル(自宅、職場など)またはカスタムラベルを使用してメールアドレスを追加します
{@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標準ラベルまたはカスタムラベルを使用して、連絡先に IM アドレスを追加します。
addPhone(label, number)PhoneField標準ラベルまたはカスタムラベルを使用して、連絡先に電話番号を追加します。
addToGroup(group)Contactこの連絡先を指定された連絡先グループに追加します。
addUrl(label, url)UrlField標準ラベルまたはカスタムラベルを使用して、連絡先に URL を追加します。
deleteContact()voidこの連絡先を削除します。
getAddresses()AddressField[]この連絡先のすべてのアドレスを取得します。
getAddresses(label)AddressField[]特定のフィールドに一致する、この連絡先のすべての住所を取得します。
getCompanies()CompanyField[]この連絡先のすべての会社を取得します。
getContactGroups()ContactGroup[]この連絡先を含むすべての連絡先グループを取得します。
getCustomFields()CustomField[]この連絡先のすべてのカスタム フィールドを取得します。
getCustomFields(label)CustomField[]特定のフィールドに一致する、この連絡先のカスタム項目をすべて取得します。
getDates()DateField[]この連絡先のすべての日付を取得します。
getDates(label)DateField[]特定のフィールドに一致するこの連絡先のすべての日付を取得します。
getEmailAddresses()String[]この連絡先で使用可能なメールアドレスのリストを取得します。
getEmails()EmailField[]この連絡先のメールアドレスを取得します。
getEmails(label)EmailField[]特定のフィールドに一致するこの連絡先のメールアドレスを取得します。
getFamilyName()String連絡先の姓を文字列として取得します。
getFullName()String連絡先のフルネーム(名と姓)を文字列として取得します。
getGivenName()String連絡先の名前(名)を文字列として取得します。
getHomeAddress()Stringこの連絡先の自宅住所を取得します。住所が存在しない場合は空の文字列を返します。
getHomeFax()Stringこの連絡先の自宅 FAX 番号を取得します。番号が存在しない場合は空の文字列を返します。
getHomePhone()Stringこの連絡先の自宅の電話番号を取得します。番号が存在しない場合は空の文字列を返します。
getIMs()IMField[]この連絡先のすべての IM アドレスを取得します。
getIMs(label)IMField[]特定のフィールドに一致する、この連絡先のすべての IM アドレスを取得します。
getId()Stringこの連絡先の一意の ID を返します。
getInitials()String連絡先のイニシャルを取得します。
getLastUpdated()Dateこの連絡先が最後に更新された日付を取得します。
getMaidenName()String連絡先の旧姓を文字列として取得します。
getMiddleName()String連絡先のミドルネームを文字列として取得します。
getMobilePhone()Stringこの連絡先の携帯電話番号を取得します。番号が存在しない場合は空の文字列を返します。
getNickname()String連絡先のニックネームを文字列として取得します。
getNotes()Stringこの連絡先に関連付けられているメモを取得します。メモがない場合、空の文字列を返します。
getPager()Stringこの連絡先のページャーの電話番号を取得します。存在しない場合は空の文字列を返します。
getPhones()PhoneField[]この連絡先のすべての電話番号を取得します。
getPhones(label)PhoneField[]特定のフィールドに一致する、この連絡先のすべての電話番号を取得します。
getPrefix()String連絡先の名前の接頭辞を取得します。
getPrimaryEmail()String連絡先のメインのメールアドレスを文字列として取得します。
getShortName()String連絡先の短い名前を文字列として取得します。
getSuffix()String連絡先の名前の接尾辞を取得します。
getUrls()UrlField[]この連絡先のすべての URL を取得します。
getUrls(label)UrlField[]特定のフィールドに一致するこの連絡先のすべての URL を取得します。
getUserDefinedField(key)String指定されたキーに関連付けられたユーザー定義値を取得します。
getUserDefinedFields()Objectこの連絡先のすべてのユーザー定義フィールドを取得し、JavaScript オブジェクトのプロパティとして返します。
getWorkAddress()Stringこの連絡先の職場の住所を取得します。存在しない場合は空の文字列を返します。
getWorkFax()Stringこの連絡先の仕事用ファックス番号を取得します。存在しない場合は空の文字列を返します。
getWorkPhone()Stringこの連絡先の仕事用電話番号を取得します。電話番号が存在しない場合は空の文字列を返します。
removeFromGroup(group)Contact指定した連絡先グループからこの連絡先を削除します。
setFamilyName(familyName)Contact連絡先の姓を設定します。
setFullName(fullName)Contact連絡先のフルネーム(名と姓)を設定します。
setGivenName(givenName)Contact連絡先の名前(名)を設定します。
setHomeAddress(addr)voidこの連絡先の自宅の住所を設定します。
setHomeFax(phone)voidこの連絡先の自宅 FAX 番号を設定します。
setHomePhone(phone)voidこの連絡先の自宅電話番号を設定します。
setInitials(initials)Contact連絡先のイニシャルを設定します。
setMaidenName(maidenName)Contact連絡先の旧姓を設定します。
setMiddleName(middleName)Contact連絡先のミドルネームを設定します。
setMobilePhone(phone)voidこの連絡先の携帯電話番号を設定します。
setNickname(nickname)Contact連絡先のニックネームを設定します。
setNotes(notes)Contactこの連絡先に関連付けられたメモを設定します。
setPager(phone)voidこの連絡先のページャー番号を設定します。
setPrefix(prefix)Contact連絡先の名前に接頭辞を設定します。
setPrimaryEmail(primaryEmail)voidこの連絡先のメインのメールアドレスを設定します。
setShortName(shortName)Contact連絡先の略称を設定します。
setSuffix(suffix)Contact連絡先の名前に接尾辞を設定します。
setUserDefinedField(key, value)voidこの連絡先に 1 つのユーザー定義フィールドを設定し、指定されたキーで保存します。
setUserDefinedFields(o)voidこの連絡先のユーザー定義フィールドを、指定されたオブジェクトのプロパティで設定します。
setWorkAddress(addr)voidこの連絡先の職場の住所を設定します。
setWorkFax(phone)voidこの連絡先の勤務先 FAX 番号を設定します。
setWorkPhone(phone)voidこの連絡先の仕事用電話番号を設定します。

サポート終了のメソッド

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

標準ラベルまたはカスタムラベルを使用して、連絡先にアドレスを追加します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const address = contacts[0].addAddress(
    ContactsApp.Field.WORK_ADDRESS,
    '123 Main St, Some City, NY 10011',
);

パラメータ

名前説明
labelObject新しい住所のラベル(ContactsApp.Field またはカスタム文字列)
addressString新しい住所

戻る

AddressField - 新しく作成されたフィールド

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先に会社を追加します。

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

パラメータ

名前説明
companyStringこの連絡先に追加する会社の名前
titleStringこの会社でこの連絡先に関連付けられている役職

戻る

CompanyField - 新しく作成されたフィールド

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

拡張ラベルまたはカスタムラベルを使用して、連絡先にカスタム フィールドを追加します。

ラベルは、ContactsApp.ExtendedField またはカスタムラベル文字列のいずれかです。

// 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'.
const contacts = ContactsApp.getContactsByName('John Doe');
contacts[0].addCustomField(ContactsApp.ExtendedField.HOBBY, 'hiking');

パラメータ

名前説明
labelObject新しい住所のラベル(ContactsApp.ExtendedField またはカスタム文字列)
contentObjectカスタム フィールドに格納する値

戻る

CustomField - 新しく作成されたフィールド

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

標準ラベルまたはカスタムラベルを使用して、連絡先に日付を追加します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

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

パラメータ

名前説明
labelObject新しい日付のラベル(ContactsApp.Field またはカスタム文字列)
monthMonthContactApps.Month の月
dayInteger
yearInteger

戻る

DateField - 新しく作成された日付

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

標準ラベル(自宅、職場など)またはカスタムラベルを使用してメールアドレスを追加します

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const emailField = contacts[0].addEmail(
    ContactsApp.Field.HOME_EMAIL,
    'j.doe@example.com',
);

パラメータ

名前説明
labelObject新しいメールのラベル(ContactsApp.Field またはカスタム文字列)
addressString新しいメールアドレス

戻る

EmailField - 新しく追加されたフィールド

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

標準ラベルまたはカスタムラベルを使用して、連絡先に IM アドレスを追加します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

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

パラメータ

名前説明
labelObject新しい IM アドレスのラベル(ContactsApp.Field またはカスタム文字列)
addressString新しい IM アドレス

戻る

IMField - 新しく作成されたフィールド

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

標準ラベルまたはカスタムラベルを使用して、連絡先に電話番号を追加します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

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

パラメータ

名前説明
labelObject新しい電話番号のラベル(ContactsApp.Field またはカスタム文字列)
numberString新しい電話番号

戻る

PhoneField - 新しく作成されたフィールド

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先を指定された連絡先グループに追加します。

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

パラメータ

名前説明
groupContactGroupこの連絡先を追加する連絡先グループ

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

標準ラベルまたはカスタムラベルを使用して、連絡先に URL を追加します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

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

パラメータ

名前説明
labelObject新しい住所のラベル(ContactsApp.Field またはカスタム文字列)
urlString新しい URL

戻る

UrlField - 新しく作成されたフィールド

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先を削除します。

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

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべてのアドレスを取得します。

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

戻る

AddressField[] - アドレスのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

特定のフィールドに一致する、この連絡先のすべての住所を取得します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const addresses = contacts[0].getAddresses(ContactsApp.Field.WORK_ADDRESS);
for (const i in addresses) {
  Logger.log(addresses[i].getAddress());
}

パラメータ

名前説明
labelObject一致させるラベル(ContactsApp.Field またはカスタム文字列)

戻る

AddressField[] - アドレスのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべての会社を取得します。

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

戻る

CompanyField[] - 企業のリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先を含むすべての連絡先グループを取得します。

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

戻る

ContactGroup[] - この連絡先を含むグループ

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべてのカスタム フィールドを取得します。

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

戻る

CustomField[] - カスタム フィールドのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

特定のフィールドに一致する、この連絡先のすべてのカスタム フィールドを取得します。

ラベルは、ContactsApp.ExtendedField の標準ラベルまたはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const hobbies = contacts[0].getCustomFields(ContactsApp.ExtendedField.HOBBY);
for (const i in hobbies) {
  Logger.log(hobbies[i].getValue());
}

パラメータ

名前説明
labelObject一致させるラベル(ContactsApp.ExtendedField またはカスタム文字列)

戻る

CustomField[] - カスタム フィールドのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべての日付を取得します。

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

戻る

DateField[] - 日付のリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

特定のフィールドに一致するこの連絡先のすべての日付を取得します。

ラベルは、ContactsApp.Field の標準ラベルまたはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const birthdays = contacts[0].getDates(ContactsApp.Field.BIRTHDAY);
for (const i in birthdays) {
  Logger.log(birthdays[i].getDay());
}

パラメータ

名前説明
labelObject一致させるラベル(ContactsApp.Field またはカスタム文字列)

戻る

DateField[] - 日付のリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先で使用可能なメールアドレスのリストを取得します。

戻る

String[] - この連絡先で使用可能なメールアドレスのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のメールアドレスを取得します。

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

戻る

EmailField[] - 連絡先のメールアドレスのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

特定のフィールドに一致するこの連絡先のメールアドレスを取得します。

ラベルは、ContactsApp.Field の標準ラベルまたはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const emails = contacts[0].getEmails(ContactsApp.Field.HOME_EMAIL);
for (const i in emails) {
  Logger.log(emails[i].getAddress());
}

パラメータ

名前説明
labelObject一致させるラベル(ContactsApp.Field またはカスタム文字列)

戻る

EmailField[] - 連絡先のメールアドレスのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の姓を文字列として取得します。

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

戻る

String - 連絡先の姓

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のフルネーム(名と姓)を文字列として取得します。

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

戻る

String - 連絡先のフルネーム

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の名前(名)を文字列として取得します。

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

戻る

String - 連絡先の名前(名)

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の自宅住所を取得します。住所が存在しない場合は空の文字列を返します。

戻る

String - この連絡先の自宅住所。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の自宅 FAX 番号を取得します。番号が存在しない場合は空の文字列を返します。

戻る

String - この連絡先の自宅 FAX 番号。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の自宅の電話番号を取得します。電話番号が存在しない場合は空の文字列を返します。

戻る

String - この連絡先の自宅電話番号。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべての IM アドレスを取得します。

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

戻る

IMField[] - IM アドレスのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

特定のフィールドに一致する、この連絡先のすべての IM アドレスを取得します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const imAddresses = contacts[0].getIMs(ContactsApp.Field.GOOGLE_TALK);
for (const i in imAddresses) {
  Logger.log(imAddresses[i].getAddress());
}

パラメータ

名前説明
labelObject一致させるラベル(ContactsApp.Field またはカスタム文字列)

戻る

IMField[] - IM アドレスのリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の一意の ID を返します。

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

戻る

String - この連絡先の ID

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のイニシャルを取得します。

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

戻る

String - 連絡先のイニシャル

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先が最後に更新された日付を取得します。

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

戻る

Date - この連絡先が最後に更新された日付

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の旧姓を文字列として取得します。

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

戻る

String - 連絡先の旧姓

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のミドルネームを文字列として取得します。

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

戻る

String - 連絡先のミドルネーム

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の携帯電話番号を取得します。番号が存在しない場合は空の文字列を返します。

戻る

String - この連絡先の携帯電話番号。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のニックネームを文字列として取得します。

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

戻る

String - 連絡先のニックネーム

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先に関連付けられているメモを取得します。メモがない場合、空の文字列を返します。

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

戻る

String - この連絡先に関連付けられたメモ

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のページャーの電話番号を取得します。存在しない場合は空の文字列を返します。

戻る

String - この連絡先のページャーの電話番号。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべての電話番号を取得します。

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

戻る

PhoneField[] - 電話番号のリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

特定のフィールドに一致する、この連絡先のすべての電話番号を取得します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const phones = contacts[0].getPhones(ContactsApp.Field.WORK_PHONE);
for (const i in phones) {
  Logger.log(phones[i].getPhoneNumber());
}

パラメータ

名前説明
labelObject一致させるラベル(ContactsApp.Field またはカスタム文字列)

戻る

PhoneField[] - 電話番号のリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の名前の接頭辞を取得します。

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

戻る

String - 連絡先の名前の接頭辞

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のメインのメールアドレスを文字列として取得します。

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

戻る

String - 連絡先のメインのメールアドレス

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の短い名前を文字列として取得します。

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

戻る

String - 連絡先の省略名

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の名前の接尾辞を取得します。

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

戻る

String - 連絡先の名前の接尾辞

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべての URL を取得します。

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

戻る

UrlField[] - URL のリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

特定のフィールドに一致するこの連絡先のすべての URL を取得します。

ラベルは、ContactsApp.Field またはカスタムラベル文字列のいずれかです。

// 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.
const contacts = ContactsApp.getContactsByName('John Doe');
const urls = contacts[0].getUrls(ContactsApp.Field.WORK_WEBSITE);
for (const i in urls) {
  Logger.log(urls[i].getAddress());
}

パラメータ

名前説明
labelObject一致させるラベル(ContactsApp.Field またはカスタム文字列)

戻る

UrlField[] - URL のリスト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

指定されたキーに関連付けられたユーザー定義値を取得します。

パラメータ

名前説明
keyStringキーには任意の基本型(String、int など)を指定できます。

戻る

String - このキーで保存されたユーザー定義コンテンツ

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のすべてのユーザー定義フィールドを取得し、JavaScript オブジェクトのプロパティとして返します。

戻る

Object - この連絡先のユーザー定義フィールド(JavaScript オブジェクトのプロパティとして)

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の職場の住所を取得します。存在しない場合は空の文字列を返します。

戻る

String - この連絡先の職場の住所。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のビジネス用ファックス番号を取得します。番号が存在しない場合は空の文字列を返します。

戻る

String - この連絡先の職場の FAX 番号。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の仕事用電話番号を取得します。電話番号が存在しない場合は空の文字列を返します。

戻る

String - この連絡先の職場の電話番号。存在しない場合は空の文字列

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

指定した連絡先グループからこの連絡先を削除します。

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

パラメータ

名前説明
groupContactGroupこの連絡先を削除する連絡先グループ

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の姓を設定します。

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

パラメータ

名前説明
familyNameString連絡先の新しい姓

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のフルネーム(名と姓)を設定します。

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

パラメータ

名前説明
fullNameString連絡先の新しい氏名

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の名前(名)を設定します。

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

パラメータ

名前説明
givenNameString連絡先の新しい名前(名)

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の自宅の住所を設定します。

パラメータ

名前説明
addrString設定する自宅の住所

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の自宅 FAX 番号を設定します。

パラメータ

名前説明
phoneString設定する自宅の FAX 番号

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の自宅電話番号を設定します。

パラメータ

名前説明
phoneString設定する自宅の電話番号

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のイニシャルを設定します。

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

パラメータ

名前説明
initialsString連絡先の新しいイニシャル

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の旧姓を設定します。

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

パラメータ

名前説明
maidenNameString連絡先の新しい旧姓

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のミドルネームを設定します。

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

パラメータ

名前説明
middleNameString連絡先の新しいミドルネーム

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の携帯電話番号を設定します。

パラメータ

名前説明
phoneString設定する携帯電話番号

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先のニックネームを設定します。

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

パラメータ

名前説明
nicknameString連絡先の新しいニックネーム

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先に関連付けられたメモを設定します。

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

パラメータ

名前説明
notesStringこの連絡先に保存するメモ

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のページャー番号を設定します。

パラメータ

名前説明
phoneString設定するページャー番号

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の名前に接頭辞を設定します。

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

パラメータ

名前説明
prefixString連絡先の名前の新しい接頭辞

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のメインのメールアドレスを設定します。

パラメータ

名前説明
primaryEmailString設定するメインのメールアドレス

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の略称を設定します。

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

パラメータ

名前説明
shortNameString連絡先の新しい略称

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

連絡先の名前に接尾辞を設定します。

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

パラメータ

名前説明
suffixString連絡先の名前の新しい接尾辞

戻る

Contact - この連絡先

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

関連情報


非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先に 1 つのユーザー定義フィールドを設定し、指定されたキーで保存します。

パラメータ

名前説明
keyStringキーには任意の基本型(String、int など)を指定できます。
valueString値は任意の基本型(String、int など)にできます。

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先のユーザー定義フィールドを、指定されたオブジェクトのプロパティで設定します。

パラメータ

名前説明
oObject{key: value} 形式の 1 つ以上のプロパティを持つオブジェクト

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の職場の住所を設定します。

パラメータ

名前説明
addrString設定する職場の住所

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の勤務先 FAX 番号を設定します。

パラメータ

名前説明
phoneString設定する職場の FAX 番号

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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

非推奨。この関数は非推奨のため、新しいスクリプトでは使用しないでください。

この連絡先の仕事用電話番号を設定します。

パラメータ

名前説明
phoneString設定する仕事用の電話番号

承認

このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。

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