# 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.

- Workflow type: code
- Services: PayPal, Google Sheets, Slack
- Categories: Finance, Operations
- Published: 2026-08-09

## What it does

- 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 you'll need

- 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

## Prompt

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.

## How to customize

- 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

## FAQ

### Does this handle payments in more than one currency?

Yes, and it deliberately keeps them apart. Each currency gets its own line in the digest with its own gross, fees, net, and count. Adding US dollars to euros would produce a number that means nothing, so the workflow never does it. The spreadsheet keeps the currency in its own column so you can filter or sort by it.

### What happens on a day with no payments?

Nothing gets posted. If there were no transactions at all, the workflow writes nothing to the sheet and skips the Slack message entirely. A digest that says zero every morning is the fastest way to get a channel muted, so the workflow stays quiet instead.

### Will my ledger fill up with duplicate rows if it runs twice?

No. Before writing, the workflow checks which transaction IDs are already in the sheet and skips anything it has logged before, so a retry or a manual re-run will not double up your rows.

### Why run in the morning instead of at midnight?

PayPal's transaction history can take a few hours to fully settle, so a run at midnight risks missing late payments. Waiting until 7am the next morning means the day is closed out and the numbers are final.

### Are refunds included?

Yes. Refunds and reversals come through as their own entries with negative amounts, so they appear in the ledger and pull the day's net total down the way they should. They are excluded when picking the largest payment received, since a refund is not a payment in.

Use this prompt in General Input: https://www.generalinput.com/prompts/log-yesterdays-paypal-payments-to-sheets-and-post-a-digest