A standalone tool for archiving Slack messages into a static site.
GitHub Actions can run the archive update daily and commit new output.
- Clone this repo
- Install Java 25
- Set
SLACK_TOKENandCHANNELS_ALLOWLISTenv vars - Set up Slack app (see below)
- Run (see below)
- Set up Slack app (see below)
- Create a new repo
- Copy
update-archive.ymlto a folder named.github/workflows/ - Copy
deploy-pages.ymlto a folder named.github/workflows/ - Customize
CHANNELS_ALLOWLISTenv var inupdate-archive.yml - Customize
SITE_BASE_URLenv var inupdate-archive.yml(example:https://<org>.github.io/<repo>) - Add repository secret
SLACK_TOKEN - Enable GitHub Pages in repository settings with source
GitHub Actions
./gradlew test./gradlew --quiet updateChatArchiveConfiguration (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, defaultdocs)STATE_DIR(optional; relative path for cursor state, defaultstate)LOOKBACK_DAYS(optional; how many days to re-fetch, default1)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:
- Create a Slack app (from scratch) in the target workspace.
- Add a bot user.
- Add the required scopes listed below.
- Install the app to the workspace.
- Copy the Bot User OAuth Token (starts with
xoxb-) intoSLACK_TOKEN. - 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.ymldeploys thedocs/directory.docs/robots.txtis always generated.docs/sitemap.xmlis generated whenSITE_BASE_URLis set.
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.
The original intent of this code was to archive every public Fineract chat message into a public, index-able, simple/static HTML website.
See LICENSE and NOTICE.