# Send a Weekly Stripe Revenue Digest to Slack

Yes. An agent totals your last seven days in Stripe, writes the full digest as a file, and sends a five-line version to you in Slack.

[Run this on Rush](https://cloud.getrush.ai/run/weekly-revenue-digest/stripe/).

## What the agent does

This run needs no repository. It uses two connections: your Stripe sign-in and your Slack sign-in, both named in the request. Through the Stripe connection the agent reads the account with the Stripe MCP server, which looks up customers, charges, subscriptions and balances; the prompt says to read only, so it creates nothing and changes nothing in Stripe. Through the Slack connection the agent reaches Slack as the `slack` CLI signed in as you, so the digest arrives as a message from you to yourself.

The agent sets the two windows the digest compares: the last seven days ending now, and the seven days before that. For each window it totals gross volume from charges, refunds, new subscriptions, cancellations, and the net change in monthly recurring revenue, reading the Stripe objects rather than a cached dashboard. It records the figure for each window and the difference between them, so every line in the digest is a this-week number next to a last-week number.

It writes the full result to `digest.md`: the five totals, each with its prior-week comparison, and a short note under any line that moved sharply, naming the customers or subscriptions behind the change so the number can be traced. This file is the record, kept as an artifact on the session.

Then it sends a five-line version to you in Slack: one line each for gross volume, refunds, net new subscriptions, cancellations, and net MRR change, each with the week-over-week delta. The short message is what you read on Monday; the full `digest.md` is there when a line makes you want the detail. The agent posts the message and stops; it does not wait for a reply.

## Start it with one API call

`POST https://api.prix.dev/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Use the Stripe connection to total the last 7 days and compare each figure with the 7 days before: gross volume, refunds, new subscriptions, cancellations, and net MRR change. Write digest.md with those numbers and a short note under any line that moved sharply. Then send a five-line version of it to me in Slack, one line per figure with its week-over-week change. Read only in Stripe; create and change nothing.",
  "connections": [
    "stripe",
    "slack"
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.prix.dev/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

Two things come back. The first is the Slack message: five lines in your own direct messages, gross volume, refunds, net new subscriptions, cancellations and net MRR change, each with the change against the week before. It is short on purpose, the thing you read without opening Stripe.

The second is `digest.md` as an artifact on the session, which the session read returns with a download link good for an hour. It carries the same five figures with their prior-week comparisons plus the notes under the lines that moved, naming the customers or subscriptions behind each swing. The session transcript keeps every Stripe read the agent made, so any figure in the digest can be traced to the objects it was totalled from.

Because the prompt says to read only, a reviewer can trust that nothing in Stripe changed: no charge, refund or subscription was created or edited. If a number looks off, the transcript shows exactly which charges and subscriptions went into it, and a follow-up message to the same session can ask the agent to break any line down further.

## Run it on every Monday morning

This is a scheduled job. An automation with a schedule trigger set to Monday morning starts one run a week with this request, so the digest lands before the week starts without anyone asking for it. The Stripe and Slack connections are named once in the automation and reused on every run.

The schedule is the natural fit here, but the same request also runs on demand or from a webhook if you want a digest after a launch or a pricing change. Each run reads Stripe fresh for its own seven-day window, so the numbers always reflect the account as it is that morning.

## Why run it on Rush?

A weekly revenue summary pulled by hand means opening Stripe, setting two date ranges, and copying five numbers into a message, every Monday. Run on Rush, the agent does the reading and the arithmetic in its own sandbox and sends the message itself, with your Stripe and Slack sign-ins used only for this run and never exposed to the sandbox.

The value is a number you can trust and trace. Because every Stripe read is in the session transcript and the full `digest.md` sits behind the short Slack message, a figure that surprises you can be checked against the charges and subscriptions it came from rather than taken on faith. The read-only instruction means the digest never risks touching live billing data.

## Frequently asked questions

### Can it change anything in my Stripe account?

No. The prompt says to read only, so the agent looks up customers, charges, subscriptions and balances but creates and edits nothing. The session transcript shows every Stripe call it made, so you can confirm they were all reads.

### How does it reach Slack and Stripe?

Through connections you set once. The request names your Stripe and Slack sign-ins; Slack reaches the agent as the slack CLI signed in as you, so the digest arrives as a message from you, and Stripe is read through its connected MCP server. Neither credential is exposed to the sandbox.

### Where does the Slack message go?

To you, in your own direct messages, because the Slack connection is signed in as you. The five-line version is the message; the full digest.md stays on the session as an artifact you can open when you want the detail behind a line.

### Can I get the full numbers, not just five lines?

Yes. digest.md on the session carries all five figures with their week-over-week comparisons and a note under any line that moved sharply. The five-line Slack message is the summary; the file is the record, with a download link from the session read.
