Daily Stripe revenue digest in Excel and Slack
Every weekday morning, append yesterday's Stripe totals to your Excel finance log and post the same numbers to your finance Slack channel.
Build me a deterministic daily revenue ledger as a code workflow. There is no reasoning step. The flow is: list yesterday's Stripe charges, aggregate them, append one row to my Excel finance table, and post a short Slack summary.
Trigger: cron, every weekday at 08:00 America/New_York.
Step 1. Stripe "List Charges". Filter on created between 00:00:00 and 23:59:59 of yesterday in the Stripe account's timezone (convert to Unix epoch seconds for the created[gte] and created[lte] parameters). Set limit=100 and follow Stripe's cursor pagination (use the last item's id as starting_after, repeat while has_more is true) so a day with hundreds of charges still rolls up correctly. Collect every charge before aggregating.
Step 2. Aggregate the collected charges into: date (yesterday in ISO 8601), succeeded_count (status === "succeeded"), failed_count (status === "failed"), gross (sum of amount across succeeded charges, converted from minor units to major units, e.g. cents to dollars), refunded (sum of amount_refunded across all charges, same conversion), net (gross minus refunded), and top_3_customers (group succeeded charges by customer id, sum the amounts, take the top three, include customer id, billing email if available, and total).
Step 3. Microsoft Excel "Add Table Row". Append exactly one row to a table named "Daily Revenue" in my finance workbook in OneDrive for Business. Columns in order: Date, Gross, Net, Succeeded count, Failed count, Refunded amount. Make the workbook ID and table name configurable.
Step 4. Slack "Send a Message". Post to #finance using Slack mrkdwn. Include yesterday's date, gross, net, refunded, succeeded count, failed count, and the top 3 customers as a short list. Use the currency code from the Stripe charges (assume one currency for the day; if mixed, surface the count by currency).
Edge cases: if there are zero charges yesterday, still append a row of zeros to the Excel table and still post a Slack message saying there were no successful charges. Always run after the day has fully closed in the account timezone. Use idempotent date keying so a re-run for the same date does not double-write (skip if a row for that date already exists in the table).
Configurable inputs: trigger time and timezone, Excel workbook ID and table name, Slack channel, currency, and whether to include the top customers section in the Slack message.
Additional information
What does this prompt do?
- Each weekday at 8am, tallies yesterday's Stripe payments and appends one summary row to your Excel finance log
- Posts the same numbers to your Slack finance channel: gross, net, refunds, successful charges, failed charges, and the top customers
- Handles busy days correctly by pulling every charge before it adds the row, so totals always match Stripe
- Runs deterministically on a fixed schedule, so finance stops exporting CSVs and reconciling by hand
What do I need to use this?
- A Stripe account and an API key for the workspace that holds your revenue
- A Microsoft Excel workbook with a table for daily revenue (we use a table called Daily Revenue by default), stored in OneDrive for Business or SharePoint
- A Slack workspace and a channel like #finance where the digest can post
How can I customize it?
- Change the time of day or timezone (default is 8am Eastern, weekdays only)
- Pick a different Excel workbook, table name, or column layout
- Swap the Slack channel, or hide the top customers section for a leaner message
Frequently asked questions
Will this work on days with hundreds of Stripe charges?
What happens on a day with zero payments?
Can I send the digest to a different Slack channel?
Does it include refunds and failed charges?
Can I see who paid us yesterday?
Stop exporting Stripe by hand every morning.
Connect Stripe, Excel, and Slack once, and Geni runs this digest every weekday before standup.