Skip to content

The moment it happens

Save every Stripe invoice PDF to Drive

Each paid Stripe invoice is saved as a PDF in your Drive receipts folder, named by date and customer.

Runs
The moment it happens
Apps
Google Drive, Stripe
AI
Not needed
Access
Stripe read; Drive file

Send this to your assistant

Create a ClickRuntime automation: when a Stripe invoice is paid, download its PDF and save it to my Receipts folder in Drive, named with the date, customer and invoice number.

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 consultancy bills clients through Stripe invoices. At year end, their accountant asks for a copy of every invoice, and someone spends a day downloading PDFs from the Stripe dashboard one at a time and renaming them so they can be found.

Saving each invoice PDF to Drive as soon as it is paid builds that archive as you go. The accountant gets a shared folder that is always complete, and anyone looking for a past invoice can search Drive by client name.

What you get out of it

  • An archive that is always complete

    Every paid invoice lands in the folder without anyone remembering to download it. Nothing is missing when the accountant asks.

  • Files you can find by name

    Each PDF is named with the date, the customer and the invoice number. Searching Drive for a client brings up all their invoices.

  • Easy to share with your accountant

    Share the folder once and the accountant sees new invoices as they arrive. No more zip files at the end of the year.

  • A copy outside Stripe

    Keeping your own copies means records survive a change of payment provider or a closed account. Many tax rules expect you to keep them for years.

How it works

What happens, step by step

  1. When an invoice is paid in Stripe, Stripe notifies ClickRuntime straight away.

  2. ClickRuntime checks the notification came from Stripe and reads the invoice details.

  3. It downloads the invoice PDF that Stripe created.

  4. The PDF is saved in your Drive receipts folder, named with the date, customer name and invoice number.

Before it runs live

  • Connect Google Drive
  • Connect Stripe
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Save every Stripe invoice PDF to Drivejust nowSucceeded
Google Drive · Receipts2026-10-14 Northwind Traders INV-0142.pdf

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

  • Act only on the items that match your own rules, and skip the rest
  • 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 Drive 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.
save_a_pdf_receipt_for_each_stripe_payment_to_drive.pyexample
import io
from datetime import date
from googleapiclient.http import MediaIoBaseUpload
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, verify, http

FOLDER_ID = "your-receipts-folder-id"

@on_event
def handle(event):
    if not verify.stripe(event.body, event.header("Stripe-Signature"), credentials.secret("STRIPE_WEBHOOK_SECRET")):
        return {"ignored": "bad signature"}
    if event.json["type"] != "invoice.paid":
        return {"ignored": event.json["type"]}
    inv = event.json["data"]["object"]
    pdf = http.get(inv["invoice_pdf"])
    pdf.raise_for_status()
    paid = date.fromtimestamp(inv["status_transitions"]["paid_at"])
    name = f"{paid} {inv.get('customer_name') or inv['customer_email']} {inv['number']}.pdf"
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    f = drive.files().create(body={"name": name, "parents": [FOLDER_ID]},
                             media_body=MediaIoBaseUpload(io.BytesIO(pdf.content), mimetype="application/pdf"),
                             fields="id").execute()
    return {"saved": name, "file": f["id"]}

FAQ

Common questions

Is this the same PDF the customer receives?
Yes. It is the invoice PDF that Stripe generates, with your branding and details as set in your Stripe settings.
Does it save receipts for one-off checkout payments?
It saves invoices. If your checkout creates invoices, those are saved too. Payments without an invoice have no Stripe PDF to save.
Can it sort files into a folder per month?
Yes. Ask for monthly subfolders and each PDF is placed in a folder named after the month it was paid, created when needed.
What permissions does it need?
Stripe read; Drive file. 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 for each event the app sends.
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 “Save every Stripe invoice PDF to Drive” from your assistant

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