WorkingDirectory icon
Clone icon
DbtCLI icon
Docker icon
Sync icon
TelegramSend icon

Run a dbt job and Hightouch sync, send a Telegram message on workflow completion

Run dbt on Snowflake, trigger a Hightouch reverse ETL sync, and send a Telegram alert from Kestra. Automate ELT with built-in notifications and retries.

Categories
Data

Build a complete reverse ETL pipeline that transforms raw data with dbt, activates it in your operational tools through a Hightouch sync, and tells your team the moment fresh data lands in a Telegram channel. This blueprint chains data transformation, reverse ETL, and team notification into a single declarative workflow so your sales, marketing, and support tools always run on up to date models without anyone watching the clock.

How it works

  1. A io.kestra.plugin.core.flow.WorkingDirectory task named workflow creates a shared working space so the cloned repository and the dbt run share the same files.
  2. Inside it, io.kestra.plugin.git.Clone (clone_repository) pulls the main branch of the kestra-io/dbt-demo project, bringing in the dbt models and project files.
  3. io.kestra.plugin.dbt.cli.DbtCLI (dbt) runs dbt run against Snowflake using a Docker taskRunner and the ghcr.io/kestra-io/dbt-snowflake:latest image. The Snowflake profile is built from secrets at runtime.
  4. io.kestra.plugin.hightouch.Sync (hightouch) triggers a Hightouch reverse ETL sync by syncId, pushing the freshly modeled tables out to your downstream operational platforms.
  5. io.kestra.plugin.telegram.TelegramSend (telegram_notification) posts a message to the @customer_third_party_channel channel confirming the data has been synced.

What you get

  • A single workflow that covers transform, activate, and notify in order.
  • dbt models compiled and run on Snowflake inside a reproducible Docker image.
  • A Hightouch sync triggered automatically right after transformations succeed.
  • A Telegram message that closes the loop so stakeholders know data is ready.
  • Credentials kept out of the YAML through Kestra secrets.

Who it's for

  • Analytics engineers who own dbt models and want activation handled downstream.
  • Data teams running reverse ETL who need transformation and sync in one chain.
  • Operations and RevOps teams that depend on fresh data reaching their tools.

Why orchestrate this with Kestra

Hightouch can schedule syncs and dbt has its own runner, but neither can coordinate the full handoff: clone, transform on Snowflake, activate through reverse ETL, then alert a channel as one auditable run. Kestra ties these tools together with event and schedule triggers, automatic retries on transient failures, full execution lineage across every task, and a declarative YAML definition you can version in Git. The notification only fires after the sync actually completes, something a tool only scheduler cannot guarantee.

Prerequisites

  • A Kestra instance with the dbt, Git, Hightouch, and Telegram plugins available.
  • A Snowflake account reachable with the credentials below.
  • A Hightouch account with a configured sync and its numeric syncId.
  • A Telegram bot added to the target channel.

Secrets

  • SNOWFLAKE_ACCOUNT
  • SNOWFLAKE_USER
  • SNOWFLAKE_PASSWORD
  • SNOWFLAKE_ROLE
  • SNOWFLAKE_DATABASE
  • HIGHTOUCH_API_TOKEN
  • TELEGRAM_BOT_TOKEN

Quick start

  1. Add the secrets listed above to your Kestra instance.
  2. Replace the syncId in the hightouch task with your own Hightouch sync id.
  3. Update the channel in telegram_notification to your Telegram channel handle.
  4. Point clone_repository at your own dbt project, or keep the demo repo to try it out.
  5. Save the flow and run it, then watch the execution as dbt, Hightouch, and Telegram run in sequence.

How to extend

  • Swap dbt run for dbt build or add dbt test commands to validate models before activation.
  • Add a Schedule or flow trigger so the pipeline runs on a cadence or after an upstream load.
  • Replace or duplicate the Telegram step with Slack, email, or other notification plugins.
  • Trigger several Hightouch syncs in parallel to fan data out to multiple destinations.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.