New to Kestra?
Use blueprints to kickstart your first workflows.
Export a Slack channel's message history and load it into BigQuery on a daily schedule with Kestra for analytics, auditing, and long-term retention.
Archive Slack channel history into BigQuery so your team keeps a durable, queryable record of conversations for analytics, compliance, and long-term retention. Slack's free and standard plans cap how far back you can search, and the in-app history eventually rolls off, which makes audits, usage analysis, and incident reviews hard. This blueprint pulls messages out of a Slack channel, converts them into a BigQuery-friendly format, and loads them into a warehouse table on a daily schedule, turning ephemeral chat into structured data you can query with SQL.
export_history uses io.kestra.plugin.slack.app.conversations.History to fetch the channel's messages to Kestra internal storage. It reads the channel from inputs.channel_id and limits the window with oldest set to {{ now() | dateAdd(-1, 'DAYS') }}, capturing the previous day.convert_to_json uses io.kestra.plugin.serdes.json.IonToJson to transform the exported Ion file into newline-delimited JSON, because BigQuery Load accepts CSV, JSON, AVRO, PARQUET, and ORC but not Ion.load_to_bigquery uses io.kestra.plugin.gcp.bigquery.Load to load the JSON into the table from inputs.destination_table, using format: JSON and authenticating with the service account and project from secrets.daily_export trigger (io.kestra.plugin.core.trigger.Schedule) runs the flow every morning at 0 6 * * *. It ships disabled so you can review it before enabling.channel_id and destination_table inputs.Slack has no native scheduler to push history into a warehouse, and BigQuery cannot reach into Slack on its own. Kestra fills that gap with an event-driven Schedule trigger, automatic retries on transient API or load failures, full execution lineage across the export, convert, and load steps, and a declarative YAML definition you can version, review, and reuse. The chained outputs between tasks keep the pipeline traceable end to end.
SLACK_TOKEN: Slack token with channels:history (and groups:history for private channels).GCP_SERVICE_ACCOUNT: service account key JSON with BigQuery load permissions.GCP_PROJECT_ID: GCP project hosting the destination dataset.SLACK_TOKEN, GCP_SERVICE_ACCOUNT, and GCP_PROJECT_ID as secrets in your Kestra namespace.channel_id (right-click the channel, Copy Link, take the trailing ID).destination_table in project.dataset.table form.daily_export trigger.oldest window or remove it to backfill the full channel history.io.kestra.plugin.gcp.bigquery.Query task to transform or deduplicate rows.