สร้างแอป HTTP สำหรับ Google Chat

หน้านี้จะอธิบายวิธีสร้างแอปใน Chat แบบ HTTP คุณใช้สถาปัตยกรรมนี้ได้หลายวิธี ใน Google Cloud คุณ สามารถใช้ Cloud Functions, Cloud Run และ App Engine ได้ ในการเริ่มต้นอย่างรวดเร็วนี้ คุณจะ เขียนและทำให้ Cloud Function ที่แอป Chat ใช้ตอบข้อความของผู้ใช้

เมื่อใช้สถาปัตยกรรมนี้ คุณจะกำหนดค่า Chat เพื่อผสานรวมกับ Google Cloud หรือเซิร์ฟเวอร์ภายในองค์กรโดยใช้ HTTP ดังที่แสดงใน แผนภาพต่อไปนี้

สถาปัตยกรรมของแอป Chat ที่ใช้บริการบนเว็บในเซิร์ฟเวอร์ภายในองค์กร

ในแผนภาพก่อนหน้านี้ ผู้ใช้ที่โต้ตอบกับ HTTP แอป Chat มีขั้นตอนข้อมูลต่อไปนี้

  1. ผู้ใช้ส่งข้อความใน Chat ไปยัง แอปแชท ทั้งในข้อความส่วนตัวหรือใน พื้นที่ใน Chat
  2. คำขอ HTTP ถูกส่งไปยังเว็บเซิร์ฟเวอร์ที่เป็นระบบคลาวด์หรือ ระบบภายในองค์กรที่มีแอป Chat
  3. (ไม่บังคับ) ตรรกะของแอป Chat จะผสานรวมกับ บริการของ Google Workspace (เช่น ปฏิทินและ ชีต) บริการอื่นๆ ของ Google (เช่น Maps, YouTube และ Vertex AI) หรือบริการบนเว็บอื่นๆ (เช่น โปรเจ็กต์) ) หรือเครื่องมือจำหน่ายตั๋ว)
  4. เว็บเซิร์ฟเวอร์จะส่งการตอบกลับ HTTP กลับไปยัง บริการแอปใน Chat ใน Chat
  5. ระบบจะส่งคำตอบให้กับผู้ใช้
  6. (ไม่บังคับ) แอป Chat สามารถเรียกใช้ Chat API เพื่อโพสต์ข้อความแบบไม่พร้อมกันหรือดำเนินการอื่นๆ การดำเนินงาน

สถาปัตยกรรมนี้ให้ความยืดหยุ่นในการใช้ไลบรารีที่มีอยู่และ ที่มีอยู่ในระบบของคุณอยู่แล้วเนื่องจาก คุณออกแบบแอปแชทโดยใช้ภาษาโปรแกรมที่แตกต่างกันได้

วัตถุประสงค์

  • ตั้งค่าสภาพแวดล้อมของคุณ
  • สร้างและทำให้ Cloud Function ใช้งานได้
  • เผยแพร่แอปไปยัง Chat
  • ทดสอบแอป

ข้อกำหนดเบื้องต้น

ตั้งค่าสภาพแวดล้อม

ก่อนใช้ Google APIs คุณต้องเปิดใช้ API เหล่านี้ในโปรเจ็กต์ Google Cloud คุณสามารถเปิด API ได้ตั้งแต่ 1 รายการขึ้นไปในโปรเจ็กต์ Google Cloud เดียว
  • ในคอนโซล Google Cloud ให้เปิดใช้ Google Chat API, Cloud Build API, Cloud Functions API Cloud Pub/Sub API, Cloud Logging API, Artifact Registry API และ Cloud Run API

    เปิดใช้ API

สร้างและทำให้ Cloud Function ใช้งานได้

สร้างและติดตั้งใช้งาน Cloud Function ที่สร้างการ์ด Chat ด้วยชื่อที่แสดงและรูปโปรไฟล์ของผู้ส่ง เมื่อ แอปแชทจะได้รับข้อความ ซึ่งจะเรียกใช้ฟังก์ชันนั้น และ ตอบกลับด้วยการ์ด

หากต้องการสร้างและทำให้ฟังก์ชันใช้งานได้สำหรับแอป Chat ทำตามขั้นตอนต่อไปนี้

Node.js

  1. ในคอนโซล Google Cloud ให้ไปที่หน้า Cloud Functions แล้วทำดังนี้

    ไปที่ Cloud Functions

    ตรวจสอบว่าโปรเจ็กต์สำหรับแอป Chat ของคุณ ที่เลือกไว้

  2. คลิก สร้างฟังก์ชัน

  3. ในหน้าสร้างฟังก์ชัน ให้ตั้งค่าฟังก์ชันต่อไปนี้

    1. ในสภาพแวดล้อม ให้เลือกรุ่นที่ 2
    2. ป้อน QuickStartChatApp ในชื่อฟังก์ชัน
    3. ในภูมิภาค ให้เลือกภูมิภาค
    4. เลือกต้องมีการตรวจสอบสิทธิ์ในส่วนการตรวจสอบสิทธิ์
    5. คลิกถัดไป
  4. ใน Runtime ให้เลือก Node.js เวอร์ชันล่าสุด

  5. ในซอร์สโค้ด ให้เลือกตัวแก้ไขในบรรทัด

  6. ใน Entry Point ให้ลบข้อความเริ่มต้นและป้อน avatarApp

  7. แทนที่เนื้อหาของ index.js ด้วยรหัสต่อไปนี้

    node/avatar-app/index.js
    // The ID of the slash command "/about".
    // It's not enabled by default, set to the actual ID to enable it. You need to
    // use the same ID as set in the Google Chat API configuration.
    const ABOUT_COMMAND_ID = "";
    
    /**
     * Google Cloud Function that responds to messages sent from a
     * Google Chat space.
     *
     * @param {Object} req Request sent from Google Chat space
     * @param {Object} res Response to send back
     */
    exports.avatarApp = function avatarApp(req, res) {
      if (req.method === 'GET' || !req.body.message) {
        return res.send('Hello! This function is meant to be used ' +
          'in a Google Chat Space.');
      }
    
      // Stores the Google Chat event as a variable.
      const event = req.body;
    
      // Checks for the presence of a slash command in the message.
      if (event.message.slashCommand) {
        // Executes the slash command logic based on its ID.
        // Slash command IDs are set in the Google Chat API configuration.
        switch (event.message.slashCommand.commandId) {
          case ABOUT_COMMAND_ID:
            return res.send({
              text: 'The Avatar app replies to Google Chat messages.'
            });
        }
      }
    
      const sender = req.body.message.sender.displayName;
      const image = req.body.message.sender.avatarUrl;
      const data = createMessage(sender, image);
      res.send(data);
    };
    
    /**
     * Creates a card with two widgets.
     * 
     * @param {string} displayName the sender's display name
     * @param {string} avatarUrl the URL for the sender's avatar
     * @return {Object} a card with the user's avatar.
     */
    function createMessage(displayName, avatarUrl) {
      return {
        text: 'Here\'s your avatar',
        cardsV2: [{
          cardId: 'avatarCard',
          card: {
            name: 'Avatar Card',
            header: {
              title: `Hello ${displayName}!`,
            },
            sections: [{ widgets: [{
              textParagraph: { text: 'Your avatar picture: ' }
            }, {
              image: { imageUrl: avatarUrl }
            }]}]
          }
        }]
      };
    }

  8. คลิกทำให้ใช้งานได้

Python

  1. ในคอนโซล Google Cloud ให้ไปที่หน้า Cloud Functions แล้วทำดังนี้

    ไปที่ Cloud Functions

    ตรวจสอบว่าโปรเจ็กต์สำหรับแอป Chat ของคุณ ที่เลือกไว้

  2. คลิก สร้างฟังก์ชัน

  3. ในหน้าสร้างฟังก์ชัน ให้ตั้งค่าฟังก์ชันต่อไปนี้

    1. ในสภาพแวดล้อม ให้เลือกรุ่นที่ 2
    2. ป้อน QuickStartChatApp ในชื่อฟังก์ชัน
    3. ในภูมิภาค ให้เลือกภูมิภาค
    4. เลือกต้องมีการตรวจสอบสิทธิ์ในส่วนการตรวจสอบสิทธิ์
    5. คลิกถัดไป
  4. ในรันไทม์ ให้เลือก Python เวอร์ชันล่าสุด

  5. ในซอร์สโค้ด ให้เลือกตัวแก้ไขในบรรทัด

  6. ใน Entry Point ให้ลบข้อความเริ่มต้นและป้อน avatar_app

  7. แทนที่เนื้อหาของ main.py ด้วยรหัสต่อไปนี้

    python/avatar-app/main.py
    from typing import Any, Mapping
    
    import flask
    import functions_framework
    
    # The ID of the slash command "/about".
    # It's not enabled by default, set to the actual ID to enable it. You need to
    # use the same ID as set in the Google Chat API configuration.
    ABOUT_COMMAND_ID = ""
    
    @functions_framework.http
    def avatar_app(req: flask.Request) -> Mapping[str, Any]:
      """Google Cloud Function that handles requests from Google Chat
    
      Args:
          flask.Request: the request
    
      Returns:
          Mapping[str, Any]: the response
      """
      if req.method == "GET":
        return "Hello! This function must be called from Google Chat."
    
      request_json = req.get_json(silent=True)
    
      # Checks for the presence of a slash command in the message.
      if "slashCommand" in request_json["message"]:
        # Executes the slash command logic based on its ID.
        # Slash command IDs are set in the Google Chat API configuration.
        if request_json["message"]["slashCommand"]["commandId"] == ABOUT_COMMAND_ID:
          return { "text": 'The Avatar app replies to Google Chat messages.' }
    
      display_name = request_json["message"]["sender"]["displayName"]
      avatar = request_json["message"]["sender"]["avatarUrl"]
      response = create_message(name=display_name, image_url=avatar)
      return response
    
    
    def create_message(name: str, image_url: str) -> Mapping[str, Any]:
      """Google Cloud Function that handles requests from Google Chat
    
      Args:
          str name: the sender's display name.
          str image_url: the URL for the sender's avatar.
    
      Returns:
          Mapping[str, Any]: a card with the user's avatar.
      """
      return {
        "text": "Here's your avatar",
        "cardsV2": [{
          "cardId": "avatarCard",
          "card": {
              "name": "Avatar Card",
              "header": { "title": f"Hello {name}!" },
              "sections": [{
                "widgets": [{
                  "textParagraph": { "text": "Your avatar picture:" }
                }, {
                  "image": { "imageUrl": image_url }
                }]
              }]
          }
        }]
      }

  8. คลิกทำให้ใช้งานได้

Java

  1. ในคอนโซล Google Cloud ให้ไปที่หน้า Cloud Functions แล้วทำดังนี้

    ไปที่ Cloud Functions

    ตรวจสอบว่าโปรเจ็กต์สำหรับแอป Chat ของคุณ ที่เลือกไว้

  2. คลิก สร้างฟังก์ชัน

  3. ในหน้าสร้างฟังก์ชัน ให้ตั้งค่าฟังก์ชันต่อไปนี้

    1. ในสภาพแวดล้อม ให้เลือกรุ่นที่ 2
    2. ป้อน QuickStartChatApp ในชื่อฟังก์ชัน
    3. ในภูมิภาค ให้เลือกภูมิภาค
    4. เลือกต้องมีการตรวจสอบสิทธิ์ในส่วนการตรวจสอบสิทธิ์
    5. คลิกถัดไป
  4. ใน Runtime ให้เลือก Java เวอร์ชันล่าสุด

  5. ในซอร์สโค้ด ให้เลือกตัวแก้ไขในบรรทัด

  6. ใน Entry Point ให้ลบข้อความเริ่มต้นและป้อน App

  7. เปลี่ยนชื่อ src/main/java/com/example/Example.java เป็น src/main/java/App.java

  8. แทนที่เนื้อหาของ App.java ด้วยรหัสต่อไปนี้

    java/avatar-app/src/main/java/App.java
    import java.util.List;
    
    import com.google.api.services.chat.v1.model.CardWithId;
    import com.google.api.services.chat.v1.model.GoogleAppsCardV1Card;
    import com.google.api.services.chat.v1.model.GoogleAppsCardV1CardHeader;
    import com.google.api.services.chat.v1.model.GoogleAppsCardV1Image;
    import com.google.api.services.chat.v1.model.GoogleAppsCardV1Section;
    import com.google.api.services.chat.v1.model.GoogleAppsCardV1TextParagraph;
    import com.google.api.services.chat.v1.model.GoogleAppsCardV1Widget;
    import com.google.api.services.chat.v1.model.Message;
    import com.google.cloud.functions.HttpFunction;
    import com.google.cloud.functions.HttpRequest;
    import com.google.cloud.functions.HttpResponse;
    import com.google.gson.Gson;
    import com.google.gson.JsonObject;
    
    public class App implements HttpFunction {
      private static final Gson gson = new Gson();
    
      // The ID of the slash command "/about".
      // It's not enabled by default, set to the actual ID to enable it. You need to
      // use the same ID as set in the Google Chat API configuration.
      private static final String ABOUT_COMMAND_ID = "";
    
      @Override
      public void service(HttpRequest request, HttpResponse response) throws Exception {
        JsonObject body = gson.fromJson(request.getReader(), JsonObject.class);
    
        if (request.getMethod().equals("GET") || !body.has("message")) {
          response.getWriter().write("Hello! This function must be called from Google Chat.");
          return;
        }
    
        // Checks for the presence of a slash command in the message.
        if (body.getAsJsonObject("message").has("slashCommand")) {
          // Executes the slash command logic based on its ID.
          // Slash command IDs are set in the Google Chat API configuration.
          JsonObject slashCommand = body.getAsJsonObject("message").getAsJsonObject("slashCommand");
          switch (slashCommand.get("commandId").getAsString()) {
            case ABOUT_COMMAND_ID:
              Message aboutMessage = new Message();
              aboutMessage.setText("The Avatar app replies to Google Chat messages.");
              response.getWriter().write(gson.toJson(aboutMessage));
              return;
          }
        }
    
        JsonObject sender = body.getAsJsonObject("message").getAsJsonObject("sender");
        String displayName = sender.has("displayName") ? sender.get("displayName").getAsString() : "";
        String avatarUrl = sender.has("avatarUrl") ? sender.get("avatarUrl").getAsString() : "";
        Message message = createMessage(displayName, avatarUrl);
        response.getWriter().write(gson.toJson(message));
      }
    
      Message createMessage(String displayName, String avatarUrl) {
        GoogleAppsCardV1CardHeader cardHeader = new GoogleAppsCardV1CardHeader();
        cardHeader.setTitle(String.format("Hello %s!", displayName));
    
        GoogleAppsCardV1TextParagraph textParagraph = new GoogleAppsCardV1TextParagraph();
        textParagraph.setText("Your avatar picture: ");
    
        GoogleAppsCardV1Widget avatarWidget = new GoogleAppsCardV1Widget();
        avatarWidget.setTextParagraph(textParagraph);
    
        GoogleAppsCardV1Image image = new GoogleAppsCardV1Image();
        image.setImageUrl(avatarUrl);
    
        GoogleAppsCardV1Widget avatarImageWidget = new GoogleAppsCardV1Widget();
        avatarImageWidget.setImage(image);
    
        GoogleAppsCardV1Section section = new GoogleAppsCardV1Section();
        section.setWidgets(List.of(avatarWidget, avatarImageWidget));
    
        GoogleAppsCardV1Card card = new GoogleAppsCardV1Card();
        card.setName("Avatar Card");
        card.setHeader(cardHeader);
        card.setSections(List.of(section));
    
        CardWithId cardWithId = new CardWithId();
        cardWithId.setCardId("previewLink");
        cardWithId.setCard(card);
    
        Message message = new Message();
        message.setText("Here's your avatar");
        message.setCardsV2(List.of(cardWithId));
    
        return message;
      }
    }

  9. แทนที่เนื้อหาของ pom.xml ด้วยรหัสต่อไปนี้

    java/avatar-app/pom.xml
    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
    
      <groupId>com.google.chat</groupId>
      <artifactId>avatar-app</artifactId>
      <version>1.0-SNAPSHOT</version>
    
      <properties>
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.source>17</maven.compiler.source>
      </properties>
    
      <dependencies>
        <dependency>
          <groupId>com.google.cloud.functions</groupId>
          <artifactId>functions-framework-api</artifactId>
          <version>1.0.1</version>
        </dependency>
    
        <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.9.1</version>
        </dependency>
    
        <!-- https://mvnrepository.com/artifact/com.google.apis/google-api-services-chat -->
        <dependency>
          <groupId>com.google.apis</groupId>
          <artifactId>google-api-services-chat</artifactId>
          <version>v1-rev20230115-2.0.0</version>
        </dependency>
      </dependencies>
    
      <!-- Required for Java 11 functions in the inline editor -->
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
              <excludes>
                <exclude>.google/</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </project>

  10. คลิกทำให้ใช้งานได้

หน้ารายละเอียดฟังก์ชันระบบคลาวด์จะเปิดขึ้น และฟังก์ชันจะปรากฏขึ้นโดยมี สัญญาณบอกสถานะความคืบหน้า: สัญญาณหนึ่งสําหรับบิลด์และอีกอันสําหรับบริการ เมื่อทั้ง 2 กรณี สัญญาณบอกสถานะความคืบหน้าจะหายไป และแทนที่ด้วยเครื่องหมายถูก ซึ่งเป็นฟังก์ชัน และพร้อมใช้งาน

ให้สิทธิ์ Google Chat เพื่อเรียกใช้ฟังก์ชัน

หากต้องการให้สิทธิ์ Google Chat เรียกใช้ฟังก์ชัน ให้เพิ่ม Google Chat บัญชีบริการที่มีบทบาทผู้เรียกใช้ Cloud Run

  1. ในคอนโซล Google Cloud ให้ไปที่หน้า Cloud Run แล้วดำเนินการดังนี้

    ไปที่ Cloud Run

  2. ในรายการบริการ Cloud Run ให้เลือกช่องทำเครื่องหมายข้างกล่องรับ (อย่าคลิกที่ฟังก์ชัน)

  3. คลิกสิทธิ์ แผงสิทธิ์จะเปิดขึ้น

  4. คลิกเพิ่มผู้ใช้หลัก

  5. ในผู้ใช้หลักใหม่ ให้ป้อน chat@system.gserviceaccount.com

  6. ในส่วนเลือกบทบาท ให้เลือก Cloud Run > ผู้เรียกใช้ Cloud Run

  7. คลิกบันทึก

เผยแพร่แอปไปยัง Google Chat

หลังจากทำให้ Cloud Function ใช้งานได้แล้ว ให้ทำตามขั้นตอนต่อไปนี้เพื่อเปลี่ยนให้เป็น แอป Google Chat:

  1. ในคอนโซล Google Cloud ให้คลิกเมนู &gt; Cloud Functions

    ไปที่ Cloud Functions

    ตรวจสอบว่าโปรเจ็กต์ที่คุณเปิดใช้ Cloud Functions ไว้ ที่เลือกไว้

  2. คลิก QuickStartChatApp ในรายการฟังก์ชัน

  3. คลิกแท็บทริกเกอร์

  4. คัดลอก URL ในส่วน HTTPS

  5. ค้นหา "Google Chat API" แล้วคลิก Google Chat API จากนั้นคลิกจัดการ

    ไปที่ Chat API

  6. คลิกการกำหนดค่าและตั้งค่าแอป Google Chat ดังนี้

    1. ป้อน Quickstart App ในชื่อแอป
    2. ใน URL รูปโปรไฟล์ ให้ป้อน https://developers.google.com/chat/images/quickstart-app-avatar.png
    3. ในคำอธิบาย ให้ป้อน Quickstart app
    4. ในส่วนฟังก์ชัน ให้เลือกรับข้อความแบบ 1:1 และ เข้าร่วมพื้นที่ทำงานและการสนทนากลุ่ม
    5. ในส่วนการตั้งค่าการเชื่อมต่อ ให้เลือก URL ของแอป แล้ววาง URL สำหรับ ทริกเกอร์ Cloud Function ในช่อง
    6. เลือก URL ของแอปในกลุ่มเป้าหมายการตรวจสอบสิทธิ์
    7. ในส่วนระดับการเข้าถึง ให้เลือก ทำให้แอป Google Chat นี้ใช้งานได้เฉพาะบางคนและ กลุ่มในโดเมนและป้อนอีเมล
    8. เลือกบันทึกข้อผิดพลาดในการบันทึกในส่วนบันทึก
  7. คลิกบันทึก

แอป Chat พร้อมที่จะรับและตอบกลับ ข้อความใน Chat

ทดสอบแอปใน Chat

หากต้องการทดสอบแอป Chat ให้เปิดพื้นที่ข้อความส่วนตัวด้วย แล้วส่งข้อความในแอป Chat

  1. เปิด Google Chat โดยใช้บัญชี Google Workspace ที่คุณ ที่ให้ไว้เมื่อคุณเพิ่มตัวเองเป็นผู้ทดสอบที่เชื่อถือได้

    ไปที่ Google Chat

  2. คลิก แชทใหม่
  3. ในช่องเพิ่มผู้คนอย่างน้อย 1 คน ให้พิมพ์ชื่อ แอป Chat
  4. เลือกแอปใน Chat จากผลการค้นหา โดยตรง ข้อความจะเปิดขึ้น

  5. ในข้อความส่วนตัวใหม่ที่มีแอป ให้พิมพ์ Hello แล้วกด enter

การตอบกลับของแอป Chat จะมี ข้อความของการ์ดที่แสดง ชื่อและรูปโปรไฟล์ของผู้ส่งดังที่แสดงในรูปภาพต่อไปนี้

แอป Chat ตอบกลับด้วยการ์ดที่มีชื่อที่แสดงและรูปโปรไฟล์ของผู้ส่ง
ภาพ

หากต้องการเพิ่มผู้ทดสอบที่เชื่อถือได้และดูข้อมูลเพิ่มเติมเกี่ยวกับการทดสอบฟีเจอร์แบบอินเทอร์แอกทีฟ โปรดดู ทดสอบฟีเจอร์แบบอินเทอร์แอกทีฟสำหรับ แอป Google Chat

แก้ปัญหา

เมื่อแอป Google Chat หรือ card จะแสดงผลข้อผิดพลาด อินเทอร์เฟซ Chat แสดงข้อความว่า "เกิดข้อผิดพลาด" หรือ "ไม่สามารถดำเนินการตามคำขอของคุณ" บางครั้ง UI ของ Chat ไม่แสดงข้อความแสดงข้อผิดพลาดใดๆ แต่แอป Chat หรือ ทำให้เกิดผลลัพธ์ที่ไม่คาดคิด เช่น ข้อความในการ์ดอาจ ปรากฏขึ้น

แม้ว่าข้อความแสดงข้อผิดพลาดอาจไม่แสดงใน UI ของแชท มีข้อความแสดงข้อผิดพลาดและข้อมูลบันทึกที่สื่อความหมายเพื่อช่วยคุณแก้ไขข้อผิดพลาด เมื่อมีการเปิดข้อผิดพลาดในการบันทึกสำหรับแอป Chat หากต้องการความช่วยเหลือในการดู การแก้ไขข้อบกพร่องและการแก้ไขข้อผิดพลาด โปรดดู แก้ปัญหาข้อผิดพลาดของ Google Chat

ล้างข้อมูล

เพื่อเลี่ยงไม่ให้เกิดการเรียกเก็บเงินกับบัญชี Google Cloud ของคุณตาม ซึ่งใช้ในบทแนะนำนี้ เราขอแนะนำให้คุณลบ โปรเจ็กต์ที่อยู่ในระบบคลาวด์

  1. ในคอนโซล Google Cloud ให้ไปที่หน้าจัดการทรัพยากร คลิก เมนู &gt; IAM และ ผู้ดูแลระบบ &gt; จัดการทรัพยากร

    ไปที่เครื่องมือจัดการทรัพยากร

  2. ในรายการโปรเจ็กต์ ให้เลือกโปรเจ็กต์ที่ต้องการลบ แล้วคลิก ลบ
  3. ในกล่องโต้ตอบ ให้พิมพ์รหัสโปรเจ็กต์แล้วคลิกปิดเครื่องเพื่อลบ ให้กับโครงการ