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
- Runs on the 1st day of every month at 07:00 (or when executed manually).
- Calculates the previous month’s start and end timestamps and builds a monthly filename.
- Calls the Stripe Invoices API to fetch all paid invoices created within that date range, automatically paginating through all results.
- 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.
- Generates a CSV file named like
stripe_YYYY-MM.csv with a header row.
- Sends an email through Gmail with the CSV attached.
Setup
- Add a Stripe API bearer token (HTTP Bearer Auth) and ensure it has permission to read invoices.
- Configure Gmail OAuth2 credentials and set the recipient email address, subject, and message in the email step.
- Review and adjust the Stripe query filters (status and date range) and the CSV columns/formatting to match your reporting needs.