Appbricx
Features

Build

  • Coding agents and MCP
  • UI components and hooks
  • Templates
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

  • Row-level security
  • Sign-in and auth
  • Organisations and teams
  • Payments

Logic

  • Workflows and jobs
  • Server functions and webhooks
  • AI in your app
  • Integrations

Ship and own

  • Backups and rollback
  • Hosting and domains
  • Self-host and export
All features
ShowcaseTemplatesIntegrationsPricingDocs
Log inStart free
  • Features
  • Showcase
  • Templates
  • Integrations
  • Pricing
  • Docs
  • Log in

Build

  • Coding agents and MCP
  • UI components and hooks
  • Templates
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

  • Row-level security
  • Sign-in and auth
  • Organisations and teams
  • Payments

Logic

  • Workflows and jobs
  • Server functions and webhooks
  • AI in your app
  • Integrations

Ship and own

  • Backups and rollback
  • Hosting and domains
  • Self-host and export
  1. Home
  2. Templates
  3. Workflows
  4. Weekly KPI email

Weekly KPI email

A scheduled workflow that looks at the last 14 days of one table and compares the last 7 with the 7 before: how many rows came in, the total and average of a number field (revenue, hours, amounts) and a breakdown by a choice field such as status. It goes to everyone with the role you choose as an in-app notification and an email, on the day, time and time zone you set, with a link back to the app.

Use in AppbricxFree. Already have an account? Log in
View the files
Weekly KPI email: its trigger and steps

What it adds to your app

A weekly schedule over one table. An in-app notification and an email to a role, with week-over-week changes.

How its workflows run

Each one is a server workflow in your project: it runs on its trigger, with retries, and its runs show in the builder's log.

  1. Weekly ‹entity› KPIs by email

    On a schedule: schedule weekly ‹day› ‹time› over ‹entity›. Then: Run code, then Notify ‹role›, then Send email.

Set it up

It merges into the contract of an app you already have. Nothing is overwritten: a name you already use is refused until you pass a prefix.

  1. Pick the project

    Use the button above, or ask your coding agent with the Appbricx MCP server connected (quickstart).

  2. Point it at your tables and roles

    Leave out the ones with defaults; a wrong one is refused with the options your app has.

    ParamWhat it isExample
    entityThe table whose rows the report counts.order
    value_fieldOptional: a number field to total and average, such as an amount. Optional.total
    date_fieldThe date that puts a row in a week. Optional.created_at
    group_fieldOptional: a choice field to count this week's rows by. Optional.status
    roleThe role that receives the report (every user with it). Optional.staff
    dayThe day it goes out: mon, tue, wed, thu, fri, sat or sun. Optional.mon
    timeWhen it goes out, 24-hour HH:MM. Optional.08:30
    tzThe IANA time zone for the day and time (empty means UTC). Optional.Europe/London
    formatnumber or currency. Optional.currency
    currencyISO currency code when the format is currency. Optional.GBP
  3. Preview, then apply to dev

    A dry run shows the diff and the check report; applying it changes your dev environment only.

  4. Deploy

    When dev looks right, deploy. Production gets a snapshot first, so you can roll back.

Use it with your coding agent

The agent reads the template, runs a dry run, shows you the diff and applies it.

Prompt
Add the Weekly KPI email template (slug "weekly-kpi-email") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (entity: table to report on; value_field: number to total (optional); date_field: date field; group_field: break down by (optional); role: who gets it; day: day; time: time of day; tz: time zone; format: number format; currency: currency).
MCP call
{
  "tool": "use_template",
  "arguments": {
    "slug": "weekly-kpi-email",
    "project_id": "<your project id>",
    "params": {
      "entity": "order",
      "value_field": "total",
      "date_field": "created_at",
      "group_field": "status",
      "role": "staff",
      "day": "mon",
      "time": "08:30",
      "tz": "Europe/London",
      "format": "currency",
      "currency": "GBP"
    },
    "dry_run": true
  }
}
CLI
appbricx templates use weekly-kpi-email --param entity=order --param value_field=total --param date_field=created_at --param group_field=status --param role=staff --param day=mon --param time=08:30 --param tz=Europe/London --param format=currency --param currency=GBP --dry-run
Kind
Workflow
Category
Reports and digests
Params
10 (1 required)
Version
1.0.0
Files
workflows/weekly-kpi-email
Published by
Appbricx, free

Goes well with

  • Pulse

    Live operations dashboard: orders, revenue and incidents that update as they happen, with region leads who see only their own region.

    App · Reports and digests
  • Daily digest

    Every morning, sends your team a digest of yesterday's new rows in one table, in-app and by email.

    Workflow · Reports and digests
  • KPI chart cards

    KPI cards and a trend chart for any table: total, average and count over 7, 30 or 90 days, the change on the period before, and a breakdown.

    Component · Reports and digests

Your agent adds it. Appbricx runs it.

Start freeAll templates
Appbricx

The backend, runtime and hosting for apps your coding agent builds. On our cloud, in yours, or on your own servers.

Features

Coding agents and MCPUI components and hooksTemplatesVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authOrganisations and teamsPaymentsWorkflows and jobsServer functions and webhooksAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcaseTemplatesIntegrationsPricingFor coding agentsSelf-hostBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use