Skip to content

apache/fineract-chat-archive

Slack Chat Archiver

A standalone tool for archiving Slack messages into a static site.

Install

GitHub Actions can run the archive update daily and commit new output.

Run local

  • Clone this repo
  • Install Java 25
  • Set SLACK_TOKEN and CHANNELS_ALLOWLIST env vars
  • Set up Slack app (see below)
  • Run (see below)

Run on GitHub Actions

  • Set up Slack app (see below)
  • Create a new repo
  • Copy update-archive.yml to a folder named .github/workflows/
  • Copy deploy-pages.yml to a folder named .github/workflows/
  • Customize CHANNELS_ALLOWLIST env var in update-archive.yml
  • Customize SITE_BASE_URL env var in update-archive.yml (example: https://<org>.github.io/<repo>)
  • Add repository secret SLACK_TOKEN
  • Enable GitHub Pages in repository settings with source GitHub Actions

Test

./gradlew test

Run

./gradlew --quiet updateChatArchive

Configuration (environment variables):

  • SLACK_TOKEN (required; Slack Bot token) ⚠️ warning: keep this secret!
  • CHANNELS_ALLOWLIST (required; comma-separated channel names, e.g. #general,#random)
  • OUTPUT_DIR (optional; relative path for site output, default docs)
  • STATE_DIR (optional; relative path for cursor state, default state)
  • LOOKBACK_DAYS (optional; how many days to re-fetch, default 1)
  • SITE_BASE_URL (optional; base URL for sitemap/robots generation)

Output:

  • Daily pages: docs/daily/<channel>/<YYYY-MM-DD>/index.html
  • Channel index: docs/daily/<channel>/index.html
  • Global index: docs/index.html
  • Stylesheet: OUTPUT_DIR/assets/chat-archive.css (static file in the publishing/output repository, not generated by Java)
  • Thread replies are rendered below parent messages with a simple prefix.
  • Pages use directory indexes so published URLs stay extensionless (for example /daily/fineract/2026-02-06/).
  • Styles include automatic dark mode via @media (prefers-color-scheme: dark).

Slack app setup:

  1. Create a Slack app (from scratch) in the target workspace.
  2. Add a bot user.
  3. Add the required scopes listed below.
  4. Install the app to the workspace.
  5. Copy the Bot User OAuth Token (starts with xoxb-) into SLACK_TOKEN.
  6. Join the bot to all channels in CHANNELS_ALLOWLIST.

Required Slack scopes:

  • channels:read (list public channels)
  • channels:history (read public channel history)
  • users:read (resolve user display names)

Permalinks are resolved via chat.getPermalink. If Slack returns missing_scope, add the scope Slack reports and re-install the app.

GitHub Pages:

  • The docs/ directory is intended for publishing via GitHub Pages.
  • deploy-pages.yml deploys the docs/ directory.
  • docs/robots.txt is always generated.
  • docs/sitemap.xml is generated when SITE_BASE_URL is set.

Instances

If you run this bot and archive data relevant to Fineract, please list your instance here. These also serve as working examples if you're looking for extra help installing the archiver.

History

The original intent of this code was to archive every public Fineract chat message into a public, index-able, simple/static HTML website.

Copyright and License

See LICENSE and NOTICE.

About

Slack Chat Archiver

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors