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.
- 1
Create a Webhook node to receive PayPal IPN events
Add a
Webhooknode and set the HTTP Method toPOST. Copy the generated webhook URL — you will paste this into PayPal in the next step. Set Authentication toNonefor now; PayPal IPN does not use bearer tokens. - 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
Filter for completed payments only with an IF node
Add an
IFnode connected to the Webhook output. Set the condition to check that{{$json.body.payment_status}}equalsCompleted. Only transactions that pass this check will continue to the Sheets step, avoiding test or pending payments cluttering your log. - 4
Map the PayPal fields with a Set node
Add a
Setnode on the TRUE branch of the IF node. Create these fields:Datemapped to{{$json.body.payment_date}},Emailto{{$json.body.payer_email}},Amountto{{$json.body.mc_gross}},Currencyto{{$json.body.mc_currency}}, andTransaction IDto{{$json.body.txn_id}}. This normalises the data before writing to Sheets. - 5
Append the sale to Google Sheets
Add a
Google Sheetsnode connected to the Set node. Set the Operation toAppend. Select your Google account credential, choose your Spreadsheet and the Sheet tab namedSales 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.