--- title: "ボットの設定" url: https://docs.catalyst.zoho.com/ja/tutorials/githubbot/python/configure-bot/ description: "Catalyst Integration Functionsを使用してZoho Cliq上にエクステンションを構築し、Cliqボットを通じてGitHubリポジトリにアクセスして操作できるようにします" last_updated: 2026-08-17T12:16:04Z service: All Services type: tutorial related_links: - name: "Integration Functions" url: /ja/serverless/help/functions/integration-functions --- # ボットをIncoming Webhookノーティファイアとして設定する 次に、GitHub上でwebhook URLが呼び出された際にアクションを実行する、Incoming Webhookノーティファイアとしてボットを設定しましょう。以下の手順で行います。 1. Cliqボット上でwebhookトークンを生成する 2. エクステンションのApp Keyを取得する 3. エクステンションのwebhookハンドラーURLを取得する 4. GitHub上でwebhookを作成し、これらの値を設定する これらのアクションについて、順を追って詳しく説明します。 このwebhookは、Gitアカウントのリポジトリにコミットがプッシュされるたびにトリガーされます。そのイベントが発生すると、GitHubは設定した認証情報とともにwebhookハンドラーURLへHTTPリクエストを送信します。プッシュイベントの詳細がCliqに渡され、Cliqボットがその詳細を通知・表示します。 ### WebHookトークンの生成 以下の手順でCliq上でwebhookトークンを生成できます。webhookトークンは、前のステップで設定したauthenticateボタンファンクションによって認証されます。 1. CliqアカウントでGitHub Botを検索します。ボットを選択し、**Continue**をクリックします。 ![search_bot](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/search_bot.webp) 2. ボットがアカウント情報にアクセスすることを許可します。 ![allow_access](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/allow_access.webp) チャットが有効になります。 3. チャットで**「webhooktoken」**と入力し、**Enter**キーを押します。**Create Webhook**をクリックします。 ![create_webhook](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/create_webhook.webp) 4. **Create Webhook**をクリックします。表示されるポップアップに、ボットのwebhookトークンを入力する必要があります。 ![webhook_popup](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/webhook_popup.webp) webhookトークンを取得するには、ページ右上の**Profile**アイコンをクリックします。 ![click_profile](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/click_profile.webp) **Bots & Tools**をクリックします。 ![bots_and_tools](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/bots_and_tools.webp) Integrationsメニューの**Webhook Tokens**をクリックします。 ![webhook_tokens](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/webhook_tokens.webp) **Generate New Token**をクリックし、生成されたトークンをコピーします。 ![copy_token](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/copy_token.webp) ポップアップにトークンの値を貼り付け、**Submit**をクリックします。 ![paste_token](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/paste_token.webp) ### App Keyの取得 以下の手順でエクステンションのApp Keyを取得できます。 1. [Cliq開発者コンソール](https://cliq.zoho.com/developer)のエクステンションページで**GitHubExt**エクステンションをクリックし、**Connectors**セクションに移動します。 2. エクステンションのSandbox App Keyをコピーします。 ![sandbox_key](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/sandbox_key.webp) このキーは、GitHub上で設定するURLの`appkey`パラメータの値になります。 ### WebhookハンドラーURLの取得 以下の手順でエクステンションのWebhookハンドラーURLを取得できます。 1. Cliqアカウントに戻り、プロフィール画像をクリックします。メニューセクションの**Bots & Tools**をクリックします。 ![select_bots_tools](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/select_bots_tools.webp) 2. ボット一覧から**GitHub Bot**をクリックします。サイドパネルが開きます。_Incoming WebHook Endpoint_の下に表示されるURLをコピーします。 ![incoming_webhook_endpoint](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/incoming_webhook_endpoint.webp) これがGitHub上で設定するbaseURLになります。 ### GitHub上でWebhookを作成する GitHub上で設定する完全なURLは以下のとおりです。 **_baseURL_?`appkey`\={{_appkey_}}&`zapikey`\={{_zapikey_}}** _baseURL_はwebhookハンドラーURL、`appkey`はエクステンションのSandbox App Key、`zapikey`はCliq上で生成したwebhookトークンです。 例: **https://cliq.zoho.com/company/org_id/api/v2/githubbot/incoming?appkey={{_appkey_}}&zapikey={{_zapikey_}}** 以下の手順でこのURLをGitHubに追加しましょう。 1. [GitHub](https://github.com/)アカウントを開き、リポジトリのいずれか1つに移動します。 2. **リポジトリの設定**を開き、**Webhooks -> Add webhook**をクリックします。 ![add_webhook](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/add_webhook.webp) 3. 上記の形式でURLを入力し、`appkey`と`zapikey`の値を代入します。以下のようにwebhookを設定します。 ![configure_url](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/configure_url.webp) 通知を受け取りたいイベントを選択できます。 4. **Add webhook**をクリックします。 ![configure_events](https://catalyst-docs-development.zohostratus.in/images/tutorials/githubbot/python/configure_events.webp) このwebhookにより、リポジトリの設定されたイベントに対するアラートが有効になります。