DATA OPS

Webhook-Triggered BigQuery Cost Spike Investigator Agent

When a cost-monitor webhook fires, an agent investigates the BigQuery spend spike — pinpointing the owner, project, and queries responsible.

CategoryData Ops
Enginepaperclip
Difficultyadvanced
Triggerwebhook
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerCost-spike webhook receivedHTTP webhook
  • ActionQuery BigQuery job history for the spike windowGoogle BigQueryBigQuery
  • LogicAttribute spike to owner/project/query, classify new vs recurring
  • ActionRun follow-up BigQuery queries to disambiguate if neededGoogle BigQueryBigQuery
  • OutputPost root-cause writeup to Microsoft TeamsMicrosoft Teams

What it does

It responds to a spend-anomaly webhook (from a budget alert or monitoring tool) by running an agentic investigation. The agent queries `INFORMATION_SCHEMA.JOBS` across the spike window, isolates which owner, project, and specific queries account for the jump, checks whether it's a new pattern or a scaled-up recurring job, and writes a root-cause summary with a recommended action.

When to use it

Use it when you already have spike detection but want the on-call to receive a diagnosis instead of just an alert. The agent does the first 20 minutes of triage automatically, so responders open the Teams message already knowing who and what to look at.

How it works

  1. 1An incoming webhook carries the spike window and magnitude.
  2. 2The agent queries BigQuery job history for that window, grouping spend by owner, project, and query.
  3. 3It reasons over the results to attribute the spike and classify it as new versus a scaled recurring job.
  4. 4If attribution is ambiguous, it runs follow-up BigQuery queries to narrow it down.
  5. 5It posts a diagnosed root-cause writeup with recommended next steps to a Microsoft Teams channel.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect BigQueryDatasets, queries, schemas.
  3. 3
    Connect Microsoft TeamsChannels, chats, files.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.