FINANCE

On-request cohort margin quick-brief triggered by webhook

An inbound webhook with a cohort and date range triggers a focused BigQuery margin pull and emails back a one-paragraph erosion brief.

CategoryFinance
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerInbound webhook with cohort and date rangeHTTP webhook
  • LogicValidate payload and resolve comparison period
  • ActionRun scoped two-period margin query in BigQueryGoogle BigQueryBigQuery
  • ActionWrite one-paragraph erosion brief with OpenAIOpenAI
  • OutputEmail brief back to the requesterOutlook

What it does

When another system or a quick form posts a webhook naming a cohort and date range, this workflow runs a scoped BigQuery margin query, compares it to the prior comparable period, and has an LLM write a one-paragraph brief explaining the change and its main driver. The brief is emailed straight to the requester.

When to use it

Use it to put margin reads on tap: wire it to a Slack slash command backend, an internal tool button, or a form so non-analysts can ask for a specific cohort's margin story without pinging the data team or waiting for the monthly cycle.

How it works

  1. 1An inbound webhook delivers the cohort, date range, and requester email.
  2. 2A logic step validates the payload and resolves the comparison period.
  3. 3BigQuery runs the scoped margin query for both periods.
  4. 4OpenAI writes the one-paragraph erosion brief with the leading driver.
  5. 5Outlook emails the brief back to the requester.

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 OpenAIModels, embeddings, files.
  4. 4
    Connect OutlookMail, calendar, contacts.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    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.