Skip to content

Monthly

Get last month's tax collected by country

On the 1st you get the tax collected last month, grouped by country and tax rate.

Runs
Monthly
Apps
Stripe
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: on the 1st of each month, email me last month's tax collected on paid Stripe invoices, grouped by country and tax rate.

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 shop selling to customers in the EU, UK and several US states faces a different tax rate in each place. At filing time, the finance person exports invoices from Stripe, builds a pivot table and tries to split tax collected by country and rate. One miscategorized invoice means the return is wrong, and fixing a filing after submission is slow and costs penalties.

On the 1st, ClickRuntime lists last month's paid invoices, sums the total_tax_amounts field grouped by rate and country and emails you a clean table of taxable sales and tax collected. You can hand it straight to your accountant or use it to prepare VAT and sales tax returns.

It is built for sellers who collect tax through Stripe Tax or manual tax rates and need a monthly figure.

What you get out of it

  • Tax returns start from correct numbers

    A table by country and rate means you are not rebuilding the figures from a raw export. Starting from the right total reduces errors that lead to amended returns. The monthly rhythm also keeps small errors from piling up across a whole quarter.

  • You set aside the right amount of cash

    Tax collected is not revenue. Seeing the exact liability each month tells you how much to hold back, so a surprise payment due never raids your operating cash. That planning prevents a painful scramble when a filing deadline arrives with too little cash set aside.

  • Different jurisdictions stay separate

    Splitting by country and rate keeps French VAT apart from German VAT and Texas sales tax apart from California. Each authority gets filed with its own accurate total. The split is also easier to review against Stripe Tax reports if you want a second check.

  • Accountants spend less time on preparation

    A prepared monthly table reduces the hours an accountant needs to compile figures, which usually shows up as a smaller bill and fewer questions. The ready-made table gives them a clean starting point for filings.

  • Rate mistakes show up quickly

    If a country suddenly shows an unexpected rate or zero tax, you see it within a month. Fixing a Stripe Tax setup in April beats discovering it during a December review.

How it works

What happens, step by step

  1. On the 1st of each month, ClickRuntime collects last month's paid Stripe invoices.

  2. It adds up the tax on them by country and tax rate.

  3. You get an email with one line per country and rate, like "DE VAT 19.0% 1,842.10 EUR".

Before it runs live

  • Connect Stripe

What you get

RunsMonthly
Get last month's tax collected by countrytoday, 9:00Succeeded
Email · Tax collected in September 2026DE VAT 19.0% 1,842.10 EUR GB VAT 20.0% 960.00 GBP

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 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.pyexample
from collections import defaultdict
from datetime import datetime, timezone
import stripe
from clickruntime import on_trigger, credentials, notify

@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(year=end.year - 1, month=12) if end.month == 1 else end.replace(month=end.month - 1)
    rates, totals = {}, defaultdict(int)
    invoices = stripe.Invoice.list(status="paid", created={"gte": int(start.timestamp()), "lt": int(end.timestamp())}, limit=100)
    for inv in invoices.auto_paging_iter():
        for tax in inv.total_tax_amounts or []:
            rate_id = tax.tax_rate if isinstance(tax.tax_rate, str) else tax.tax_rate.id
            if rate_id not in rates:
                rates[rate_id] = stripe.TaxRate.retrieve(rate_id)
            r = rates[rate_id]
            totals[(r.country or "—", f"{r.display_name} {r.percentage}%", inv.currency.upper())] += tax.amount
    lines = [f"{country}  {rate}  {amount / 100:,.2f} {cur}" for (country, rate, cur), amount in sorted(totals.items())]
    notify.email_me(f"Tax collected in {start:%B %Y}", "\n".join(lines) or "No tax collected.")
    return {"lines": len(lines)}

FAQ

Common questions

Does it work with Stripe Tax and manual tax rates?
Yes. Both write tax amounts onto invoices in the total_tax_amounts field with a rate or jurisdiction reference. The summary groups by whatever appears there, so it covers automatic tax and rates you created yourself.
Is the summary a valid tax filing?
No. It is a working summary of what Stripe recorded. Filing rules differ by country, so review the figures with an accountant. Items such as reverse charge or exempt sales may need separate treatment. Always review the figures before you file.
Are credit notes and refunds subtracted?
The base report covers paid invoices. Credit notes reduce tax owed, so if you issue them, ask your assistant to include credit notes in the same period and show them as a deduction line per rate.
What permissions does it need?
read. 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 (monthly). 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 “Get last month's tax collected by country” from your assistant

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