Daily Stripe revenue in Slack
Every morning, see yesterday's revenue and number of payments in Slack.
How it works
Trigger: Schedule — every day at 8:00
- Get the latest charges from Stripe.
- Keep successful charges from the last 24 hours and add them up.
- Post the total and count to #revenue in Slack.
Diagram
Trigger App Code
Code
JavaScript used in the Code step — already included in the template below.
// Adds up successful charges from the last 24 hours.
const DAY = 24 * 60 * 60;
const since = Math.floor(Date.now() / 1000) - DAY;
const charges = $input.all()
.map((item) => item.json)
.filter((c) => c.status === "succeeded" && c.paid && c.created >= since);
const byCurrency = {};
for (const c of charges) {
const cur = c.currency.toUpperCase();
byCurrency[cur] = (byCurrency[cur] || 0) + c.amount / 100;
}
const totals = Object.entries(byCurrency)
.map(([cur, sum]) => `${sum.toFixed(2)} ${cur}`)
.join(" + ") || "0";
return [{ json: { text: `💰 Last 24h: ${totals} from ${charges.length} payment(s)` } }];Build it
Pick your tool — same automation, step by step.
Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder.
Show code (130 lines)
{
"name": "Daily Stripe revenue in Slack (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## Daily Stripe revenue in Slack\nEvery morning, see yesterday's revenue and number of payments in Slack.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "458223d5-1673-42cd-a93b-ba83e3101aa1",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
]
}
},
"id": "458223d5-1673-42cd-a93b-ba83e3101aa1",
"name": "Every day 8:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"resource": "charge",
"operation": "getAll",
"limit": 100
},
"id": "458223d5-1673-42cd-a93b-ba83e3101aa1",
"name": "Get recent charges",
"type": "n8n-nodes-base.stripe",
"typeVersion": 1,
"position": [
300,
0
]
},
{
"parameters": {
"jsCode": "// Adds up successful charges from the last 24 hours.\nconst DAY = 24 * 60 * 60;\nconst since = Math.floor(Date.now() / 1000) - DAY;\n\nconst charges = $input.all()\n .map((item) => item.json)\n .filter((c) => c.status === \"succeeded\" && c.paid && c.created >= since);\n\nconst byCurrency = {};\nfor (const c of charges) {\n const cur = c.currency.toUpperCase();\n byCurrency[cur] = (byCurrency[cur] || 0) + c.amount / 100;\n}\n\nconst totals = Object.entries(byCurrency)\n .map(([cur, sum]) => `${sum.toFixed(2)} ${cur}`)\n .join(\" + \") || \"0\";\n\nreturn [{ json: { text: `💰 Last 24h: ${totals} from ${charges.length} payment(s)` } }];"
},
"id": "458223d5-1673-42cd-a93b-ba83e3101aa1",
"name": "Add up revenue",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
0
]
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "#revenue",
"mode": "name"
},
"text": "={{ $json.text }}",
"otherOptions": {}
},
"id": "458223d5-1673-42cd-a93b-ba83e3101aa1",
"name": "Post to #revenue",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
900,
0
]
}
],
"connections": {
"Every day 8:00": {
"main": [
[
{
"node": "Get recent charges",
"type": "main",
"index": 0
}
]
]
},
"Get recent charges": {
"main": [
[
{
"node": "Add up revenue",
"type": "main",
"index": 0
}
]
]
},
"Add up revenue": {
"main": [
[
{
"node": "Post to #revenue",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}In Make, create a new scenario and add these modules in order:
- Schedule the scenario: Every day 8:00
- Stripe › List Charges
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Slack › Create a Message
- Every module run uses Make operations — the free plan includes a monthly quota.
- Make's built-in functions (map, sum, formatDate…) can replace most Code steps; for complex logic use a code module.
- Module and step names can differ slightly as Make and Zapier update their apps.
In Zapier, create a new Zap and add these steps in order:
- Schedule by Zapier — Every day 8:00
- Code by Zapier — list charges via the Stripe API
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Slack — Send Channel Message
- Zaps with more than two steps need a paid Zapier plan.
- Webhooks, Filters/Paths and Code by Zapier are premium features on some Zapier plans.
- Code by Zapier runs JavaScript: reuse the code shown above, reading inputs from inputData instead of $json.
- Module and step names can differ slightly as Make and Zapier update their apps.
Tips
- Refunds aren't subtracted — add them to the Code step if you need net revenue.
Related flows
Finance & AdminEasy
Instant alert when a Stripe payment fails
Know about failed payments right away and log them for follow-up.
Stripe → Slack → Google Sheets2h/mo
Finance & AdminEasy
Paid invoices into your bookkeeping sheet
Every paid Stripe invoice is recorded automatically, ready for your accountant.
Stripe → Google Sheets5h/mo
Finance & AdminMedium
Monthly revenue report by email
On the 1st of each month, get last month's Stripe revenue compared with the month before.
Stripe → Gmail2h/mo