Log yesterday's PayPal payments to Sheets and post a digest
Every morning at 7am, yesterday's PayPal payments land in a running spreadsheet ledger and a short Slack digest shows what you actually took in.
Every morning at 7am, close out yesterday's PayPal activity for me: log every transaction to a running Google Sheets ledger, then post a short summary to Slack. Use a cron trigger set to 7am in my business timezone.
Start with PayPal List Transactions, scoped to the previous calendar day only, from 00:00:00 to 23:59:59 in my account timezone. Request the full field set so payer details come back alongside the transaction itself, and page through the results until every transaction for the day has been collected rather than stopping at the first page. PayPal's transaction reporting can lag behind real time by a few hours, which is exactly why this runs the next morning instead of at midnight.
Append one row per transaction to my Google Sheets ledger using Append Values, in a fixed column order: date, transaction ID, gross amount, PayPal fee, net amount, currency, buyer name, status. Write the amounts as plain numbers in their own columns and keep the currency code in a separate column, so the sheet stays sortable and filterable. Do not convert or combine currencies inside the ledger.
Be careful with the money fields. PayPal returns every monetary amount as an object carrying a currency_code plus a decimal string value, so read the value and the currency separately rather than assuming a single number, and parse the string instead of treating it as an integer or minor units. Fee amounts come back negative, so net is gross plus fee, not gross minus fee. Refunds and reversals arrive as their own transactions with negative gross amounts; log them as they come.
Then aggregate the day and post a digest to Slack with Send a Message. Group every total by currency code and report each currency on its own line, never adding different currencies into one combined number. For each currency, show total gross, total PayPal fees, net total, and the transaction count. Finish with the single largest payment received that day, including its amount and the buyer name. Only completed, positive transactions are eligible to be the largest payment, so a refund never wins that slot.
Two edge cases matter. If PayPal returns no transactions at all for the day, stop quietly: write nothing to the sheet and post nothing to Slack, because an empty digest every morning just trains people to ignore the channel. And if the workflow runs twice for the same day, do not append the same transactions again; read the transaction IDs already present in the ledger and skip any that are already logged.
What does this prompt do?
- Pulls every PayPal transaction from the previous day and adds one row per payment to a running spreadsheet ledger
- Captures the date, transaction ID, gross amount, PayPal fee, net amount, currency, buyer name, and status for each payment
- Posts a short Slack summary with yesterday's gross, fees, net, and payment count, plus the largest single payment you received
- Breaks totals out by currency instead of adding different currencies together, and stays silent on days with no payments
What do I need to use this?
- A PayPal account with access to your transaction history (this comes with a business account)
- A Google account and a spreadsheet to use as your ledger
- A Slack workspace and the channel where the morning digest should land
How can I customize it?
- Change the timing: run it later in the morning, or only on weekdays so Monday covers the weekend
- Send the digest to a different channel, or as a direct message to whoever owns reconciliation
- Add columns to the ledger, or narrow it to completed payments only and leave pending ones out
FAQs
Does this handle payments in more than one currency?
What happens on a day with no payments?
Will my ledger fill up with duplicate rows if it runs twice?
Why run in the morning instead of at midnight?
Are refunds included?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Stop rebuilding yesterday's payment numbers by hand.
Set this up once and every morning your ledger is already current and your team knows exactly what came in.