Finance & Ops · n8n

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.

difficulty Beginnersetup 30 minresult A Google Sheet that automatically updates with every successful Stripe payment, including amount, customer email, date, and payment ID.
  1. 1

    Set up the Stripe Trigger node

    Add a Stripe Trigger node to your canvas. In its settings, connect your Stripe account by adding your Stripe API key as a credential. Set the Events field to listen for payment_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. 2

    Extract the payment fields with a Set node

    Add a Set node after the Stripe Trigger. Create four fields: set amount to the expression {{ $json.data.object.amount_received / 100 }} to convert cents to dollars, set currency to {{ $json.data.object.currency }}, set payment_id to {{ $json.data.object.id }}, and set created_date to {{ $json.data.object.created }}. This cleans up the raw Stripe payload into tidy columns for your sheet.

  3. 3

    Get the customer email with an HTTP Request node

    Add an HTTP Request node to look up the customer email from Stripe. Set Method to GET, and set URL to https://api.stripe.com/v1/payment_intents/{{ $json.payment_id }}. Under Authentication, choose Basic Auth and 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. 4

    Append the payment row to Google Sheets

    Add a Google Sheets node and connect your Google account as a credential. Set Operation to Append. Select your target spreadsheet and the sheet tab you want to use as your payment log. Map the columns: Payment ID from {{ $node['Set'].json.payment_id }}, Amount from {{ $node['Set'].json.amount }}, Currency from {{ $node['Set'].json.currency }}, Date from {{ $node['Set'].json.created_date }}, and Email from the HTTP Request response. Make sure your sheet has matching headers in row 1 before activating.

  5. 5

    Activate and test the workflow

    Click Activate in 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.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.