What Agents Can Do
Slack automation
Have your agent check unreads, open channels, search messages and sum up discussions in your signed-in Slack web app. It goes through your browser, with no Slack API, OAuth or bot tokens.
Ask your agent
What's unread in my Slack? List it by channel.
It looks in Activity and More unreads.
Search for last week's release discussion and sum it up as bullet points.
Uses Slack's own search.
Export recent messages in #engineering as JSON with author and time.
Messages, user names and timestamps come from the page structure.
What the agent does
- It opens the web app with
open https://app.slack.com, reusing your Chrome's sign-in. - It reads the sidebar with
snapshot -iand finds unreads in the Activity tab and More unreads. - It clicks a channel in the sidebar, waits for it to load, then scrolls to load more history.
- Search goes through Slack's own search box: type the keyword, press Enter, wait for results.
- For structured data it exports a JSON snapshot or reads text from individual elements.
What you'll see
- Slack opens as a background tab in a
β¦ <project>tab group in your Chrome; the Slack tab you're using is left alone. - It only works in the workspace you're signed in to; it can't work across workspaces.
- Slack may rate-limit bursts of actions, so the agent should leave gaps between commands.
- Screenshots go to the paths the agent picks; compare them with Slack to check unread counts and search results.
- At the end the agent runs
done: tabs it opened along the way close, and pages you need to see or keep using stay open.
Under the hood
The commands and flags the agent runs. Read on if you write your own scripts, debug a run, or want the details.
Slack's web app is just a big web app β chrome-use drives it like any other page:
connect to an already-logged-in session, read an accessibility snapshot to get elements with @ref,
then check unreads, jump to channels, search conversations, and extract messages. Everything runs through a real browser,
never touching the Slack API, and needing no OAuth, webhooks, or bot tokens.
skills get slack.
Quick start
chrome-use drives your already-logged-in real Chrome through the extension, so Slack's login is reused and you never open a debug port (Chrome 136+ pops "Allow remote debugging?" on every connect to one β see How It Works). Just have it open the Slack web app.
# Drive your logged-in real Chrome via the extension; open the Slack web app (login reused)
$ chrome-use open https://app.slack.com
# Grab an interactive snapshot to see what's on the page
$ chrome-use snapshot -i
snapshot -i to get elements with refs β click a tab, expand a group, or enter a channel β
read data or run an action β screenshot when you need evidence. Re-snapshot after every navigation,
because refs change as the page changes.
Check unread messages
Unreads are scattered across a few places: the "More unreads" button at the top of the sidebar, the unread roundup in the Activity tab, and channel names shown in bold / with a badge. Snapshot first to locate refs, then check them one by one.
# Continuing on the Slack tab opened above
$ chrome-use snapshot -i
# Open the Activity tab to see the unread roundup (ref may differ each time)
$ chrome-use click @e14
$ chrome-use wait 1000
$ chrome-use screenshot activity-unreads.png
# Or expand the sidebar's "More unreads"
$ chrome-use click @e21
$ chrome-use wait 500
$ chrome-use screenshot expanded-unreads.png
To count how many unread channels there are, expand the unread group and count the treeitems:
# After expanding unreads, each treeitem with a channel name counts as one unread
$ chrome-use snapshot -i | grep -c "treeitem"
Navigate to a channel
After snapshotting, find the channel name in the sidebar list (e.g. engineering, product-design)
and click its treeitem ref. Once inside the channel, use wait --load networkidle to let the content finish loading before acting.
$ chrome-use snapshot -i
# Click the channel's treeitem (example ref β go by your own snapshot)
$ chrome-use click @e94
$ chrome-use wait --load networkidle
# Scroll down in the message area to load more history
$ chrome-use scroll down 500
$ chrome-use screenshot channel-messages.png
chrome-use scroll down 300 --selector ".p-sidebar".
Search conversations
Using Slack's built-in search is the easiest path: click the search button, type the keyword, hit Enter, and wait for results to load.
$ chrome-use snapshot -i
$ chrome-use click @e5 # search button
$ chrome-use fill @e_search "keyword"
$ chrome-use press Enter
$ chrome-use wait --load networkidle
$ chrome-use screenshot search-results.png
Extract data
For programmatic parsing, use a JSON snapshot to get a machine-readable accessibility tree; for a single element's text, use get text.
For more systematic extraction patterns, see Extract data.
# Export the whole accessibility tree as JSON for easy parsing
$ chrome-use snapshot --json > slack-snapshot.json
# Get the plain text of a specific message / element
$ chrome-use get text @e_message_ref
# Current page URL and title, to keep as a reference
$ chrome-use get url
$ chrome-use get title
When parsing the JSON, watch for how these fields map:
| What you want | Where to find it in the snapshot |
|---|---|
| Channel name | the name field of a treeitem (sub-channels are level=2) |
| Message content | listitem / document elements |
| Username | button elements carrying user info |
| Timestamp | link elements carrying time info |
Common refs & sidebar structure
The Slack sidebar is roughly: Threads / Huddles / Drafts & sent / Directories, followed by group headers (Starred, Channels, etc.) with channel treeitems under them, then Direct Messages, Apps, and a "More unreads" button at the bottom. The refs below are common locations, for reference only β go by your own snapshot.
Home tab (usually).
Direct messages tab.
Activity tab, showing the unread count.
Search button.
Expands the unread channel list (changes each time).
@e14 and @e21 written in the docs are just typical values; they change with the session and page state.
Always snapshot -i before you click β don't hard-code refs.
Debugging
This stealth fork disables console/error capture by default β to use console / errors,
start the session with AGENT_BROWSER_CAPTURE_CONSOLE=1, otherwise they return empty.
# You must first start the session with AGENT_BROWSER_CAPTURE_CONSOLE=1
$ chrome-use console
$ chrome-use errors
# When stuck, check the current page state
$ chrome-use get url
$ chrome-use get title
$ chrome-use screenshot page-state.png
Caveats
- Pure browser automation: it doesn't go through the Slack API, so there's no OAuth, webhooks, or bot tokens involved.
- Session-bound: screenshots and snapshots are all tied to the current browser session.
- May get rate-limited: Slack throttles overly dense actions β add a
sleep 1orwaitbetween commands to let the UI catch up. - Only your own workspace: you can't automate across workspaces.