From d68dfc86b7dc1f8e17bbcdba1d7bc4b6f53b48fd Mon Sep 17 00:00:00 2001 From: Volod Date: Fri, 29 May 2026 12:39:34 -0700 Subject: [PATCH 1/4] feat(slack): add Slack connector Exports slack.profile, slack.conversations, and slack.messages from the active Slack workspace. Token is read from app.slack.com localStorage; API calls run in-page from the slack.com origin to bypass the app.slack.com service worker. Auto-skips archived, muted, and non-member channels. --- connectors/slack/SLACK_CONNECTOR_PLAN.md | 189 ++++ connectors/slack/icons/slack.svg | 6 + .../slack/schemas/slack.conversations.json | 102 +++ connectors/slack/schemas/slack.messages.json | 125 +++ connectors/slack/schemas/slack.profile.json | 101 +++ connectors/slack/slack-playwright.js | 832 ++++++++++++++++++ connectors/slack/slack-playwright.json | 42 + registry.json | 23 + 8 files changed, 1420 insertions(+) create mode 100644 connectors/slack/SLACK_CONNECTOR_PLAN.md create mode 100644 connectors/slack/icons/slack.svg create mode 100644 connectors/slack/schemas/slack.conversations.json create mode 100644 connectors/slack/schemas/slack.messages.json create mode 100644 connectors/slack/schemas/slack.profile.json create mode 100644 connectors/slack/slack-playwright.js create mode 100644 connectors/slack/slack-playwright.json diff --git a/connectors/slack/SLACK_CONNECTOR_PLAN.md b/connectors/slack/SLACK_CONNECTOR_PLAN.md new file mode 100644 index 0000000..aea588b --- /dev/null +++ b/connectors/slack/SLACK_CONNECTOR_PLAN.md @@ -0,0 +1,189 @@ +# Slack Connector Plan + +Working notes for the Slack Playwright connector. Mirrors the pattern of +`connectors/anthropic/CLAUDE_CONNECTOR_PLAN.md` so this directory tells the +same story as our other reference platforms. + +## Goal + +A Playwright-based DataConnect connector that exports a user's Slack data from +their currently-active workspace, using the slack.com web client as the auth +surface — no Slack app registration, no OAuth, no Slack API token from the +user. + +Initial target: + +- platform: `slack.com` +- connector id: `slack-playwright` +- company directory: `connectors/slack/` +- login mode: manual browser login (re-uses existing slack.com session) +- scopes: + - `slack.profile` — user + workspace identity + - `slack.conversations` — channel / DM / group-DM index + - `slack.messages` — message bodies (the bulk), with thread replies + +## Why this shape + +- **Three scopes, mirroring `export.py`** in `/Users/volod/volod/slack-export/`. + That script already separated workspace/channel metadata from message bodies + via separate JSON files; same split here lets a builder request just the + metadata-grade `slack.conversations` without pulling the whole archive. +- **No channel-ignore UI** — DataConnect doesn't surface free-form text input + in the consent flow. Instead the connector auto-filters using signals the + user has already expressed inside Slack: + - `is_archived: true` — Slack-side archived channel + - `prefs.muted_channels` — channels the user has muted in their Slack prefs + - `is_member: false` on public channels — channels the user hasn't joined +- **Per-workspace, single team.** The connector exports whatever workspace + the user's current slack.com session is on. To export a different team, + switch teams in Slack and re-run. + +## Auth and token extraction + +slack.com web app stores its API token in the page bootstrap. Three extraction +paths in order: + +1. `window.TS.boot_data.api_token` — modern client surface +2. `window.boot_data.api_token` — legacy surface (still present in some + sessions / regions) +3. Inline `