جمع جهات الاتصال وإدارتها في Google Chat

يشرح هذا الدليل التوجيهي كيفية إنشاء تطبيق Google Chat يساعد في يدير مستخدمو Google Chat جهات الاتصال الشخصية وجهات الاتصال الخاصة بالنشاط التجاري. لجمع المعلومات، يطلب تطبيق Chat من المستخدمين إكمال نموذج تواصل في رسائل البطاقات وملفات الحوار.

إليك بعض الأمثلة على استخدام تطبيق Chat:

  • نموذج الاتصال من أمر الشرطة المائلة.
    الشكل 1. يردّ تطبيق Chat على الرمز المائل /about برسالة نصية وزر يؤديان إلى فتح نموذج اتصال.
  • نموذج تواصل في مربّع حوار
    الشكل 2. تشير رسالة الأشكال البيانية يفتح تطبيق Chat مربّع حوار حيث يمكن للمستخدمين إدخال معلومات حول جهة اتصال
  • مربّع حوار التأكيد والمراجعة
    الشكل 3. تشير رسالة الأشكال البيانية يعرض تطبيق Chat مربّع حوار للتأكيد حتى يمكن للمستخدمين مراجعة المعلومات وتأكيدها قبل الإرسال.
  • رسالة نصية تؤكّد جهة الاتصال الجديدة
    الشكل 4 بعد أن يقدم المستخدم النموذج، يرسل تطبيق Chat رسالة رسالة نصية لتأكيد عملية الإرسال.
  • نموذج التواصل من رسالة البطاقة
    الشكل 5. يطلب تطبيق Chat من المستخدمين أيضًا إضافة جهة اتصال من بطاقة في رسالة.

المتطلبات الأساسية

الأهداف

البنية

يأتي تطبيق Chat مدمجًا برمجة تطبيقات Google واستخدامها أحداث التفاعل المطلوب معالجتها والردّ على مستخدمي Chat

يوضّح ما يلي كيفية تفاعل المستخدم عادةً مع تطبيق Chat:

  1. يفتح المستخدم رسالة مباشرة باستخدام تطبيق Chat. إضافة تطبيق Chat إلى مساحة حالية.

  2. يطلب تطبيق Chat من المستخدم إضافة جهة اتصال من خلال إنشاء نموذج تواصل وعرضه كعنصر card . لمشاركة نموذج التواصل، يمكن لتطبيق Chat للاستجابة للمستخدمين بالطرق التالية:

    • يرد على الإشارات باستخدام @والرسائل المباشرة برسالة بطاقة على نموذج الاتصال.
    • للرد على أمر الشرطة المائلة /addContact من خلال فتح مربع حوار يحتوي على نموذج الاتصال.
    • يستجيب لأمر الشرطة المائلة /about برسالة نصية تحتوي على زر إضافة جهة اتصال يمكن للمستخدمين النقر عليه لفتح مربّع حوار يضم نموذج الاتصال.
  3. عند عرض نموذج التواصل، يُدخل المستخدم معلومات الاتصال في الحقول والتطبيقات المصغّرة التالية:

    • الاسم الأول واسم العائلة: textInput التي تقبل السلاسل.
    • تاريخ الميلاد: dateTimePicker أداة تقبل التواريخ فقط.
    • نوع جهة الاتصال: a selectionInput تطبيق مصغّر لأزرار اختيار تتيح للمستخدمين اختيار سلسلة واحدة وإرسالها القيمة (إما Personal أو Work).
    • زر المراجعة والإرسال: buttonList مصفوفة بها تطبيق مصغّر button ينقر عليه المستخدم لإرسال القيم البيانات التي يضيفونها.
  4. يعالج تطبيق Google Chat حدث تفاعل CARD_CLICKED لمعالجة القيم التي يُدخلها المستخدم، ويعرض القيم في بطاقة تأكيد.

  5. يراجع المستخدم بطاقة التأكيد وينقر على الزر إرسال لإنهاء معلومات الاتصال.

  6. يرسل تطبيق Google Chat رسالة نصية خاصة لتأكيد الإرسال.

تحضير البيئة

يعرض هذا القسم كيفية إنشاء مشروع على Google Cloud وإعداده من أجل تطبيق Chat

إنشاء مشروع على Google Cloud

وحدة التحكّم في Google Cloud

  1. في وحدة التحكّم في Google Cloud، انتقِل إلى القائمة . > إدارة الهوية وإمكانية الوصول و المشرف > إنشاء مشروع.

    الانتقال إلى صفحة "إنشاء مشروع"

  2. في حقل اسم المشروع، أدخِل اسمًا وصفيًا لمشروعك.

    اختياري: لتعديل رقم تعريف المشروع، انقر على تعديل. لا يمكن تغيير رقم تعريف المشروع. بعد إنشاء المشروع، لذا اختر رقم تعريف يلبي احتياجاتك طوال مشروعك.

  3. في حقل الموقع الجغرافي، انقر على تصفّح لعرض المواقع الجغرافية المحتمَلة. مشروعك. بعد ذلك، انقر على اختيار.
  4. انقر على إنشاء. تنتقل وحدة تحكّم Google Cloud إلى صفحة "لوحة البيانات" ويتم إنشاء مشروعك في غضون بضع دقائق.

gcloud CLI

في إحدى بيئات التطوير التالية، يمكنك الوصول إلى Google Cloud واجهة سطر الأوامر (gcloud):

  • Cloud Shell: لاستخدام وحدة طرفية على الإنترنت مع gcloud CLI سبق أن تم إعداده، يُرجى تفعيل Cloud Shell.
    تفعيل Cloud Shell
  • Local Shell: لاستخدام بيئة تطوير محلية، تثبيت الإعداد واجهة سطر الأوامر gcloud.
    لإنشاء مشروع على السحابة الإلكترونية، استخدِم الأمر gcloud projects create:
    gcloud projects create PROJECT_ID
    استبدِل PROJECT_ID من خلال ضبط رقم تعريف المشروع الذي تريد إنشاءه.

إعداد المصادقة والتفويض

تتطلّب تطبيقات Google Chat ضبط إعدادات شاشة موافقة OAuth حتى يمكن للمستخدمين منح إذن الوصول لتطبيقك في تطبيقات Google Workspace، بما في ذلك Google Chat

في هذا الدليل التعليمي، يتم نشر تطبيق Chat مخصّص فقط للاختبار والاستخدام الداخلي، لذا لا بأس باستخدام معلومات العنصر النائب لشاشة الموافقة. قبل نشر تطبيق Chat، استبدِع أي معلومات نائبة بمعلومات حقيقية.

  1. في وحدة تحكّم Google Cloud، انتقِل إلى القائمة > واجهات برمجة التطبيقات والخدمات > شاشة موافقة OAuth.

    الانتقال إلى شاشة طلب الموافقة المتعلّقة ببروتوكول OAuth

  2. ضمن نوع المستخدم، اختَر داخلي، ثم انقر على إنشاء.

  3. في اسم التطبيق، اكتب Contact Manager.

  4. في عنوان البريد الإلكتروني لفريق دعم المستخدمين، اختَر عنوان بريدك الإلكتروني أو مجموعة مناسبة في Google.

  5. ضمن معلومات الاتصال بالمطوِّر، أدخِل عنوان بريدك الإلكتروني.

  6. انقر على حفظ ومتابعة.

  7. في صفحة النطاقات، انقر على حفظ ومتابعة. ( لا يتطلّب تطبيق Chat أي نطاقات OAuth).

  8. راجِع الملخّص، ثم انقر على الرجوع إلى لوحة البيانات.

إنشاء تطبيق Chat ونشره

في القسم التالي، ستنسخ وتُعدِّل مشروعًا كاملاً من "برمجة تطبيقات Google" يحتوي على كل رمز التطبيق المطلوب لتطبيق Chat، لذا لن يكون عليك نسخ كل ملف ولصقه.

يمكنك اختياريًا عرض المشروع بالكامل على GitHub.

العرض على GitHub

في ما يلي نظرة عامة على كل ملف:

main.gs

معالجة جميع منطق التطبيق، بما في ذلك أحداث التفاعل حول وقت إرسال المستخدمين الرسائل إلى تطبيق Chat، انقر على الأزرار من رسالة تطبيق في Chat أو فتح مربّعات الحوار وإغلاقها

عرض رمز main.gs

apps-script/contact-form-app/main.gs
/**
 * Copyright 2024 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Responds to a MESSAGE interaction event in Google Chat.
 *
 * @param {Object} event the MESSAGE interaction event from Chat API.
 * @return {Object} message response that opens a dialog or sends private
 *                          message with text and card.
 */
function onMessage(event) {
  if (event.message.slashCommand) {
    switch (event.message.slashCommand.commandId) {
      case 1:
        // If the slash command is "/about", responds with a text message and button
        // that opens a dialog.
        return {
          text: "Manage your personal and business contacts 📇. To add a " +
                  "contact, use the slash command `/addContact`.",
          accessoryWidgets: [{ buttonList: { buttons: [{
            text: "Add Contact",
            onClick: { action: {
              function: "openDialog",
              interaction: "OPEN_DIALOG"
            }}
          }]}}]
        }
      case 2:
        // If the slash command is "/addContact", opens a dialog.
        return openDialog(event);
    }
  }

  // If user sends the Chat app a message without a slash command, the app responds
  // privately with a text and card to add a contact.
  return {
    privateMessageViewer: event.user,
    text: "To add a contact, try `/addContact` or complete the form below:",
    cardsV2: [{
      cardId: "addContactForm",
      card: {
        header: { title: "Add a contact" },
        sections:[{ widgets: CONTACT_FORM_WIDGETS.concat([{
          buttonList: { buttons: [{
            text: "Review and submit",
            onClick: { action: { function : "openNextCard" }}
          }]}
        }])}]
      }
    }]
  };
}

/**
 * Responds to CARD_CLICKED interaction events in Google Chat.
 *
 * @param {Object} event the CARD_CLICKED interaction event from Google Chat
 * @return {Object} message responses specific to the dialog handling.
 */
function onCardClick(event) {
  // Initial dialog form page
  if (event.common.invokedFunction === "openDialog") {
    return openDialog(event);
  // Second dialog form page
  } else if (event.common.invokedFunction === "openNextCard") {
    return openNextCard(
      event.user,
      fetchFormValue(event, "contactName"),
      fetchFormValue(event, "contactBirthdate"),
      fetchFormValue(event, "contactType"),
      event.isDialogEvent
    );
  // Dialog form submission
  } else if (event.common.invokedFunction === "submitForm") {
    const userInputs = event.common.parameters;
    return submitForm(event.user, userInputs, event.dialogEventType);
  }
}

/**
 * Extracts form input value for a given widget.
 *
 * @param {Object} event the CARD_CLICKED interaction event from Google Chat.
 * @param {String} widgetName a unique ID for the widget, specified in the widget's name field.
 * @returns the value inputted by the user, null if no value can be found.
 */
function fetchFormValue(event, widgetName) {
  const formItem = event.common.formInputs[widgetName][""];
  // For widgets that receive StringInputs data, the value input by the user.
  if (formItem.hasOwnProperty("stringInputs")) {
    const stringInput = event.common.formInputs[widgetName][""].stringInputs.value[0];
    if (stringInput != null) {
      return stringInput;
    }
  // For widgets that receive dateInput data, the value input by the user.
  } else if (formItem.hasOwnProperty("dateInput")) {
    const dateInput = event.common.formInputs[widgetName][""].dateInput.msSinceEpoch;
     if (dateInput != null) {
       return dateInput;
     }
  }

  return null;
}

/**
 * Opens a dialog that prompts users to add details about a contact.
 *
 * @return {Object} a message with an action response to open a dialog.
 */
function openDialog() {
  return { actionResponse: {
    type: "DIALOG",
    dialogAction: { dialog: { body: { sections: [{
      header: "Add new contact",
      widgets: CONTACT_FORM_WIDGETS.concat([{
        buttonList: { buttons: [{
          text: "Review and submit",
          onClick: { action: { function: "openNextCard" }}
        }]}
      }])
    }]}}}
  }};
}

/**
 * Returns a dialog or card message that displays a confirmation of contact
 * details before users submit.
 *
 * @param {String} user the user who submitted the information.
 * @param {String} contactName the contact name from the previous dialog or card.
 * @param {String} contactBirthdate the birthdate from the previous dialog or card.
 * @param {String} contactType the contact type from the previous dialog or card.
 * @param {boolean} fromDialog whether the information was submitted from a dialog.
 *
 * @return {Object} returns a dialog or private card message.
 */
function openNextCard(user, contactName, contactBirthdate, contactType, fromDialog) {
  const name = contactName ?? "<i>Not provided</i>";
  const birthdate = contactBirthdate ?? "<i>Not provided</i>";
  const type = contactType ?? "<i>Not provided</i>";
  const cardConfirmation = {
    header: "Your contact",
    widgets: [{
      textParagraph: { text: "Confirm contact information and submit:" }}, {
      textParagraph: { text: "<b>Name:</b> " + name }}, {
      textParagraph: {
        text: "<b>Birthday:</b> " + convertMillisToDateString(birthdate)
      }}, {
      textParagraph: { text: "<b>Type:</b> " + type }}, {
      buttonList: { buttons: [{
        text: "Submit",
        onClick: { action: {
          function: "submitForm",
          parameters: [{
            key: "contactName", value: name }, {
            key: "contactBirthdate", value: birthdate }, {
            key: "contactType", value: type
          }]
        }}
      }]}
    }]
  };

  // Returns a dialog with contact information that the user input.
  if (fromDialog) {
    return { action_response: {
      type: "DIALOG",
      dialogAction: { dialog: { body: { sections: [ cardConfirmation ]}}}
    }};
  }

  // Updates existing card message with contact information that the user input.
  return {
    actionResponse: { type: "UPDATE_MESSAGE" },
    privateMessageViewer: user,
    cardsV2: [{
      card: { sections: [cardConfirmation]}
    }]
  }
}

/**
  * Submits information from a dialog or card message.
  *
  * @param {Object} user the person who submitted the information.
  * @param {Object} userInputs the form input values from event parameters.
  * @param {boolean} dialogEventType "SUBMIT_DIALOG" if from a dialog.
  * @return {Object} a message response that opens a dialog or posts a private
  *                  message.
  */
function submitForm(user, userInputs, dialogEventType) {
  const contactName = userInputs["contactName"];
  // Checks to make sure the user entered a contact name.
  // If no name value detected, returns an error message.
  if (!contactName) {
    const errorMessage = "Don't forget to name your new contact!";
    if (dialogEventType === "SUBMIT_DIALOG") {
      return { actionResponse: {
        type: "DIALOG",
        dialogAction: { actionStatus: {
          statusCode: "INVALID_ARGUMENT",
          userFacingMessage: errorMessage
        }}
      }};
    } else {
      return {
        privateMessageViewer: user,
        text: errorMessage
      };
    }
  }

  // The Chat app indicates that it received form data from the dialog or card.
  // Sends private text message that confirms submission.
  const confirmationMessage = " " + contactName + " has been added to your contacts.";
  if (dialogEventType === "SUBMIT_DIALOG") {
    return {
      actionResponse: {
        type: "NEW_MESSAGE",
        dialogAction: { actionStatus: {
          statusCode: "OK",
          userFacingMessage: "Success " + JSON.stringify(contactName)
        }}
      },
      privateMessageViewer: user,
      text: confirmationMessage
    }
  } else {
    return {
      actionResponse: { type: "NEW_MESSAGE" },
      privateMessageViewer: user,
      text: confirmationMessage
    };
  }
}

/**
 * Converts date in milliseconds since epoch to user-friendly string.
 *
 * @param {Object} millis the milliseconds since epoch time.
 * @return {string} Display-friend date (English US).
 */
function convertMillisToDateString(millis) {
  const date = new Date(millis);
  const options = { year: 'numeric', month: 'long', day: 'numeric' };
  return date.toLocaleDateString('en-US', options);
}
contactForm.gs

يحتوي على الأدوات التي تتلقى بيانات النموذج من المستخدمين. يتم عرض هذه التطبيقات المصغّرة لعناصر إدخال النموذج في البطاقات التي تظهر في الرسائل ومربّعات الحوار.

عرض رمز contactForm.gs

apps-script/contact-form-app/contactForm.gs
/**
 * Copyright 2024 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * The section of the contact card that contains the form input widgets. Used in a dialog and card message.
 * To add and preview widgets, use the Card Builder: https://addons.gsuite.google.com/uikit/builder
 */
const CONTACT_FORM_WIDGETS = [
  {
    "textInput": {
      "name": "contactName",
      "label": "First and last name",
      "type": "SINGLE_LINE"
    }
  },
  {
    "dateTimePicker": {
      "name": "contactBirthdate",
      "label": "Birthdate",
      "type": "DATE_ONLY"
    }
  },
  {
    "selectionInput": {
      "name": "contactType",
      "label": "Contact type",
      "type": "RADIO_BUTTON",
      "items": [
        {
          "text": "Work",
          "value": "Work",
          "selected": false
        },
        {
          "text": "Personal",
          "value": "Personal",
          "selected": false
        }
      ]
    }
  }
];
appsscript.json

بيان Apps Script الذي يحدِّد مشروع Apps Script ويضبطه لتطبيق Chat

عرض رمز appsscript.json

apps-script/contact-form-app/appsscript.json
{
  "timeZone": "America/Los_Angeles",
  "dependencies": {},
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "chat": {}
}

البحث عن رقم مشروعك على Google Cloud ورقم تعريفه

  1. في وحدة التحكّم في Google Cloud، انتقِل إلى مشروعك على Google Cloud.

    الانتقال إلى وحدة التحكّم في Google Cloud

  2. انقر على "الإعدادات والأدوات المساعدة" &gt; إعدادات المشروع.

  3. دوِّن القيم في حقلَي رقم المشروع ورقم تعريف المشروع. ويمكنك استخدامها في الأقسام التالية.

إنشاء مشروع "برمجة تطبيقات Google"

لإنشاء مشروع على Apps Script وربطه بمشروعك على Cloud:

  1. انقر على الزر التالي لفتح مشروع إدارة جهات الاتصال في Google Chat "برمجة تطبيقات Google".
    فتح المشروع
  2. انقر على رمز نظرة عامة.
  3. في صفحة النظرة العامة، انقر على رمز إنشاء نسخة إنشاء نسخة.
  4. تسمية نسختك من مشروع برمجة التطبيقات:

    1. انقر على نسخة من "إدارة جهات الاتصال" في Google Chat.

    2. في عنوان المشروع، اكتب Contact Manager - Google Chat app

    3. انقر على إعادة تسمية.

ضبط مشروع Cloud لمشروع "برمجة التطبيقات"

  1. في مشروعك على Apps Script، انقر على رمز إعدادات المشروع إعدادات المشروع.
  2. ضمن مشروع Google Cloud Platform (GCP)، انقر على تغيير المشروع.
  3. في رقم مشروع Google Cloud Platform، الصِق رقم مشروع مشروعك على Google Cloud.
  4. انقر على ضبط المشروع. تم ربط مشروع Cloud بمشروع Apps Script .

إنشاء عملية نشر في Apps Script

الآن وبعد أن أصبحت جميع الرموز في مكانها الصحيح، انشر النص البرمجي لـ Apps مشروعك. يمكنك استخدام معرّف النشر عند ضبط تطبيق Chat في Google Cloud.

  1. في "برمجة تطبيقات Google"، افتح Chat مشروعك.

    الانتقال إلى "برمجة تطبيقات Google"

  2. انقر على نشر > نشر جديد.

  3. إذا لم تكن الإضافة محدّدة مسبقًا، بجانب اختَر النوع، وانقر على أنواع النشر رمز إعدادات المشروع واختَر إضافة.

  4. في الوصف، أدخِل وصفًا لهذا الإصدار، مثل Test of Contact Manager

  5. انقر على نشر. تم بنجاح إعداد تقارير "برمجة تطبيقات Google" النشر ويوفر معرّف النشر.

  6. انقر على نسخ لنسخ رقم تعريف عملية النشر، ثم انقر على تم.

ضبط تطبيق Chat في وحدة تحكّم Google Cloud

يعرض هذا القسم كيفية ضبط Google Chat API في وحدة تحكّم Google Cloud. بمعلومات عن تطبيق Chat، بما في ذلك رقم تعريف عملية النشر التي أنشأتها للتو من "برمجة تطبيقات Google" مشروعك.

  1. في وحدة تحكُّم Google Cloud، انقر على القائمة &gt; مزيد من المنتجات &gt; Google Workspace &gt; مكتبة المنتجات &gt; Google Chat API &gt; إدارة &gt; الإعداد.

    الانتقال إلى إعدادات Chat API

  2. في اسم التطبيق، اكتب Contact Manager.

  3. في عنوان URL للصورة الرمزية، اكتب https://developers.google.com/chat/images/contact-icon.png.

  4. في الوصف، اكتب Manage your personal and business contacts.

  5. انقر على مفتاح التبديل تفعيل الميزات التفاعلية لتفعيله.

  6. ضمن الوظائف، ضَع علامة في مربّعات الاختيار تلقّي الرسائل بين شخصين الانضمام إلى المساحات والمحادثات الجماعية

  7. ضمن إعدادات الاتصال، اختَر Apps Script.

  8. في رقم تعريف النشر، الصِق رقم تعريف نشر برمجة التطبيقات الذي نسخته في القسم السابق عند إنشاء نشر برمجة التطبيقات.

  9. ضمن أوامر الشرطة المائلة، يمكنك إعداد الأوامر التي تبدأ بشرطة مائلة /about /addContact:

    1. انقر على إضافة أمر يبدأ بشرطة مائلة لإعداد أول أمر يبدأ بشرطة مائلة.
    2. في حقل الاسم، اكتب /about.
    3. في رقم تعريف الطلب، اكتب 1.
    4. في الوصف، اكتب Learn how to use this Chat app to manage your contacts
    5. انقر على فتح مربّع حوار.
    6. انقر على تم.
    7. انقر على إضافة أمر شرطة مائلة لإعداد أمر شرطة مائلة آخر.
    8. في Name (الاسم)، اكتب /addContact
    9. في رقم تعريف الطلب، اكتب 2.
    10. في الوصف، اكتب Submit information about a contact
    11. انقر على فتح مربّع حوار.
    12. انقر على تم.
  10. ضمن مستوى الوصول، ضَع علامة في مربّع الاختيار إتاحة تطبيق Chat هذا لمستخدمين ومجموعات محدّدين في YOUR DOMAIN وأدخِل عنوان بريدك الإلكتروني.

  11. ضمن السجلات، اختَر تسجيل الأخطاء في التسجيل.

  12. انقر على حفظ. ستظهر رسالة محفوظة للإعدادات.

تطبيق Chat جاهز للتثبيت والاختبار في Chat.

اختبار تطبيق Chat

لاختبار تطبيق Chat، افتح مساحة رسالة مباشرة باستخدام تطبيق Chat وأرسِل رسالة:

  1. افتح Google Chat باستخدام حساب Google Workspace الذي قدّمته عند إضافة نفسك كمختبِر موثوق.

    الانتقال إلى Google Chat

  2. انقر على رمز محادثة جديدة.
  3. في الحقل إضافة شخص واحد أو أكثر، اكتب اسم تطبيق Chat
  4. اختَر تطبيق Chat من النتائج. عميل مباشر يتم فتح رسالة.

  1. في الرسالة المباشرة الجديدة باستخدام تطبيق Chat، اكتب /addContactواضغط على Enter.

  2. في مربّع الحوار الذي يظهر، أدخِل معلومات الاتصال:

    1. في حقل النص الاسم الأول واسم العائلة، أدخِل اسمًا.
    2. في أداة اختيار تاريخ تاريخ الميلاد، اختَر تاريخًا.
    3. ضمن نوع جهة الاتصال، حدِّد زر الاختيار العمل أو الشخصي.
  3. انقر على المراجعة والإرسال.

  4. في مربع حوار التأكيد، راجع المعلومات التي أرسلتها انقر على إرسال. يردّ تطبيق Chat برسالة نصية. رِسَالَة بِتْقُولْ CONTACT NAME has been added to your contacts.

  5. يمكنك أيضًا اختياريًا اختبار نموذج التواصل وإرساله بالطُرق التالية:

    • استخدِم الأمر /about الذي يتضمّن الشرطة المائلة. يردّ تطبيق Chat برسالة نصية وزرّ تطبيق مصغّر ملحق يظهر عليه Add a contact. يمكنك النقر على الزر لفتح مربع حوار نموذج الاتصال.
    • إرسال رسالة مباشرة إلى تطبيق Chat بدون أمر الشرطة المائلة، مثل Hello. تطبيق Chat الردود مع نص وبطاقة تحتوي على نموذج الاتصال.

تَنظيم

لتجنب تكبد أي رسوم إلى حسابك في Google Cloud مقابل الموارد المستخدمة في هذا البرنامج التعليمي، نوصيك بحذف المشروع على السحابة الإلكترونية.

  1. في وحدة تحكّم Google Cloud، انتقِل إلى صفحة إدارة الموارد. (يُرجى النقر.) قائمة الطعام &gt; إدارة الهوية وإمكانية الوصول و المشرف &gt; إدارة الموارد.

    انتقِل إلى "مدير الموارد"

  2. في قائمة المشاريع، اختَر المشروع الذي تريد حذفه، ثم انقر على حذف .
  3. في مربّع الحوار، اكتب رقم تعريف المشروع ثم انقر على إيقاف التشغيل لحذفه. للمشروع.