FINANCE

Allocate Cloud Spend to Accounts and Write to BigQuery

Nightly pulls Vercel project-level spend, maps each project to the customer accounts it serves, allocates cost proportionally by usage.

CategoryFinance
Enginesim
Difficultyadvanced
Triggerschedule
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNightly schedule
  • ActionPull project-level Vercel spendVercelVercel
  • ActionQuery per-account usage signalsGoogle BigQueryBigQuery
  • LogicAllocate cost by usage share
  • OutputWrite per-account cost table to BigQueryGoogle BigQueryBigQuery

What it does

Builds the foundational data layer for unit economics: a per-account cost-of-service table. It pulls infra spend at the project level, splits each project's cost across the accounts that consume it using a usage weight, and persists the allocation so any dashboard or report can join revenue to true cost.

When to use it

Use it when you've outgrown a single blended margin number and need cost attributed down to the account or cohort level — for example to find unprofitable accounts or price new tiers. This is the ETL job that powers the other margin workflows.

How it works

  1. 1A nightly schedule trigger starts the run.
  2. 2Pull project-level spend from Vercel for the prior day.
  3. 3Query BigQuery for each account's usage signal (requests, compute seconds) per project.
  4. 4A compute step allocates each project's cost across accounts by usage share.
  5. 5Write the resulting per-account cost-of-service rows back into a BigQuery table, partitioned by date.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect VercelDeploys, runtime logs, analytics.
  2. 2
    Connect BigQueryDatasets, queries, schemas.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    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.