# Use Slack webhooks in your integration

> Use the Use connector to use slack webhooks in your integration.

## Step 1: Create a Bring your own OAuth 2.0 app connection

To use Slack webhooks in your automations, you must first set up a **Build Your Own OAuth 2.0 App (BYOA)** Integration Service connection. For more information, see [Authentication for Slack](https://docs.uipath.com/integration-service/automation-cloud/latest/user-guide/uipath-salesforce-slack-authentication). This allows you to register a Slack app and configure the webhook URL through which Slack sends events.

After the connection is created:

1. In Automation Cloud<sup>TM</sup>, go to Integration Service, select the Slack connector and go to the **Connections** tab.
2. Go to **Connection Details**, and copy the webhook URL displayed at the top of the page.

## Step 2: Configure the webhook URL and subscribe to events in Slack

1. In the Slack API Dashboard, go to [Your Apps](https://api.slack.com/apps) and select the app you created for your workspace.
2. In the left side menu, navigate to **Event Subscriptions**.
3. Set **Enable Events** to **on** to enable event subscriptions.
4. In the **Request URL** field, paste the webhook URL you copied from the BYOA connection details page.
5. Slack attempts to verify this URL. If everything is set up correctly and Slack can successfully communicate with the provided webhook endpoint, the status **Verified** is displayed.
6. On the **Event Subscriptions** page, scroll down to **Subscribe to Bot Events** and **Subscribe to User Events**.
7. Add the events that your app should listen to (e.g. Message received, Reaction added, , etc.).
8. Save the changes. For more details about available events and the structure of Slack's Events API, refer to the [Slack Events API documentation](https://api.slack.com/apis/events-api).

## Step 3: Use a trigger in Studio or Maestro

For example, the **Webhook Event Received (Real Time)** trigger is a unified webhook activity that supports all types of events sent by Slack.

1. Add the trigger to a project:
   * In an RPA workflow, add **Webhook Event Received (Real Time)** as the trigger activity.
   * In an agentic process, select the **Wait for connector event** action, and then select the Slack **Webhook Event Received (Real Time)** trigger.If Bring your own OAuth 2.0 app authentication is set up correctly, the webhook URL is displayed in the activity next to the Slack connection. For example:

     ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/latest-docs-image-611457-7f9fc5c7-10ac06f5.webp)

If this is not the case, an error message is displayed informing you that Bring your own OAuth 2.0 app is required.
2. Configure the event based on your use case and publish the trigger.
