See llms.txt for all machine-readable content.

Back to Templates

Send monthly Stripe invoice CSV reports via Gmail

Quick Overview

This workflow runs monthly (or manually) to export all paid Stripe invoices from the previous month, convert them into a structured CSV report, and email the file via Gmail.

How it works

  1. Runs on the 1st day of every month at 07:00 (or when executed manually).
  2. Calculates the previous month’s start and end timestamps and builds a monthly filename.
  3. Calls the Stripe Invoices API to fetch all paid invoices created within that date range, automatically paginating through all results.
  4. Flattens the Stripe API response into individual invoice items and formats invoice, customer, address, VAT/tax, and payment fields while converting amounts from cents to euros.
  5. Generates a CSV file named like stripe_YYYY-MM.csv with a header row.
  6. Sends an email through Gmail with the CSV attached.

Setup

  1. Add a Stripe API bearer token (HTTP Bearer Auth) and ensure it has permission to read invoices.
  2. Configure Gmail OAuth2 credentials and set the recipient email address, subject, and message in the email step.
  3. Review and adjust the Stripe query filters (status and date range) and the CSV columns/formatting to match your reporting needs.