Automated Stripe Payment Receipt Processing and Archiving - n8n Workflow

Automate payment operations using this n8n workflow. Automatically fetch Stripe invoices, send receipts via Gmail, archive PDFs to Google Drive, and log records in Google Sheets.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Subscription services and e-commerce businesses needing reliable receipt delivery.
Finance teams seeking automated, auditable payment tracking.
Users looking for powerful n8n templates integrating Stripe and Google Workspace.
Automation specialists deploying robust, error-tolerant n8n workflow solutions.

Overview

Manually handling payment receipts, verifying payments, and archiving records is time-consuming and prone to human error. This comprehensive n8n workflow eliminates these bottlenecks. By leveraging Stripe’s API alongside Google Workspace services (Gmail, Drive, and Sheets), this automation creates an end-to-end receipt management system.

The core value of this n8n workflow lies in its smart filtering: it only processes invoices marked as 'paid' and prevents duplicate receipts by checking the receipt_sent metadata. This ensures compliance, maintains a perfect audit trail in Google Sheets, and guarantees immediate customer communication via the Gmail n8n node, drastically improving financial operation efficiency.

How it Works

The process is initiated by the manual n8n trigger, which signals the start of the execution. The workflow immediately uses an HTTP Request n8n node (Fetch Invoices) to retrieve the most recent five invoices from Stripe. A subsequent Check API Response n8n node validates that the Stripe data structure is present; otherwise, it routes to the Error Logging Google Sheets n8n node.

Successfully retrieved invoices are processed individually using the Expand List n8n node. Next, two sequential IF n8n node checks determine eligibility:


  1. IF (Paid?): Only processes items where status equals 'paid'.

  2. IF (Already Receipted?): Only proceeds if the internal Stripe metadata receiptsent is 'false', preventing duplicates (if you update this field after processing).

If eligible, a Download File n8n node fetches the PDF using the invoicepdf URL. This binary data is then passed simultaneously to two branches:


  1. The Send Receipt Email n8n node (Gmail) attaches the PDF and sends a personalized receipt email to the customer.

  2. The Upload Invoice PDF n8n node (Google Drive) archives the PDF, using the invoice number as the file name.

Finally, the successful archive details (including the generated Drive link) are appended to a tracking spreadsheet using the Append to Ledger Google Sheets n8n node, completing this powerful n8n workflow.

Installation Guide

To use this powerful n8n workflow template, follow these steps:


  1. Import: Copy the entire JSON code provided and import it into your n8n instance via the 'Workflows' menu, selecting 'New' and then 'Import from JSON'.

  2. Credentials Setup: This n8n workflow requires credentials for:

Stripe: Set up a Stripe API credential (Secret Key) for the 'Fetch Invoices' HTTP Request n8n node.
Gmail: Configure an OAuth2 or Service Account credential for the 'Send Receipt Email' n8n node.
* Google Drive & Google Sheets: Set up a unified OAuth2 or Service Account credential for the Google Drive and Google Sheets n8n nodes.

  1. Update URLs: Review and update the placeholder values ({{YOURURL}}, {{YOURSPREADSHEETURL}}, {{YOURGOOGLEDRIVEURL}}) in the 'Upload Invoice PDF', 'Append to Ledger', and 'Error Logging' n8n node parameters to point to your specific ledger spreadsheet and archiving folder in Google Drive.

  2. Testing: Execute the n8n trigger manually to ensure all API connections and filters work as expected before deploying in a production environment.

Node Details

When clicking ‘Execute workflow’ (Manual Trigger): This is the manual n8n trigger that initiates the entire automation sequence.
Fetch Invoices (HTTP Request): Connects to the Stripe API (/v1/invoices?limit=5) to pull the latest invoice data. Uses a Bearer token from a Stripe credential for authorization.
Check API Response (IF n8n node): Ensures the Stripe response contains the expected data array before proceeding, preventing failures on malformed API responses.
Expand List (Split Out n8n node): Splits the list of invoices returned by Stripe into individual items, allowing subsequent n8n node logic to process each invoice independently.
IF (Paid?) (IF n8n node): Filters items, ensuring only invoices with status equal to 'paid' move forward in the n8n workflow.
Download File (HTTP Request n8n node): Fetches the invoice PDF from Stripe using the dynamic invoice_pdf URL provided in the invoice data. Configured to handle the response as a binary file.
Send Receipt Email (Gmail n8n node): Sends the payment receipt to the customer's email address. It dynamically constructs the subject and body using invoice variables and automatically attaches the downloaded PDF binary file.
Upload Invoice PDF (Google Drive n8n node): Archives the downloaded PDF file into a specified Google Drive folder, naming the file based on the invoice number ({{$json["number"]}}.pdf).


  • Append to Ledger (Google Sheets n8n node): Logs the crucial transaction and file archiving metadata (such as invoice number, total, date, and Google Drive URL) to a defined tracking spreadsheet.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

Featured*