Skip to content

On a schedule

Monthly Stripe tax summary by country in a sheet

On the 1st of each month, last month's paid Stripe invoices are totalled by country and tax rate in a new tab, and you're told in Slack.

Runs
On a schedule
Apps
Google Sheets, Stripe
AI
Not needed
Access
Stripe read invoices; sheet editor

Send this to your assistant

Create a ClickRuntime automation: on the 1st of each month, total last month's paid Stripe invoices by country and tax rate into a new tab in my tax sheet and Slack me in #finance.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A company selling subscriptions across Europe charges different VAT rates in each country and has to report the totals every quarter. Each month someone exports Stripe invoices to CSV, filters by country, adds up tax by rate and pastes the results into the tax workbook. It is slow and easy to get wrong, and the error only shows when the return does not reconcile.

This automation does the month-end sum on the 1st. It reads every invoice paid in the previous month, groups the taxable amount and tax by customer country and rate, and writes the result into a new tab named after the month. Finance gets a Slack message when it is ready, and the quarterly return becomes a matter of adding up three tabs.

What you get out of it

  • Month-end done for you

    The tax summary is in the sheet on the 1st without anyone exporting or filtering.

  • Grouped the way returns need it

    Totals are split by country and tax rate, with taxable amount and tax shown separately.

  • One tab per month

    Each month gets its own tab, so earlier figures are never overwritten.

  • Fewer arithmetic mistakes

    Totals are calculated from every invoice line, not copied by hand.

  • Finance knows when it's ready

    A short Slack message says the tab is there and gives the overall tax total.

How it works

What happens, step by step

  1. On the 1st of each month, ClickRuntime collects all Stripe invoices paid in the previous month.

  2. It groups the taxable amounts and tax by customer country, tax rate and currency.

  3. The totals are written to a new tab in your tax sheet, named after the month.

  4. A short message with the overall tax total is posted to #finance.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Stripe

What you get

RunsOn a schedule
Monthly Stripe tax summary by country in a sheettoday, 9:00Succeeded
Slack · #financeTax summary for 2026-09 is in the sheet: 14 country and rate lines.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Sheets and Stripe steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
monthly_tax_summary_from_stripe_invoices.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timezone
from collections import defaultdict
import stripe
from clickruntime import on_trigger, credentials, notify

SHEET_ID = "your-sheet-id"

@on_trigger
def run(event):
    stripe.api_key = credentials.secret("STRIPE_API_KEY")
    end = datetime.now(timezone.utc).replace(day=1, hour=0, minute=0, second=0, microsecond=0)
    start = (end.replace(day=1) - timedelta(days=1)).replace(day=1)
    totals = defaultdict(lambda: [0, 0])
    for inv in stripe.Invoice.list(status="paid", created={"gte": int(start.timestamp()), "lt": int(end.timestamp())}, limit=100).auto_paging_iter():
        country = (inv.customer_address or {}).get("country") or "unknown"
        for t in inv.total_tax_amounts:
            rate = stripe.TaxRate.retrieve(t.tax_rate).percentage
            key = (country, rate, inv.currency.upper())
            totals[key][0] += t.taxable_amount or 0
            totals[key][1] += t.amount
    tab = start.strftime("%Y-%m")
    rows = [["Country", "Rate %", "Currency", "Taxable", "Tax"]] + [[c, r, cur, v[0] / 100, v[1] / 100] for (c, r, cur), v in sorted(totals.items())]
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
    sheets.batchUpdate(spreadsheetId=SHEET_ID, body={"requests": [{"addSheet": {"properties": {"title": tab}}}]}).execute()
    sheets.values().update(spreadsheetId=SHEET_ID, range=f"{tab}!A1", valueInputOption="USER_ENTERED", body={"values": rows}).execute()
    notify.slack(f"Tax summary for {tab} is in the sheet: {len(totals)} country and rate lines.", channel="#finance")
    return {"lines": len(totals)}

FAQ

Common questions

Which invoices are included?
Invoices with the status paid that were paid during the previous calendar month. Drafts, open and voided invoices are left out.
Which country is used?
The customer's billing country as stored on the invoice, which is the address Stripe uses to work out tax.
Does it handle more than one currency?
Yes. Each currency is kept on its own rows, so EUR and GBP amounts are never added together.
What permissions does it need?
Stripe read invoices; sheet editor. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Monthly Stripe tax summary by country in a sheet” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.