> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/enterprise-guide/jp/webhooks/teams-webhooks.md).

# Microsoft Teams Webhooks

## Microsoft Teamsのセットアップと連携

書式付きアラートをMicrosoft Teamsチャンネルへ送る手順は以下のとおりです。

1. 対象のTeamsチャンネルで **\[⋯]** (その他メニュー) をクリックし、**\[ワークフロー]** を選択します。

<figure><img src="/files/0Ogj9MKCZNYm7tUHdy90" alt="チャンネルでワークフローを選択" width="243"><figcaption></figcaption></figure>

2. 検索ボックスに `webhooks` と入力して絞り込み、**\[Send webhook alerts to a channel]** を選択します。

<figure><img src="/files/ZvN4FygRnDu6a29s6vG7" alt="チャンネルにWebhookワークフローを追加" width="338"><figcaption></figcaption></figure>

3. チャンネルが属するチームを選択します。対象チャンネルは最初から選択されていることが多いです。

<figure><img src="/files/AWbapyFZRHu3OxTvfEEc" alt="チームとチャンネルを選択してWebhookを設定" width="418"><figcaption></figcaption></figure>

4. 作成したワークフロー画面に表示されるWebhook URLをコピーします。

<figure><img src="/files/iCtKCMYQAZ0KMuZeyQD2" alt=""><figcaption></figcaption></figure>

5. Keeper管理コンソールにログインし、**\[レポートとアラート]** > **\[アラート]** を開き、新規アラートを作成するか既存のアラートを開きます。

<figure><img src="/files/d9plUk3BpKrrrDnAO35A" alt=""><figcaption><p>アラートの追加</p></figcaption></figure>

6. **\[受信者]** > **\[受信者を追加]** をクリックします。

<figure><img src="/files/iUZkBhF1A38ldIApuh1r" alt=""><figcaption><p>受信者の追加 (Teams)</p></figcaption></figure>

7. 受信者名とメールアドレスを入力し、**\[Webhookを追加]** をクリックします。

<figure><img src="/files/B5lzmytCEAaB59atLQ3P" alt=""><figcaption><p>Webhookの追加</p></figcaption></figure>

8. 手順4でコピーしたWebhook URLを貼り付け、下記のHTTPボディを貼り付けます。

<figure><img src="/files/UrWOWHrKAPLd0m07Vgcb" alt=""><figcaption><p>URLとHTTPボディの追加</p></figcaption></figure>

以下のJSONをコピーし、上記画面の **\[HTTPボディ]** に貼り付けます。

```
{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "themeColor": "0076D7",
    "summary": "Alert: #alert_name",
    "sections": [{
        "activityTitle": "#description",
        "activitySubtitle": "#alert_name",
        "activityImage": "https://keeper-email-images.s3.amazonaws.com/common/Keeper_512x512.png",
        "facts": [{
            "name": "User",
            "value": "#username"
        }, {
            "name": "Timestamp",
            "value": "#timestamp"
        }, {
            "name": "IP Address",
            "value": "#remote_address"
        }],
        "markdown": true
    }]
}
```

9. 受信者の設定で **\[保存]** をクリックし、続けてアラート画面でも **\[保存]** をクリックします。

<figure><img src="/files/X73fU0hT772i5DZE4k5B" alt="" width="375"><figcaption><p>Webhookの追加</p></figcaption></figure>

<figure><img src="/files/qpenJfRkbyK58BuvkbwH" alt=""><figcaption></figcaption></figure>

#### セットアップ完了

HTTPボディは用途に合わせて変更できます。カードの見た目を調整するときは、[Microsoftのコネクタに関するドキュメント](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using)をご参照ください。

{% hint style="info" %}
Webhookボディの新規作成や編集が反映されるまで、最大15分かかることがあります。
{% endhint %}

## コマンドラインによるWebhooksのテスト (任意)

Mac/Linuxでは、書式確認に `curl` を使えます。

* `test.json` などのファイルにWebhook本文 (JSON) を保存
* 以下のコマンドで `<WEBHOOK URL>` をSlackまたはTeamsのWebhook URLに置き換えて実行

```
# MacおよびLinuxの場合:
curl -X POST -H 'Content-type: application/json' -d @test.json <WEBHOOK URL>

# Windowsの場合
curl.exe -H "Content-Type:application/json" -d @test.json <WEBHOOK URL>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.keeper.io/enterprise-guide/jp/webhooks/teams-webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
