Skip to content

Repository files navigation

Text Reports to Metabase

Exports first response time, CSAT, and chat duration from Text into Postgres, and visualizes them in a self-hosted Metabase dashboard.

Metabase dashboard showing first response time, CSAT, and chat duration

Full setup guide: https://www.text.com/docs/guides/visualize-metrics-in-metabase

Services

  • postgres — holds the exported report data (text_analytics) and Metabase's own settings (metabase), as two separate databases in the same instance.
  • metabase — the dashboard UI, at http://localhost:3000.
  • exporter — on-demand job, imports report data from Text.
  • dashboard-bootstrap — on-demand job, connects Metabase to Postgres and builds the example dashboard.

Quickstart

Requires a Text account with permission to create a personal access token with the reports_read scope.

git clone https://github.com/livechat/text-metabase-integration.git
cd text-metabase-integration
cp .env.example .env    # set TEXT_BASIC_AUTH, METABASE_ADMIN_EMAIL, METABASE_ADMIN_PASSWORD

docker compose up -d
docker compose --profile jobs run --rm exporter

# complete Metabase's first-run setup at http://localhost:3000, then:
docker compose --profile jobs run --rm dashboard-bootstrap

See the guide above for the full walkthrough and troubleshooting.

Configuration

Variable Required Default Description
TEXT_BASIC_AUTH Yes Base64-encoded account_id:personal_access_token credential from Text.
POSTGRES_PASSWORD Yes Password for the local Postgres instance.
POSTGRES_DB No text_analytics Export database name.
POSTGRES_USER No postgres Postgres user.
METABASE_ADMIN_EMAIL Yes Used when creating the first Metabase administrator.
METABASE_ADMIN_PASSWORD Yes Must contain at least one digit (Metabase's own policy).

Stopping, resetting, rebuilding

docker compose down       # stop, keep data
docker compose down -v    # stop, remove all local data — exported reports and the Metabase admin/setup

exporter and dashboard-bootstrap build from the local Dockerfile; postgres and metabase use prebuilt images, so --build is a no-op for those two. After changing the exporter, the bootstrapper, or the Dockerfile:

docker compose --profile jobs run --build --rm exporter
docker compose --profile jobs run --build --rm dashboard-bootstrap

See the full Text documentation reference.

About

Text integration with Metabase guide

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages