Automatically Log Every Stripe Payment to Google Sheets in Real Time
Every time a customer pays you via Stripe, this workflow instantly captures the payment details and appends a new row to your Google Sheet. Keep a live, searchable payment log without touching a spreadsheet manually.
- 1
Set up the Stripe Trigger node
Add a
Stripe Triggernode to your canvas. In its settings, connect your Stripe account by adding your Stripe API key as a credential. Set theEventsfield to listen forpayment_intent.succeeded. This node will fire every time a payment completes successfully. Copy the webhook URL that n8n provides and paste it into your Stripe Dashboard under Developers > Webhooks > Add Endpoint. - 2
Extract the payment fields with a Set node
Add a
Setnode after the Stripe Trigger. Create four fields: setamountto the expression{{ $json.data.object.amount_received / 100 }}to convert cents to dollars, setcurrencyto{{ $json.data.object.currency }}, setpayment_idto{{ $json.data.object.id }}, and setcreated_dateto{{ $json.data.object.created }}. This cleans up the raw Stripe payload into tidy columns for your sheet. - 3
Get the customer email with an HTTP Request node
Add an
HTTP Requestnode to look up the customer email from Stripe. SetMethodtoGET, and setURLtohttps://api.stripe.com/v1/payment_intents/{{ $json.payment_id }}. UnderAuthentication, chooseBasic Authand enter your Stripe Secret Key as the username with no password. From the response, map{{ $json.charges.data[0].billing_details.email }}and note it for the next step. - 4
Append the payment row to Google Sheets
Add a
Google Sheetsnode and connect your Google account as a credential. SetOperationtoAppend. Select your target spreadsheet and the sheet tab you want to use as your payment log. Map the columns:Payment IDfrom{{ $node['Set'].json.payment_id }},Amountfrom{{ $node['Set'].json.amount }},Currencyfrom{{ $node['Set'].json.currency }},Datefrom{{ $node['Set'].json.created_date }}, andEmailfrom the HTTP Request response. Make sure your sheet has matching headers in row 1 before activating. - 5
Activate and test the workflow
Click
Activatein the top right of your n8n canvas to turn the workflow on. Make a small test payment in your Stripe test mode environment, then check your Google Sheet to confirm a new row was added with the correct data. Once verified, switch your Stripe webhook endpoint and API key to live mode to start logging real payments.
Frequently asked questions
What if a payment is refunded — will the log update?
This workflow only listens for `payment_intent.succeeded` events, so refunds will not automatically update or remove rows. To track refunds, you would add a second workflow that listens for the `charge.refunded` Stripe event and marks the corresponding row in your sheet.
Do I need a paid n8n plan to use webhooks?
No. Webhooks work on the free self-hosted version of n8n. On n8n Cloud, webhooks are available on all plans including the Starter tier. The webhook URL is generated automatically when you add the Stripe Trigger node.
What happens if the workflow is off when a payment comes in?
If the workflow is inactive, Stripe will retry the webhook delivery for up to 72 hours. Once you reactivate the workflow in n8n, any retried events from Stripe will be processed and logged. To minimise gaps, keep the workflow active at all times after initial setup.