HOW-TO

Send a query's results to a webhook on a schedule.

By Chris Davidson, founder of yForest · Updated September 26, 2026

Watch This checks a query on the interval you pick and posts to any URL when the condition fires. It replaces a cron job plus a script that calls a webhook by hand, for the common case of "tell some other system when this number changes."

Start 14-day free trial Download on theMac App Store

No credit card. 14 days. Cancel in one click.

macOS 15+ · Apple Silicon native · 14-day free trial · No credit card

Quick answer: QueryFlow's Watch This (Pipelines tier) re-runs a saved query on an interval, 5 minutes to once a day, and, when the condition you set fires, posts the result as JSON to a webhook URL you provide. It sits alongside Slack, Teams, email, and macOS notification as a destination. It only fires outbound on your schedule; it does not accept an inbound webhook to trigger a sync on demand.

Why a generic webhook, not just Slack or Teams

Slack and Teams destinations in QueryFlow are first-class: connect a workspace once and alerts render as formatted cards. A webhook is the escape hatch for everywhere else, an internal alerting service, a PagerDuty-compatible endpoint, a serverless function that fans a result out to three other systems, or a tool that doesn't have a QueryFlow-native integration yet. If Slack or Teams covers your case, use those; reach for webhook when the destination is something you built or something neither of those covers.

Before you start

You need a working connection, a query you want to check repeatedly, and a webhook URL that accepts an HTTP POST. Watch This is a Pipelines-tier feature; Studio doesn't include it.

A worked example

Say you want to know within 15 minutes if new orders stop coming in, a common early signal that a checkout flow or an upstream sync broke. On a Postgres connection:

SELECT count(*) AS recent_orders
FROM public.orders
WHERE created_at >= now() - interval '15 minutes';

Run it once in the SQL Editor to confirm it returns what you expect, then set up the watch.

Set it up

  1. Run the query in the SQL Editor, or get it from an Ask answer.
  2. Click Watch this on the results header.
  3. Give it a Name (for example, "Orders stalled check"), and confirm the Connection and SQL are right.
  4. Choose what to watch: A value, then pick the Column (recent_orders).
  5. Choose a Condition: Equals, set to 0, since zero recent orders is the failure state.
  6. Set Check every to 15m.
  7. Under Destinations, tick Webhook and paste your endpoint URL.
  8. Click Run preview to confirm it evaluates correctly against current data, then Save.

Check it worked

Use Send test message (or Check now from the Watches list, right-click menu) to fire the watch manually and confirm your endpoint receives a request. QueryFlow posts the check's result as JSON to the URL you provided; the exact fields your endpoint needs to parse are worth confirming with a test fire before you rely on it, the same way you'd test any webhook integration.

What it doesn't do

This is outbound only. QueryFlow doesn't expose an inbound webhook that triggers a sync or a query run on demand from an external event, everything runs on the interval you set, from 5 minutes to once a day. If you need "run this the instant an external system posts to me," that's a different pattern than Watch This provides, and you'd need something upstream of QueryFlow to poll or relay that event.

Webhook vs. the built-in destinations

Same watch logic, different landing spot. Pick based on where the alert actually needs to go and whether formatting matters.

DestinationSetupFormattingBest for
SlackConnect workspace onceFormatted cardTeam-visible alerts
Microsoft TeamsConnect a channelFormatted cardTeam-visible alerts
EmailNo setupPlain textA single recipient
WebhookPaste any URLRaw JSONYour own systems, internal tools
macOS notificationNo setupSystem bannerSolo, on your Mac only

Troubleshooting

If you seeFix
Test fire sends but your endpoint shows nothingConfirm the URL is publicly reachable and accepts POST; a localhost URL won't work from QueryFlow's background helper.
Watch never firesRe-check the condition and threshold; run the query manually and compare against what you set.
Watch fires every check, not just on changeUse Changed or Increased by / Decreased by instead of a static Equals if you only want deltas.

Versus a cron job and a curl script

The DIY version of this is a small script: a cron entry that runs a query against your warehouse, checks the result in code, and calls curl against your webhook URL if a condition is met. It works, and plenty of teams run exactly that. What Watch This replaces is everything around the query itself: the background helper keeps checking on Snowflake, Redshift, BigQuery, and Databricks connections even with QueryFlow closed, the check history lives in the Watches list instead of a log file you have to go find, and changing the interval or condition is a form field instead of an edit-and-redeploy cycle. If you already have a script like this working and don't mind maintaining it, there's no urgent reason to switch. If you're about to write one, this replaces the maintenance burden with a UI.

Watching more than one signal at once

A single watch checks one query against one condition. For "alert me if any of these five tables goes quiet," you set up five watches, not one query with five conditions bundled in. That's more setup up front than a single clever query would be, but each watch fails independently and shows its own history, which makes it obvious which specific table stalled rather than one alert that could mean five different things. For a small number of signals, the handful most teams actually want paged on, the one-watch-per-signal model stays easy to reason about.

See the full Watch This tutorial for every option in the sheet, or why we built Watch This for the reasoning behind it.

QueryFlow Studio $9.99/mo · $99/yr
QueryFlow Pipelines $29.99/mo · $199.99/yr

Frequently asked

Is the webhook destination available on Studio?

No. Watch This, and every destination under it including webhook, is a Pipelines-tier feature.

What does the webhook payload look like?

QueryFlow posts the check's result as JSON to the URL you provide. Fire a test message first and inspect what your endpoint receives before wiring up downstream parsing.

Can an external event trigger a QueryFlow sync through this webhook?

No. The webhook destination is outbound only, on the schedule you set. QueryFlow doesn't accept inbound webhooks to trigger a run on demand.

What's the shortest check interval?

5 minutes. Longer options are 15m, 30m, 1h, 4h, and 1d.

Does this work with BigQuery and Databricks connections?

Yes. Watch This runs against any connection type, including BigQuery and Databricks, through the same background helper that runs scheduled jobs.

Stop polling by hand.

14-day free trial, no card. Watch a query, get pinged wherever you actually work.

Start 14-day free trial

No credit card. 14 days. Cancel in one click.