Exports first response time, CSAT, and chat duration from Text into Postgres, and visualizes them in a self-hosted Metabase dashboard.
Full setup guide: https://www.text.com/docs/guides/visualize-metrics-in-metabase
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, athttp://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.
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-bootstrapSee the guide above for the full walkthrough and troubleshooting.
| 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). |
docker compose down # stop, keep data
docker compose down -v # stop, remove all local data — exported reports and the Metabase admin/setupexporter 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-bootstrapSee the full Text documentation reference.
