skill-data/slack/references/slack-tasks.md
Reference guide for common automations and data extraction patterns when interacting with Slack.
Determine which channels and DMs have unread messages.
Connect to Slack
agent-browser connect 9222
Check Activity Tab
agent-browser snapshot -i@e14)agent-browser click @e14agent-browser wait 1000agent-browser screenshot activity.pngCheck DMs
@e13)Check Channels
Summary
Get a complete list of all channels you have access to.
Navigate to Channels section
agent-browser connect 9222
agent-browser snapshot -i
Look for "Channels" treeitem
agent-browser screenshot all-channels.pngScroll through sidebar
# If the list is long, scroll within the sidebar
agent-browser scroll down 500 --selector ".p-sidebar"
agent-browser screenshot channels-page-2.png
Parse snapshot for channel list
agent-browser snapshot --json > channels.json
# Search JSON for treeitem elements with level=2 under "Channels" section
Find all messages/threads mentioning specific terms.
Open search
agent-browser snapshot -i
# Find Search button ref (usually @e5)
agent-browser click @e5
agent-browser wait 500
Enter search term
# Identify search input ref from snapshot
agent-browser fill @e_search_input "your keyword"
agent-browser press Enter
agent-browser wait --load networkidle
Capture results
agent-browser screenshot search-results.png
agent-browser snapshot -i > search-snapshot.txt
Parse results
Slack search supports filters:
in:channel-name - Search in specific channelfrom:@user - Messages from specific userbefore:2026-02-25 - Messages before dateafter:2026-02-20 - Messages after datehas:file - Messages with fileshas:emoji - Messages with reactionsExample search: "bug report" in:engineering from:@alice after:2026-02-20
Watch a channel and capture new messages/engagement.
Navigate to channel
agent-browser connect 9222
agent-browser snapshot -i
# Find channel ref from sidebar
agent-browser click @e_channel_ref
agent-browser wait --load networkidle
Check channel info
agent-browser screenshot channel-header.pngView messages
# Jump to recent/unread
agent-browser press j # Jump to unread in Slack
agent-browser wait 500
agent-browser screenshot recent-messages.png
Scroll to see more
agent-browser scroll down 500
agent-browser screenshot more-messages.png
Check threads
agent-browser screenshot thread.pngFind who said what, when, and in what context.
Navigate to relevant channel or DM
agent-browser click @e_conversation_ref
agent-browser wait 1000
Take snapshot with context
agent-browser snapshot --json > conversation.json
Find message blocks
Extract structured data
Screenshot key messages
agent-browser screenshot important-message.png
agent-browser screenshot --annotate annotated-message.png
See who reacted to a message and with what emoji.
Find message with reactions
agent-browser snapshot -i
# Look for "N reaction(s)" buttons in messages
Click reaction button to expand
agent-browser click @e_reaction_button
agent-browser wait 500
Capture reaction details
agent-browser screenshot reactions.png
# You'll see emoji, count, and list of users who reacted
Extract data
See messages that have been pinned in a channel.
Open a channel
agent-browser click @e_channel_ref
agent-browser wait 1000
agent-browser snapshot -i
Click Pins tab
agent-browser click @e_pins_tabagent-browser wait 500View pinned messages
agent-browser screenshot pins.png
agent-browser snapshot -i > pins-snapshot.txt
Review each pin
agent-browser screenshot pin-detail.pngIn Slack snapshot, message timestamps appear as links. Example:
- link "Feb 25th at 10:26:22 AM" [ref=e151]
- /url: https://vercel.slack.com/archives/C0A5RTN0856/p1772036782543189
The URL contains the timestamp in the fragment (p1772036782543189). This is a Slack message ID that uniquely identifies the message.
- treeitem "channel-name" [ref=e94] [level=2]
- group: (contains channel metadata or sub-items)
These refs vary per session, but follow patterns:
| Element | Typical Ref Range | How to Find |
|---|---|---|
| Home tab | e10-e20 | snapshot -i | grep "Home" |
| DMs tab | e10-e20 | snapshot -i | grep "DMs" |
| Activity tab | e10-e20 | snapshot -i | grep "Activity" |
| Search | e5-e10 | snapshot -i | grep "Search" |
| More unreads | e20-e30 | snapshot -i | grep "More unreads" |
| Channel refs | e30+ | snapshot -i | grep "treeitem" |
Always take a fresh snapshot to find current refs for the current session.
If you can't find an element:
Check it's visible
# Is the element on screen or off-screen?
agent-browser screenshot current-state.png
# Compare screenshot to what you expected
Try expanding/scrolling
# Sidebar might need scrolling
agent-browser scroll down 300 --selector ".p-sidebar"
agent-browser snapshot -i
Check current URL
agent-browser get url
# Verify you're in the right section
Wait for page to load
agent-browser wait --load networkidle
agent-browser wait 1000
agent-browser snapshot -i