Stripe Daily Revenue Digest
Each morning the flow pulls the prior day's Stripe activity — gross, net, new customers, refunds, top products, MRR change — stores a snapshot in Dataverse, and posts a revenue digest to a leadership Teams channel with trend vs. prior periods. Gives leaders a daily revenue pulse from Stripe.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow gives company leadership a daily revenue pulse from Stripe. Every morning it pulls the prior day's Stripe activity — gross, net, fees, refunds, successful charge count and net-new customers — stores a snapshot in Dataverse, and posts a formatted revenue digest (with a gross-revenue trend vs. the previous snapshot) to a leadership Microsoft Teams channel.
Why it matters: Leaders want a quick revenue read without opening the Stripe dashboard. A daily digest with trend keeps Finance and Executives aligned and creates a governed Dataverse history of revenue for later reporting.
Build status: Built via the API-first method as a Dataverse workflow record. Ships Off (Draft) — going live requires only authorizing the connections, setting a real Stripe key, and filling the Teams team/channel IDs. Flow Checker: 0 errors / 0 warnings.
Use Case
Leadership wants an automated morning revenue summary delivered to Teams, plus a durable Dataverse record of each day's numbers for trend analysis and Power BI.
Flow Architecture
Daily Morning Trigger
Recurrence (daily 07:00 UTC)Sets the digest cadence — runs every morning.
Init varCorrelationId
Initialize Variable (guid)Trace ID stamped on the snapshot and the digest.
Init varStripeBase
Initialize VariableStripe REST base URL from the env var.
Init varCurrency
Initialize VariableReporting currency code.
Init varStartUnix
Initialize VariableUnix epoch for start of yesterday.
Init varEndUnix
Initialize VariableUnix epoch for start of today.
Init accumulators (Gross/Refund/Fee/Net/ChargeCount cents)
Initialize VariableAccumulators for amounts in cents.
HTTP Get Balance Transactions
HTTP — GET /v1/balance_transactionsGET /v1/balance_transactions?created[gte]=…&created[lt]=…&limit=100 for the day's transactions.
HTTP Get New Customers
HTTP — GET /v1/customersGET /v1/customers?created[gte]=…&created[lt]=…&limit=100 to count net-new customers.
Aggregate Transactions
Apply to each (sequential)Tally net + fees for all transactions; add charge gross + count; add refund totals. Concurrency 1 keeps increments deterministic.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_StripeApiKey | String | sk_live_REPLACE… | Stripe secret API key (Bearer auth for REST calls) — replace with the real restricted key before go-live. |
| flowlibs_StripeApiBaseUrl | String | https://api.stripe.com/v1 | Stripe REST API base URL. |
| flowlibs_Currency | String | usd | ISO currency code (lowercase for Stripe; uppercased for display). |
| flowlibs_RevenueSnapshotTable | String | flowlibs_revsnaps | Dataverse entity-set name for the snapshot table. |
| flowlibs_LeadershipTeamId | String | <your-team-id> | Teams group (team) ID for the leadership channel. |
| flowlibs_LeadershipChannelId | String | <your-channel-id> | Teams channel ID that receives the digest. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| HTTP | http | GET /v1/balance_transactions GET /v1/customers |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords CreateRecord |
| Microsoft Teams | shared_teams | PostMessageToConversation |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Comparison windows
- Add WoW/MoM by querying additional prior snapshots in List Prior Snapshot and computing deltas in Compose Metrics.
- Goal pacing
- Add a monthly target env var and show progress vs. target in the digest.
- Top products / MRR
- Extend with GET /v1/charges (expand line items) or Stripe subscription/invoice endpoints to add top products and MRR change.
- Power BI
- Point a Power BI dataset at the flowlibs_revsnap table for an executive dashboard.
- Currency
- Set flowlibs_Currency and add currency to the Stripe filters for multi-currency tenants.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Start of yesterday (Unix sec)
Inclusive lower bound for the Stripe created filter.
EXPR.02Start of today (Unix sec)
Exclusive upper bound for the Stripe created filter.
EXPR.03Stripe Bearer header
Authorization header for the Stripe REST calls.
EXPR.04Cents → currency
Convert the smallest currency unit to major units for display/storage.
EXPR.05New-customer count
Net-new customers in the window.
EXPR.06Gross trend vs prior
Difference vs. the previous snapshot.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.