Skip to content

feat: add Slack channel import as a document source#13

Open
cameronhotchkies wants to merge 1 commit intomainfrom
03-24-feat_add_slack_channel_import_as_a_document_source
Open

feat: add Slack channel import as a document source#13
cameronhotchkies wants to merge 1 commit intomainfrom
03-24-feat_add_slack_channel_import_as_a_document_source

Conversation

@cameronhotchkies
Copy link
Collaborator

@cameronhotchkies cameronhotchkies commented Mar 24, 2026

Stacked on #12 (refactor PR).

ref: #8

What

This adds Slack as a document source alongside PDFs and markdown. Users can point frfr at a Slack channel by ID or URL, and it fetches messages and threads via the Slack Web API, cleans up Slack mrkdwn into plain text (user mentions, channel refs, links, emoji, HTML entities), writes the result to a text file, and feeds it through the existing fact extraction pipeline. A new React modal handles channel input with optional date filtering, and high-volume channels are automatically limited to a configurable lookback window (default 90 days). Requires a SLACK_BOT_TOKEN env var.

Usage

# Add a Slack channel to a session
curl -X POST http://localhost:8080/api/sessions/$SESSION_ID/slack \
  -H 'Content-Type: application/json' \
  -d '{"channel_id": "C0123ABCDEF", "since": "2025-01-01"}'

# Process it (extracts text, then runs fact extraction)
curl -X POST http://localhost:8080/api/sessions/$SESSION_ID/process

Screenshots

Slack import modal

Testing

Unit tests for markup cleanup, timestamp parsing, and permalink building.

cd backend && go test ./internal/services/slack/ -v

Generated with Amp

@cameronhotchkies cameronhotchkies marked this pull request as ready for review March 24, 2026 20:56
Base automatically changed from 03-24-refactor_extract_file_text_extraction_into_separate_method to main March 24, 2026 21:03
@cameronhotchkies cameronhotchkies force-pushed the 03-24-feat_add_slack_channel_import_as_a_document_source branch from 4df1581 to befe1db Compare March 24, 2026 21:14
@cameronhotchkies cameronhotchkies force-pushed the 03-24-feat_add_slack_channel_import_as_a_document_source branch from befe1db to bed6152 Compare March 24, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants