Trigger the right Hightouch sync when a data PR merges

When a data-model pull request merges to main, fire only the Hightouch syncs that touch the changed folders, and post the receipt in Slack.

Deterministic Code
HightouchGitHubSlack BotEngineeringOperationsData SyncNotifications & Alerts
PromptCreate

Build a code workflow that triggers the right Hightouch sync automatically whenever a data-model pull request ships, so production destinations always reflect what just merged. This is a deterministic pipeline with no judgement calls per run.

Trigger: a GitHub webhook on the pull_request event, filtered to action=closed AND merged=true AND base ref=main. Ignore every other PR event (opened, synchronize, closed without merge, draft, non-main base). Configure the trigger so the workflow only runs on real merges to main.

Step 1: Read the changed file paths from the webhook payload. If the payload does not already include the file list, call GitHub to list files for the PR using the repository, PR number, and head SHA from the webhook. Collect the full set of changed file paths.

Step 2: Match those paths against a small path-to-sync-slug mapping the workflow owns. The mapping should be a simple config table inside the workflow that the user can edit. Start with these example entries so the user can see the shape: models/marketing/ → marketing_audience, models/sales/ → sales_account_sync, models/finance/ → finance_billing_sync. A path matches an entry if it starts with that prefix. Build a deduplicated list of matching sync slugs across all changed paths.

Step 3: If the matched list is empty, exit the workflow without doing anything. Do not call Hightouch and do not post to Slack. This keeps unrelated PRs (docs, CI config, tests) from kicking off every sync.

Step 4: For each matched sync slug, call the Hightouch operation "Trigger Sync By ID or Slug" using the slug. Capture the returned sync run id for each trigger. Keep going on errors so one bad slug does not block the rest, but record the failure so it can be reported.

Step 5: Post a single confirmation message to Slack using the Slack Bot "Send a Message" operation, to the channel #data-deploys (let the user override the channel). The message should include the PR title, the PR URL, and a list of the sync slugs that were triggered with their returned sync run ids. If any trigger failed, include the failed slug and the error so the data team can react.

Inputs the user should be able to configure at install time: the GitHub repo to listen to (or repos), the main branch name (default main), the path-to-sync-slug mapping, and the destination Slack channel.

Integrations to use: Hightouch (Trigger Sync By ID or Slug), Slack Bot (Send a Message), and GitHub for the webhook trigger and, if needed, to list PR files.

What does this prompt do?

  • Watches your data repo for pull requests merged into main and reads which folders the PR changed.
  • Maps each changed folder to the matching Hightouch sync using a small lookup you define (for example, marketing models map to the marketing audience sync).
  • Kicks off only the syncs that match, so unrelated PRs do not run every sync in your workspace.
  • Posts a Slack receipt to your data-deploys channel with the PR title, link, and the syncs that were triggered.

What do I need to use this?

  • A Hightouch workspace with the syncs you want to trigger already set up.
  • A GitHub repo that holds your data models, where you can add a webhook.
  • A Slack workspace and a channel for deploy receipts (for example, #data-deploys).
  • A short list mapping each folder in your repo to the right Hightouch sync.

How can I customize it?

  • Edit the folder-to-sync mapping to add new model directories or split one folder across multiple syncs.
  • Change the Slack channel, or send a direct message to the on-call data engineer instead of a channel.
  • Restrict the workflow to certain repos, branches, or PR labels so only production-ready merges fire syncs.

FAQs

What happens if a PR changes files that do not map to any sync?
Nothing. No sync is triggered and no Slack message is posted. The workflow only acts when at least one changed path matches your mapping.
Can a single PR trigger more than one sync?
Yes. If the PR touches multiple folders that map to different syncs, each matching sync is triggered and all of them appear in the Slack message.
Does this work on a private GitHub repo?
Yes. You connect GitHub with access to the repo, and the workflow listens for merge events from that repo.
Will it fire when I push a branch or open a draft PR?
No. It only runs when a pull request is closed with the merged flag set to true on your main branch. Closed-without-merge and draft PRs are ignored.
Can I see whether each sync actually finished successfully?
Yes. The Slack message includes the sync run IDs Hightouch returns, so you can open Hightouch to follow the run, or extend the workflow to poll status later.

Related templates

Review desk for portal forms your team still fills in by hand

Stage a batch of filings overnight, then approve each completed form from a screenshot before anything is ever submitted.

Kernel
Google Sheets
Slack Bot
App
Client-by-client cold email pipeline review for agencies

Pick a client and a date range to see sent, replies, meetings booked and the real deal value your cold email produced, campaign by campaign.

Instantly
HubSpot
Slack Bot
App
Audit what Intercom's Fin AI actually resolved before you pay

Review every conversation Fin closed as resolved, judge which ones actually stuck, and see what the gap is worth against your bill.

Intercom
Google Sheets
Slack Bot
App
One triage console for every Jira service desk queue

Merge your IT, HR and Facilities queues into one list ranked by SLA time left, then reply, change status and escalate without ever opening Jira.

Jira Service Management
Jira
Slack Bot
App
Run your Webflow site translations from one review desk

See every page's translation status at a glance, edit translations side by side with the English, and publish only what your team has actually approved.

Webflow
JigsawStack
Slack Bot
+1
App
Legal contract intake desk your teams use instead of email

One place for sales and ops to request an NDA or vendor agreement, watch its status, and let legal launch the contract in a single click.

Ironclad
Slack Bot
General Input Database
App

Stop guessing which Hightouch sync to run after every merge.

Connect GitHub, Hightouch, and Slack once, and Geni runs the right sync for every data PR that ships.