> ## Documentation Index
> Fetch the complete documentation index at: https://docs.airmdr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack

> Slack is a messaging platform designed for teams and workplaces, offering real-time communication, collaboration tools, and integrations with other apps. Slack API integrations, making it useful for automation and notifications, like using Slack Webhooks to send updates from other systems.

### ✅ Pre-requisites

> User must have the **AirMDR** **Slack API manifest** in JSON format.
>
> <Note>
>   Follow the steps to generate AirMDR Slack API Manifest
>
>   <Accordion title="Generate AirMDR Slack API Manifest" icon="sparkles">
>     1. Navigate to [AirMDR](https://app.airmdr.com/auth/login), provide the credentials, and click **Login.**
>     2. In the left navigation pane of the application, select **Integrations.**
>     3. Use the search option, enter the keyword "**Slack**", select the **Connections** tab, and click **Create**.
>     4. In the Authentication Details, step 2 copy the pre-generated manifest to use in the Slack application.
>   </Accordion>
>
>   or\
>   Contact AirMDR [support](mailto:support@airmdr.com) team to get the **AirMDR** **Slack API manifest**
> </Note>

### Slack App Setup via Manifest

This guide provides step-by-step instructions for setting up a Slack App using a manifest file. It covers how to create the app, enable incoming **Webhook URL**, generate **Signing Secret**, and **Bot Token** — essential components for building and integrating bots, automations, and services with Slack’s API.

<Steps>
  <Step title="Slack APP Page - Create an App">
    1. Go to [Slack API Page](https://api.slack.com/apps).

           <Note>
             You can create a new Slack app here.
           </Note>
    2. Click **"Create New App"** in the top right corner. A pop-up modal **"Create an app"** will show up.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack14.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=1d2249da857d2aca3be8f209997b4180" alt="Slack14 Pn" width="982" height="654" data-path="images/Slack14.png" />
    3. Choose **"From a manifest"** and enter the required information:
       * **Pick a workspace to develop your app in**:  Select a workspace where you want to install the app. (e.g. `airmdr`)
    4. Click **Next**.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack15.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=ee608fba5ea66f6170265ac8b4160703" alt="Slack15 Pn" width="974" height="644" data-path="images/Slack15.png" />
    5. Paste the JSON content \[MANIFEST COPY] generated earlier from the AirMDR Integration Dashboard.

           <Accordion title="Sample Manifest" icon="sparkles">
             ```

             {
                 "display_information": {
                     "name": "AirMDR",
                     "description": "Sends real-time messages to users for confirming security-related actions",
                     "background_color": "#002b87"
                 },
                 "features": {
                     "app_home": {
                         "home_tab_enabled": false,
                         "messages_tab_enabled": true,
                         "messages_tab_read_only_enabled": false
                     },
                     "bot_user": {
                         "display_name": "AirMDR",
                         "always_online": true
                     }
                 },
                 "oauth_config": {
                     "scopes": {
                         "bot": [
                             "incoming-webhook",
                             "users:read",
                             "users:read.email",
                             "chat:write",
                             "im:write",
                             "app_mentions:read",
                             "im:history"
                         ]
                     }
                 },
                 "settings": {
                     "event_subscriptions": {
                         "request_url": "https://app.airmdr.com/airmdrapi/webhooks/slack/v1/events?token=XXX",
                         "bot_events": [
                             "message.im"
                         ]
                     },
                     "interactivity": {
                         "is_enabled": true,
                         "request_url": "https://app.airmdr.com/airmdrapi/webhooks/slack/v1/interactions?token=XXX"
                     },
                     "org_deploy_enabled": false,
                     "socket_mode_enabled": false,
                     "token_rotation_enabled": false
                 }
             }
             ```
           </Accordion>

           <Tip>
             Optionally you can customise the JSON content information to easily identify the application.

             "display\_information" →  "name": \< `your org name`>

             "bot\_user" →  "display\_name": \< `your org name`>
           </Tip>
    6. Click **Next**.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack18.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=22fd452f72b00e6ef499f49e26717a16" alt="Slack18 Pn" width="962" height="698" data-path="images/Slack18.png" />
    7. In the **Review summary & create your app** pop-up modal cross-verify the content and click **Create**.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack17.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=7958bc402e1988909f49de7cf9d68852" alt="Slack17 Pn" width="962" height="600" data-path="images/Slack17.png" />
  </Step>

  <Step title="Generate a Webhook URL">
    1. In the left navigation menu, navigate to **Features** → **Incoming Webhooks**.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack1.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=26a5da622aa76c735e12c672568d7957" alt="Slack1 Pn" width="455" height="726" data-path="images/Slack1.png" />
    2. Make sure the toggle option **"Activate Incoming Webhooks"** is **On**.

           <img src="https://mintcdn.com/airmdr/-Uv__fqsZox2OjNr/images/Slack2.png?fit=max&auto=format&n=-Uv__fqsZox2OjNr&q=85&s=46b89faa4658d99ec06e334639649725" alt="Slack2 Pn" width="781" height="358" data-path="images/Slack2.png" />
    3. Scroll down to the **"Webhook URLs for Your Workspace"** section.
    4. Click **"Add New Webhook to Workspace"**.

           <img src="https://mintcdn.com/airmdr/-Uv__fqsZox2OjNr/images/Slack3.png?fit=max&auto=format&n=-Uv__fqsZox2OjNr&q=85&s=8f60b9f6a97e624b617570e2f0e3bea5" alt="Slack3 Pn" width="782" height="546" data-path="images/Slack3.png" />
    5. Select a channel in the drop-down list where you want the bot to post to.
    6. Click **"Allow"** to grant permissions.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack19.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=0ec509f499d069158ebc8e16cf78c8b4" alt="Slack19 Pn" width="1036" height="806" data-path="images/Slack19.png" />
    7. Once redirected, your **Webhook URL** will appear under **Webhook URLs for Your Workspace**.
    8. Click **Copy** to save it for use.

           <img src="https://mintcdn.com/airmdr/FjOKKpB_oauBZOON/images/Slack20.png?fit=max&auto=format&n=FjOKKpB_oauBZOON&q=85&s=3bdfd9c4fcb944a5af9ea7be0ba02645" alt="Slack20 Pn" width="1282" height="938" data-path="images/Slack20.png" />
  </Step>

  <Step title="Verify Event Subscription Request URL">
    > Slack requires validation of your request URL to enable event subscriptions.
    >
    > To ensure your endpoint (e.g., `https://yourdomain.com/slack/events`) is publicly accessible and configured to handle Slack's verification request (responds with the `challenge` value).

    1. In the left navigation menu, navigate to **Settings** → **Event Subscriptions**.
    2. Toggle **Enable Events** to **On**.
    3. Click **Retry** button in the Request URL.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack10.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=e73ca95cb565107b3cb54eba7f558a2f" alt="Slack10 Pn" width="1402" height="544" data-path="images/Slack10.png" />
    4. After successful verification, click **Save Changes** at the bottom.

           <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack11.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=00adb7111863300dfc8a1a1d3db40332" alt="Slack11 Pn" width="1736" height="1462" data-path="images/Slack11.png" />
  </Step>

  <Step title="Enable OAuth & Permissions">
    1. In the left navigation menu, navigate to **Features** → **OAuth & Permissions**.
    2. In the **OAuth Tokens** section, click "**Install to** \<`your workspace`>".

           <img src="https://mintcdn.com/airmdr/-Uv__fqsZox2OjNr/images/Slack21.png?fit=max&auto=format&n=-Uv__fqsZox2OjNr&q=85&s=c9878ce3c8998b27c7d15fbc36adb8fb" alt="Slack21 Pn" width="1198" height="304" data-path="images/Slack21.png" />
  </Step>

  <Step title="Install the App and Get the Bot Token">
    1. In the "**Where should \<**`your workspace`**> post?**"
    2. Select a `#channel`  in the drop-downlist where to post as an app.
    3. Click **Allow**.

           <img src="https://mintcdn.com/airmdr/-Uv__fqsZox2OjNr/images/Slack22.png?fit=max&auto=format&n=-Uv__fqsZox2OjNr&q=85&s=7d816bb42d36ae52ee9fed28424f08ba" alt="Slack22 Pn" width="1020" height="1266" data-path="images/Slack22.png" />
    4. After authorization, your **Bot User OAuth Token** (`xoxb-...`) will appear under **OAuth Tokens** for Your Workspace.
    5. Click **Copy** to store the token.

           <img src="https://mintcdn.com/airmdr/-Uv__fqsZox2OjNr/images/Slack23.png?fit=max&auto=format&n=-Uv__fqsZox2OjNr&q=85&s=3c9dd5b88a36159dfe2e3909d1c33f61" alt="Slack23 Pn" width="1274" height="400" data-path="images/Slack23.png" />

           <Tip>
             Click on **Revoke Tokens** button at the bottom of the page to **Revoke All OAuth Tokens**:\
             You can revoke all OAuth tokens if you want to invalidate the access any existing tokens have to Slack workspace data. \
             Users will need to grant your app permissions again to use it.
           </Tip>
  </Step>

  <Step title="Obtain Signing Secret">
    1. In the left navigation menu, navigate to **Settings** → **Basic Information**.
    2. Under **App Credentials**, locate the **Signing Secret**.
    3. Click **Show** and then **Copy**. Store it in a secure location (e.g., secrets manager).
  </Step>

  <Step title="Retrieve Credentials ">
    ### ✅ Summary of Retrieved Credentials

    | Credential                     | Description                                          |
    | :----------------------------- | :--------------------------------------------------- |
    | Webhook URL                    | Posts messages to selected Slack channels            |
    | Signing Secret                 | Verifies authenticity of incoming requests           |
    | Bot Token (starts with`xoxb-`) | Authenticates API calls made by your bot             |
    | Events URL                     | Receives Slack events via HTTP POST (e.g., messages) |

    <Check>
      <Icon icon="envelope" /> Securely save and share the **Webhook URL**, **Bot User OAuth Token** and **Signing Secret** with the AirMDR [support](mailto:support@airmdr.com) team to configure\
      or \
      Self configure Slack in the AirMDR Integrations Dashboard.
    </Check>
  </Step>
</Steps>

### **Evaluate Slack Bot User OAuth Token**

Open **cURL** and run the following command to check if your API Key is working:

**Sample Request**:

```

curl -X POST https://slack.com/api/auth.test \
  -H "Authorization: Bearer <xoxb-***your-bot-token***>"
```

**Sample Response**:

```

{
  "ok": true,
  "url": "https://yourteam.slack.com/",
  "team": "Your Team",
  "user": "bot-user-name",
  "team_id": "TXXXXXXX",
  "user_id": "UXXXXXXX"
}
```

**If Invalid**

```

{
  "ok": false,
  "error": "invalid_auth"
}
```

### Skills Provided by this Integration

| Skill ID               | Purpose                                                                                                                                                                                                                                                                                                                                                                     |
| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Slack Checkpoint**   | This skill sends a Slack message to a specified user to confirm suspected activities. It is used within playbooks to pause execution, awaiting user confirmation. If no response is received within a set timeout, the playbook proceeds with subsequent actions. This is crucial for verifying user activities and deciding the next steps in incident response scenarios. |
| **Send Slack Message** | Send a message to a Slack channel using a webhook. This skill is useful for real-time notifications or alerts.                                                                                                                                                                                                                                                              |

<Tip>
  To view the details of Input Parameters and Output for the respective skills

  * Go to [AirMDR → Slack](https://app.airmdr.com/integrations?search=Slack) Integration page.
  * Select the **Skills** tab and click on the required listed skills.
</Tip>

### Configure Slack in the AirMDR Integrations Dashboard

1. Navigate to [AirMDR](https://app.airmdr.com/auth/login), provide the credentials, and click **Login.**

   <img src="https://mintcdn.com/airmdr/wnBXbVlE7mmN9W6R/images/Datadog11.png?fit=max&auto=format&n=wnBXbVlE7mmN9W6R&q=85&s=94afec6835b90abcec516831e584184f" alt="Datadog11 Pn" width="443" height="568" data-path="images/Datadog11.png" />
2. Navigate to the AirMDR Integrations Dashboard in the left navigation pane and select **Integrations.**
3. Use the search option, enter the keyword "**Slack**", select the **Connections** tab, and click **Create**.

   <img src="https://mintcdn.com/airmdr/-Uv__fqsZox2OjNr/images/Slack24.png?fit=max&auto=format&n=-Uv__fqsZox2OjNr&q=85&s=a9491b36c15fdaecb13d250b89843ad9" alt="Slack24 Pn" width="548" height="1456" data-path="images/Slack24.png" />
4. Enter an unique name to the Instance (e.g., `your org name-Slack`) to easily identify the user connection by AirMDR.
5. Enter the **Webhook URL**, **Slack channel name**, **Bot User OAuth Token** and **Signing Secret** in the Authentication Details field params, and click **Create**.

   <img src="https://mintcdn.com/airmdr/YQbELvU7msfXIKqi/images/Slack12.png?fit=max&auto=format&n=YQbELvU7msfXIKqi&q=85&s=06f6aa687753e073ba8453edebd88b12" alt="Slack12 Pn" width="1460" height="1290" data-path="images/Slack12.png" />
6. Click the "**Authenticate**" button to authorize the connection and complete the setup.

<img src="https://mintcdn.com/airmdr/-Uv__fqsZox2OjNr/images/Slack25.png?fit=max&auto=format&n=-Uv__fqsZox2OjNr&q=85&s=2d13991f908b6eee0cd8b7260d4128c3" alt="Slack25 Pn" width="1466" height="1554" data-path="images/Slack25.png" />
