Finance & Ops · n8n

Automatically Log Every PayPal Sale to Google Sheets in Real Time

Every time a PayPal payment completes, this workflow instantly captures the sale details and appends a new row to your Google Sheet. Keep a clean, searchable sales log without manual data entry.

difficulty Beginnersetup 30 minresult A live Google Sheet that automatically records every successful PayPal payment with the date, buyer email, amount, currency, and transaction ID.
  1. 1

    Create a Webhook node to receive PayPal IPN events

    Add a Webhook node and set the HTTP Method to POST. Copy the generated webhook URL — you will paste this into PayPal in the next step. Set Authentication to None for now; PayPal IPN does not use bearer tokens.

  2. 2

    Register the webhook URL in PayPal IPN settings

    Log in to PayPal, go to Account Settings > Notifications > Instant Payment Notifications, click Choose IPN Settings, paste your n8n webhook URL, and enable IPN. PayPal will now POST a form-encoded payload to n8n after every completed payment.

  3. 3

    Filter for completed payments only with an IF node

    Add an IF node connected to the Webhook output. Set the condition to check that {{$json.body.payment_status}} equals Completed. Only transactions that pass this check will continue to the Sheets step, avoiding test or pending payments cluttering your log.

  4. 4

    Map the PayPal fields with a Set node

    Add a Set node on the TRUE branch of the IF node. Create these fields: Date mapped to {{$json.body.payment_date}}, Email to {{$json.body.payer_email}}, Amount to {{$json.body.mc_gross}}, Currency to {{$json.body.mc_currency}}, and Transaction ID to {{$json.body.txn_id}}. This normalises the data before writing to Sheets.

  5. 5

    Append the sale to Google Sheets

    Add a Google Sheets node connected to the Set node. Set the Operation to Append. Select your Google account credential, choose your Spreadsheet and the Sheet tab named Sales Log. Map each column header to the matching field from the Set node: Date, Email, Amount, Currency, Transaction ID. Every completed PayPal sale will now appear as a new row instantly.

Frequently asked questions

What if PayPal sends duplicate IPN notifications?

PayPal sometimes retries IPN delivery. To prevent duplicate rows, add a column in your sheet for Transaction ID and periodically check for duplicates using a Google Sheets filter view, or upgrade the workflow with a duplicate-check step using the Google Sheets Lookup operation before appending.

Will this work with PayPal Checkout or only PayPal Buttons?

IPN works with most PayPal payment flows including PayPal Buttons, Subscriptions, and standard Checkout. If you use PayPal's newer Webhooks API instead of IPN, swap the Webhook node trigger URL into the PayPal Developer Dashboard under Webhooks and listen for the PAYMENT.CAPTURE.COMPLETED event.

How do I keep my Google Sheet organised as sales grow?

Create a header row in your Sheet with the columns Date, Email, Amount, Currency, and Transaction ID before activating the workflow. Google Sheets supports up to 10 million cells, so you have plenty of room. You can also use Sheets native filters or connect to Google Looker Studio for visual sales dashboards later.

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.