# Teams Webhook

### Microsoft Teamsの設定

以下は、リッチテキスト形式のアラートをMicrosoft Teamsプラットフォームに送信する手順となります。

1. Teamsのメイン画面からアプリケーションに移動し、受信Webhookを検索します。**\[Add to a team]** (チームに追加) をクリックします。

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

または、既存のチャンネル&#x3067;**\[...]**&#x3092;クリックし、**\[Connectors]** (コネクタ) を選択します。

<figure><img src="/files/3ofxUEhyikD8qhXHQ4Mj" alt=""><figcaption></figcaption></figure>

2. 名前を付け&#x3066;**\[Create]** (作成) をクリックします。

<figure><img src="/files/ALSVaGYCnTuMseaIWA5h" alt=""><figcaption><p>Webhook URLをコピー</p></figcaption></figure>

3. URLの横にあるコピーボタンをクリックします。

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

4. Keeper管理コンソールにログインし、**\[レポートとアラート]** > **\[アラート]**&#x3078;移動して、既存のアラートをクリックするか、**\[アラートを追加]**&#x3092;クリックします。

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

5. **\[受信者] > \[受信者を追加]**&#x3092;選択します。

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

6. 受信者の名前とメールアドレスを入力し&#x3066;**\[Webhookを追加]**&#x3092;クリックします。

<figure><img src="/files/0OHz6sNUM0KF6h2TS8vO" alt=""><figcaption></figcaption></figure>

7. **手順3**で取得したWebhook URLをフォームに貼り付けます。

<figure><img src="/files/2TVwyn855EWO5Suy7J5J" alt=""><figcaption></figcaption></figure>

8. 以下のJSONコード&#x3092;**\[HTTPボディ]**&#x306E;フィールドに貼り付けます。

```
{
    "@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. 受信者追加ウィンドウ&#x3067;**\[保存]**&#x3092;クリックし、アラート画面&#x3067;**\[保存]**&#x3092;クリックします。

<figure><img src="/files/9Cexxw32AGnLVvm0yyce" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/2FBPuqp0oGm7Ye36QpZ1" alt=""><figcaption></figcaption></figure>

以上です。 イベントの送信が開始するまでに最大15分かかる場合があります。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を使用します。

* Webhookコンテンツをtest.jsonなどのテストファイルに保存します。
* 以下のURLをSlackまたはTeamsのURLに置き換えて、curlコマンドを実行します。

```
# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
