# Slack Webhooks

## Slack Setup and Integration

Using the Webhook feature, you can send custom alerts and actions to your Slack channel following the steps below.

![Example Slack Notification](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVcupctWliUDRbICi1H%2F-MVcv0CNgQCdtG0LHlDd%2Fscreen_1.png?alt=media\&token=1d38e6f7-9abd-49be-ad31-68dd2a921534)

**(1)** Go to <https://api.slack.com/apps> and Create a new app

![Create New App](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVXkFjoUocD90S2MNmR%2F-MVXorGhHDxOO7LQPova%2FScreen%20Shot%202021-03-11%20at%2011.30.57%20AM.png?alt=media\&token=d635510e-487f-4235-889f-292dc0579b32)

**(2)** Name the App, select your desired Workspace and click Create App.

![Create App](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVXkFjoUocD90S2MNmR%2F-MVXpDo-rEraju7wgdkM%2FScreen%20Shot%202021-03-11%20at%2010.57.38%20AM.png?alt=media\&token=def1ce0b-7cb1-4a1b-a51f-b86d300579b2)

**(3)** Click on Incoming Webhooks

![](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVXkFjoUocD90S2MNmR%2F-MVXpYPJwEG3t9B0keqq%2FScreen%20Shot%202021-03-11%20at%2010.57.54%20AM.png?alt=media\&token=b4575b1c-1fe3-4b87-97ec-20ad753cdfbb)

**(4)** Activate the Webhook and click "Add New Webhook to Workspace.

![Activate Webhook](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Fgit-blob-f533c8961472dd59dadef7395c5045563935c393%2FScreen%20Shot%202021-03-11%20at%2010.58.14%20AM.png?alt=media)

**(5)** Select the Slack channel you would like the alerts to be sent. Then click "Copy" to grab the Webhook URL required to plug into the Admin Console interface in the following steps.

![Copy the Webhook URL](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVXkFjoUocD90S2MNmR%2F-MVXqzqWMcy4w2VcddRd%2FScreen%20Shot%202021-03-11%20at%2010.59.20%20AM.png?alt=media\&token=bda59e7e-4e27-4993-9aa0-cfce320162b9)

**(6)** In the "Basic Information" section on the left, you can populate the icon with the Keeper icon. Right-click and save the image Use the link below to download a 512x512 PNG icon for Keeper:\
\
<https://keeper-email-images.s3.amazonaws.com/common/Keeper_512x512.png>

![](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVYeSuaWfDh4O-jPb8L%2F-MVYrKZm18VBE4ttWI9j%2FScreen%20Shot%202021-03-11%20at%204.36.39%20PM.png?alt=media\&token=4d914ec3-351d-4e7e-a26c-e61ee9bd0b31)

**(7)** Login to the **Keeper Admin Console** and visit **Reporting & Alerts** > **Alerts** and create a new alert. After selecting the desired Event Types and Attributes, click on "Add Recipient".  In the example below, I have selected all Policy Changes.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FSRvptJI1lyymdg7hyZXk%2Fimage.png?alt=media&#x26;token=e72c066d-b6c8-402a-8324-f231a8990f37" alt=""><figcaption><p>Add Alert</p></figcaption></figure>

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FSImTIov9HRjFqFPGNlf9%2Fimage.png?alt=media&#x26;token=4aab03a7-4154-4c57-998f-da5bdeacf916" alt=""><figcaption><p>Select Event Types and Attributes</p></figcaption></figure>

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F0pXC5Wp76hv1sScyCcBS%2Fimage.png?alt=media&#x26;token=0b22a382-af05-4e75-9fe0-72df54112c80" alt=""><figcaption><p>Add Recipient (Slack)</p></figcaption></figure>

**(8)** Enter the Name and Email address to receive the event, 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%2FAh4ZpKAqzl5rvxYMvNxl%2Fimage.png?alt=media&#x26;token=9f151ec2-53d0-45b1-810f-09923817a7ce" alt=""><figcaption><p>Add Webhook</p></figcaption></figure>

**(9)** Paste the Webhook URL from Step 5 and copy and paste the HTTP body content below

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FEoru72Hthp2A5iII0B8M%2Fimage.png?alt=media&#x26;token=f86b0119-e9db-4f7d-ae9f-e7c1744d923e" alt=""><figcaption></figcaption></figure>

**(10)** Copy-paste the below JSON content into the **HTTP Body** section.

```
{
  "text": "Keeper Security Event",
  "blocks": [
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Alert Name*\n#alert_name"
        }
      ]
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Event Details*\n#description"
        }
      ]
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*IP Address*\n#remote_address"
        },
        {
          "type": "mrkdwn",
          "text": "*Timestamp*\n#timestamp"
        }
      ]
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "Vault Login",
            "emoji": true
          },
          "value": "vault",
          "url": "https://keepersecurity.com/vault",
          "action_id": "actionId-1"
        },
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "Console Login",
            "emoji": true
          },
          "value": "console",
          "url": "https://keepersecurity.com/console",
          "action_id": "actionId-2"
        }
      ]
    }
  ]
}

```

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Finf37e0wVlmVAIvfQ2D6%2Fimage.png?alt=media&#x26;token=2aa9af4d-6e48-49f4-85f7-f2d99c530b89" alt=""><figcaption><p>HTTP Body</p></figcaption></figure>

(10) Click **Save** on the recipient and **Save** the alert.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FbfbHA1dD2ObHeUJgwpxx%2Fimage.png?alt=media&#x26;token=403d0013-eb47-49b6-afb5-7166e600b9d5" alt="" width="375"><figcaption><p>Add Webhook</p></figcaption></figure>

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2F35lQVqUYB5aHdxeYzIPL%2Fimage.png?alt=media&#x26;token=0fdb0b6d-6b90-46b4-8a31-4f543ac2bbe7" alt=""><figcaption><p>Save Alert</p></figcaption></figure>

That's it.  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.  Slack's [Block Kit Builder](https://api.slack.com/block-kit) allows you to customize the look and feel completely.

{% hint style="info" %}
Creating new Webhook body content and editing content may take up to 15 minutes to take effect.
{% endhint %}

## Shared Record Notifications

Another use case is to be notified when a record is added to a particular Shared Folder.

![Example Shared Record Notification](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVcupctWliUDRbICi1H%2F-MVcv6XUqEt415EAIepQ%2Fscreen_2.png?alt=media\&token=5e33174c-9770-4b15-be9e-a8222557c29d)

**(1)** Follow the Slack setup steps above to create a baseline Slack integration.

**(2)** In the Web Vault, grab the Shared Folder UID that you would like to report on

![Shared Folder UID](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MVbdhlJ7ljgdPhQt5O7%2F-MVbxZ-VWeB2n7hpyad_%2FScreen%20Shot%202021-03-12%20at%2011.41.03%20AM.png?alt=media\&token=f7032e0e-b6c0-45c8-8943-e2cccaffe052)

**(3)** On the Admin Console, create a new Alert for this event that is tracking "Add Record to Shared Folder"

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FtsOD1PhekSdo2W5qiwuF%2Fimage.png?alt=media&#x26;token=60670b4b-d4e9-4e0a-a03b-9a6c4044a9e0" alt=""><figcaption><p>Alert on Record Added to Shared Folder</p></figcaption></figure>

**(4)** Under the Attributes section, paste the Shared Folder UID

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2Fh80WKdskTvqlZUIWFgpv%2Fimage.png?alt=media&#x26;token=d6e7a6f1-f563-45ec-9f4e-326bfc292eb7" alt=""><figcaption><p>Add Shared Folder UID</p></figcaption></figure>

**(5)** Under "Recipients", create a new Webhook recipient.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FT3eOqhJteIibgTUTOf5J%2Fimage.png?alt=media&#x26;token=b6e87709-4af4-49c9-82c6-3b709531031a" alt=""><figcaption></figcaption></figure>

**(6)** Copy Paste the below JSON text body into the HTTP Body section. In the "text" field, you will want to edit it to match up with the alert that you are creating.&#x20;

```
{
  "text": "Keeper - Added Record to Shared Folder",
  "blocks": [
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Alert Name*\n#alert_name"
        }
      ]
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Event Details*\n#description"
        }
      ]
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*IP Address*\n#remote_address"
        },
        {
          "type": "mrkdwn",
          "text": "*Timestamp*\n#timestamp"
        },
        {
          "type": "mrkdwn",
          "text": "*Record UID*\n#record_uid"
        }
      ]
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "Open Record",
            "emoji": true
          },
          "value": "vault",
          "url": "https://keepersecurity.com/vault/#detail/#record_uid",
          "action_id": "actionId-1"
        },
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "Console Login",
            "emoji": true
          },
          "value": "console",
          "url": "https://keepersecurity.com/console",
          "action_id": "actionId-2"
        }
      ]
    }
  ]
}
```


---

# 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/en/enterprise-guide/webhooks/slack-webhooks.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.
