# Slack Bot for Browser Automation

Execute browser automation tasks via Slack mentions with real-time session URLs.

[Source](https://github.com/browser-use/template-library/blob/main/slack/)

## Overview

Transform Slack into a powerful browser automation interface. Mention your bot with a task, and it executes browser actions in a cloud sandbox, returning results directly to your channel with **live session URLs** you can watch in real-time.

## Key Features

- **Slack-native workflow** - Mention the bot anywhere with your automation task  
- **Live browser sessions** - Get real-time URLs to watch execution as it happens  
- **Cloud-based** - Runs in Browser Use sandboxes using `@sandbox()` decorator  
- **Async processing** - FastAPI handles Slack events without timeouts  
- **Optional profiles** - Use authenticated browser sessions for logged-in tasks

## Requirements

You'll need **three credentials**:

- **Browser Use** - For cloud browser automation  
- **Slack Access Token** - Bot OAuth token from your Slack app  
- **Slack Signing Secret** - For webhook request verification

Get your Browser Use API Key [here](https://cloud.browser-use.com/new-api-key)

Get your Slack API Key [here](https://api.slack.com/apps)

## Installation

```bash
uvx browser-use init --template slack
```

## How It Works

1. **Invite** the bot to a Slack channel  
2. **Mention** the bot with a task: `@bot search YouTube for Python tutorials`  
3. **Receive** a live browser session URL (optional: watch in real-time)  
4. **Get results** posted back to the thread when complete

## Setup Requirements

This template requires additional configuration:

- **Slack App creation** - OAuth scopes: `app_mentions:read`, `channels:read`, `chat:write`  
- **ngrok tunnel** (local dev) - For HTTPS webhook endpoint  
- **Event Subscriptions** - Configure webhook URL in Slack app settings

📖 See the [detailed README](https://github.com/browser-use/template-library/blob/main/slack/README.md) for step-by-step Slack app setup and Event Subscriptions configuration.

## Production Ready

Built with FastAPI and designed for deployment. Replace ngrok with your production URL, configure environment variables, and deploy to any cloud platform supporting Python web apps.
