Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Automate Slack via browser automation to check unreads, navigate channels, send messages, and extract conversation data.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/slack-tasks.md
1# Common Slack Tasks & Patterns23Reference guide for common automations and data extraction patterns when interacting with Slack.45## Task: Check All Unread Messages67### Goal8Determine which channels and DMs have unread messages.910### Steps11121. **Connect to Slack**13```bash14agent-browser connect 922215```16172. **Check Activity Tab**18- Take snapshot: `agent-browser snapshot -i`19- Look for Activity tab ref (usually `@e14`)20- Click: `agent-browser click @e14`21- Wait: `agent-browser wait 1000`22- If you see "You've read all the unreads", you have no unread messages23- Screenshot: `agent-browser screenshot activity.png`24253. **Check DMs**26- Click DMs tab ref (usually `@e13`)27- Look for "Unreads" toggle/badge28- Count visible conversations with indicators29304. **Check Channels**31- Look for "More unreads" button (usually in sidebar)32- Click it to expand list of channels with unreads33- Screenshot the expanded view34- Parse channel names from snapshot35365. **Summary**37- Activity + DMs + Channels = complete unread picture3839### Evidence Capture40- Screenshot of Activity tab41- Screenshot of DMs42- Screenshot of expanded unreads sidebar4344---4546## Task: Find All Channels in Workspace4748### Goal49Get a complete list of all channels you have access to.5051### Steps52531. **Navigate to Channels section**54```bash55agent-browser connect 922256agent-browser snapshot -i57```58592. **Look for "Channels" treeitem**60- This is usually a collapsed section header61- Click to expand if collapsed62- Screenshot: `agent-browser screenshot all-channels.png`63643. **Scroll through sidebar**65```bash66# If the list is long, scroll within the sidebar67agent-browser scroll down 500 --selector ".p-sidebar"68agent-browser screenshot channels-page-2.png69```70714. **Parse snapshot for channel list**72```bash73agent-browser snapshot --json > channels.json74# Search JSON for treeitem elements with level=2 under "Channels" section75```7677### Evidence78- JSON snapshot with all channel refs79- Screenshots of channel list80- Count of total channels8182---8384## Task: Search for Messages Containing Keywords8586### Goal87Find all messages/threads mentioning specific terms.8889### Steps90911. **Open search**92```bash93agent-browser snapshot -i94# Find Search button ref (usually @e5)95agent-browser click @e596agent-browser wait 50097```98992. **Enter search term**100```bash101# Identify search input ref from snapshot102agent-browser fill @e_search_input "your keyword"103agent-browser press Enter104agent-browser wait --load networkidle105```1061073. **Capture results**108```bash109agent-browser screenshot search-results.png110agent-browser snapshot -i > search-snapshot.txt111```1121134. **Parse results**114- Look for result items in snapshot115- Extract message content, sender, channel, timestamp116- Follow links to view full context117118### Filters119Slack search supports filters:120- `in:channel-name` - Search in specific channel121- `from:@user` - Messages from specific user122- `before:2026-02-25` - Messages before date123- `after:2026-02-20` - Messages after date124- `has:file` - Messages with files125- `has:emoji` - Messages with reactions126127Example search: `"bug report" in:engineering from:@alice after:2026-02-20`128129---130131## Task: Monitor a Specific Channel for Activity132133### Goal134Watch a channel and capture new messages/engagement.135136### Steps1371381. **Navigate to channel**139```bash140agent-browser connect 9222141agent-browser snapshot -i142# Find channel ref from sidebar143agent-browser click @e_channel_ref144agent-browser wait --load networkidle145```1461472. **Check channel info**148- Screenshot channel details: `agent-browser screenshot channel-header.png`149- Look for member count, description, topic1501513. **View messages**152```bash153# Jump to recent/unread154agent-browser press j # Jump to unread in Slack155agent-browser wait 500156agent-browser screenshot recent-messages.png157```1581594. **Scroll to see more**160```bash161agent-browser scroll down 500162agent-browser screenshot more-messages.png163```1641655. **Check threads**166- Click on messages with thread indicators167- View replies in thread view168- Screenshot: `agent-browser screenshot thread.png`169170### Evidence171- Channel info screenshot172- Message history screenshots173- Thread examples174175---176177## Task: Extract User Information from a Conversation178179### Goal180Find who said what, when, and in what context.181182### Steps1831841. **Navigate to relevant channel or DM**185```bash186agent-browser click @e_conversation_ref187agent-browser wait 1000188```1891902. **Take snapshot with context**191```bash192agent-browser snapshot --json > conversation.json193```1941953. **Find message blocks**196- In JSON, look for document/listitem elements197- These contain: user name (button), timestamp (link), message text, reactions1981994. **Extract structured data**200- User: Found in button element with username201- Time: Found in link with timestamp202- Content: Text content of message203- Reactions: Buttons showing emoji counts2042055. **Screenshot key messages**206```bash207agent-browser screenshot important-message.png208agent-browser screenshot --annotate annotated-message.png209```210211---212213## Task: Track Reactions to a Message214215### Goal216See who reacted to a message and with what emoji.217218### Steps2192201. **Find message with reactions**221```bash222agent-browser snapshot -i223# Look for "N reaction(s)" buttons in messages224```2252262. **Click reaction button to expand**227```bash228agent-browser click @e_reaction_button229agent-browser wait 500230```2312323. **Capture reaction details**233```bash234agent-browser screenshot reactions.png235# You'll see emoji, count, and list of users who reacted236```2372384. **Extract data**239- Emoji used240- Number of people who reacted241- User names (if visible in popup)242243---244245## Task: Find and Review Pinned Messages246247### Goal248See messages that have been pinned in a channel.249250### Steps2512521. **Open a channel**253```bash254agent-browser click @e_channel_ref255agent-browser wait 1000256agent-browser snapshot -i257```2582592. **Click Pins tab**260- In channel view, look for "Pins" tab ref (usually near Messages, Files tabs)261- Click it: `agent-browser click @e_pins_tab`262- Wait: `agent-browser wait 500`2632643. **View pinned messages**265```bash266agent-browser screenshot pins.png267agent-browser snapshot -i > pins-snapshot.txt268```2692704. **Review each pin**271- Click pin to see context272- Note who pinned it, when, and why273- Screenshot: `agent-browser screenshot pin-detail.png`274275---276277## Pattern: Extract Timestamp from Link278279In Slack snapshot, message timestamps appear as links. Example:280```281- link "Feb 25th at 10:26:22 AM" [ref=e151]282- /url: https://vercel.slack.com/archives/C0A5RTN0856/p1772036782543189283```284285The URL contains the timestamp in the fragment (`p1772036782543189`). This is a Slack message ID that uniquely identifies the message.286287---288289## Pattern: Understanding Channel/Thread Structure290291```292- treeitem "channel-name" [ref=e94] [level=2]293- group: (contains channel metadata or sub-items)294```295296- **level=1**: Section headers (External connections, Starred, Channels, etc.)297- **level=2**: Individual channels/items within sections298- **level=3+**: Nested sub-items (rare in sidebar)299300---301302## Common Ref Patterns (Session-Dependent)303304These refs vary per session, but follow patterns:305306| Element | Typical Ref Range | How to Find |307|---------|------------------|------------|308| Home tab | e10-e20 | `snapshot -i \| grep "Home"` |309| DMs tab | e10-e20 | `snapshot -i \| grep "DMs"` |310| Activity tab | e10-e20 | `snapshot -i \| grep "Activity"` |311| Search | e5-e10 | `snapshot -i \| grep "Search"` |312| More unreads | e20-e30 | `snapshot -i \| grep "More unreads"` |313| Channel refs | e30+ | `snapshot -i \| grep "treeitem"` |314315**Always take a fresh snapshot** to find current refs for the current session.316317---318319## Debugging: Element Not Found320321If you can't find an element:3223231. **Check it's visible**324```bash325# Is the element on screen or off-screen?326agent-browser screenshot current-state.png327# Compare screenshot to what you expected328```3293302. **Try expanding/scrolling**331```bash332# Sidebar might need scrolling333agent-browser scroll down 300 --selector ".p-sidebar"334agent-browser snapshot -i335```3363373. **Check current URL**338```bash339agent-browser get url340# Verify you're in the right section341```3423434. **Wait for page to load**344```bash345agent-browser wait --load networkidle346agent-browser wait 1000347agent-browser snapshot -i348```349