# Discord Webhooks

## Discord Setup and Integration

Using the Webhook feature, you can send custom alerts and actions to your Discord server following the steps below. In this example, we are creating a new server, but the webhook can also be set up with an existing Discord server.<br>

**(1)** Click on the **+** symbol in the top left corner of your Discord account to **Add a Server**.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Fs6mh4ZMET1rqdbWxq7vI%2F1%20Add%20Server.png?alt=media&#x26;token=f2a315fd-007c-459d-8daf-c6de45545a68" alt=""><figcaption></figcaption></figure>

**(2)** After clicking on **Create My Own** (or selecting a template), select whether the server is for yourself or for a community.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FU2KmH2rd3MjjWZKcpay8%2F2%20Create%20my%20own.png?alt=media&#x26;token=fc12df3c-9b1b-48ca-8849-01667214992f" alt=""><figcaption></figcaption></figure>

**(3)** Customize your server with an icon and a name, then click **Create**.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FzhZI8lnXa30RsH2HcNCo%2F3%20Create%20server.png?alt=media&#x26;token=5e72e6d1-09db-4c82-a2ef-528ee9c6f289" alt=""><figcaption></figcaption></figure>

**(4)** You have now created your own Discord server! After clicking on the server name, a dropdown menu will open. From there, click on **Server Settings**.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Flw4ekULJxc6PTqBV1Wjd%2F4%20Server%20settings.png?alt=media&#x26;token=f6a01b68-b166-46f0-9cf8-43a4d9d5414d" alt=""><figcaption></figcaption></figure>

**(5)** On the left-side menu, first select **Integrations**, then click on **Create Webhook**.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Fb7Vz9rCMTNOWgwRx2C4A%2F5%20Integration%20create%20webhook.png?alt=media&#x26;token=dd3987d5-87b3-4d5f-9163-5803dcf47a63" alt=""><figcaption></figcaption></figure>

**(6)** After customizing the webhook to your liking (name and icon), click on **Copy Webhook URL**.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FtbLIMqLw6f7tMPcHdrTW%2F6%20Copy%20URL.png?alt=media&#x26;token=43cad5cb-b436-4058-a55b-ce531625ecef" alt=""><figcaption></figcaption></figure>

**(7)** Next, login to the Keeper Admin Console and visit **Reporting & Alerts.** First click on **Alerts**, then click on an existing alert or create a new one.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FBT9sQpXF6G2aTIdddodh%2Fimage.png?alt=media&#x26;token=51f4f8ce-35f7-4c76-bb36-7383fdd81d1f" alt=""><figcaption></figcaption></figure>

**(8)** After selecting the desired Event Types and Attributes, click on **Add Recipient**.&#x20;

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FawC1KW2o14hAIizltucw%2Fimage.png?alt=media&#x26;token=9ed17cda-7c12-4e6c-9e88-af247db5145b" alt=""><figcaption><p>Add Recipient (Teams)</p></figcaption></figure>

**(8)** Type in the Recipient Name and Email Address and click **Add Webhook**.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FHvUIVOc3FoyIn72FtNPx%2Fimage.png?alt=media&#x26;token=45a12bb1-f22a-4f99-832a-858a4006ecf0" alt=""><figcaption><p>Add Webhook</p></figcaption></figure>

**(9)** Paste the Webhook URL from **Step 6,** then copy and paste the content for the HTTP body below. Lastly, click **Save**.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F0JgUbhdJtRj8EiHQUalG%2F10%20Finish%20Webhook.png?alt=media&#x26;token=9a3c62f5-bc89-4aee-a4bf-592984b2386b" alt=""><figcaption></figcaption></figure>

**(10)** Copy this JSON content and paste it into the **HTTP Body** section in the screenshot above.

```
{
  "content": "Keeper Security Event",
  "embeds": [
    {
      "title": "Alert Name",
      "description": "#alert_name",
      "fields": [
        {
          "name": "Event Details",
          "value": "#description"
        },
        {
          "name": "IP Address",
          "value": "#remote_address"
        },
        {
          "name": "Timestamp",
          "value": "#timestamp"
        }
      ],
      "footer": {
        "text": "Keeper Security Notification"
      }
    }
  ]
}
```

That's it! Below you can find an example of a Discord Webhook alert. Please note that it can take up to 15 minutes for events to start transmitting. You can modify the HTTP Body according to your preferences.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FG41xHPCcmUml31W2wXo1%2F11%20Discord%20webhook%20alert.png?alt=media&#x26;token=c3c39204-618b-4ecb-8315-e91be96db33d" alt=""><figcaption></figcaption></figure>

**References**:

* <https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks>
* <https://support.discord.com/hc/en-us/articles/204849977-How-do-I-create-a-server>
