# Log yesterday's Keap sales to a Sheet and Slack the total

> Every weekday morning, yesterday's Keap payments are added to a running spreadsheet and the daily sales total lands in Slack.

- Workflow type: code
- Services: Keap, Google Sheets, Slack Bot
- Categories: Finance, Operations
- Published: 2026-08-04

## What it does

- Every weekday at 7am, collects every Keap order and payment from the day before.
- Adds one row per payment to a running spreadsheet tab with the date, order, customer name, product, amount, and how they paid.
- Posts a short Slack recap with the number of orders, the gross total for the day, and the largest single order.
- Only ever adds rows, so the tab builds into a permanent ledger your bookkeeper can reconcile against.

## What you'll need

- A Keap account with the orders and payments you want to track.
- A Google account and a spreadsheet with a tab set aside for the ledger, with a header row for date, order, customer, product, amount, and payment method.
- A Slack workspace and a channel where the daily sales recap should be posted.

## Prompt

Every weekday at 7am, build a running revenue ledger from yesterday's Keap sales. Use a cron trigger, Monday through Friday at 7am in my timezone. The date window is the whole of the previous calendar day, midnight to midnight.

Start by pulling yesterday's sales from Keap. Use List orders to get every order dated the previous day, and List Payments to get every payment recorded that day. Where an order has more than one payment against it, call Retrieve Order Payments for that order to get the payment level detail, so a split payment or a payment plan installment appears as its own line instead of being collapsed into a single order total.

Paginate every Keap list call all the way to the end before moving on. Keap v1 list endpoints use offset pagination with a limit of up to 1000 plus an offset, and v2 uses cursor pagination with page_size and a next_page_token that you pass back until it comes back empty. A busy day will exceed a single page, and a partial fetch would silently truncate the ledger. Keap monetary amounts are already decimal values in the account currency, for example 12.50, so use them as they come back and do not divide by 100.

Write the results to Google Sheets using Append Values against my ledger tab, one row per payment, with these columns in this order: date, order id, contact name, product, amount, payment method. Use Append Values only. Do not use Update Values or anything else that writes to a fixed range, because that would overwrite history. Rows must always land after the last row already in the tab. This sheet is a permanent ledger my bookkeeper reconciles against, so nothing already written may be overwritten, cleared, or re-sorted. If a field is missing on a given payment, for example a product name on a manually recorded payment, write an empty cell rather than skipping the row.

Then send one Slack message using Send a Message on the Slack Bot integration to my finance channel. The message should state the number of orders for the day, the gross total, and the largest single order including the contact name on it. Keep it to one short readable message rather than a table.

If there were no payments at all yesterday, do not append anything to the sheet and post a single line saying no payments recorded for that date. Never post an empty or blank summary message.

## How to customize

- Change the timing: run it seven days a week, later in the morning, or twice a day.
- Send the recap to a different channel, or as a direct message to just you and your bookkeeper.
- Add or reorder the spreadsheet columns, for example a salesperson or an order source column.

## Example output

Keap sales for Mon 3 Aug: 14 orders, $8,420.00 gross. Largest single order: $1,950.00 from Dana Whitfield.

## FAQ

### Will this overwrite what is already in my spreadsheet?

No. Rows are only ever added below what is already there, so previous days stay exactly as they were. That is what makes the tab usable as a permanent ledger rather than a snapshot that resets every morning.

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

You get a single Slack line saying no payments were recorded for that date, and nothing is added to the spreadsheet. You never get a blank or confusing empty message.

### What if a customer paid for one order in two installments?

Each payment gets its own row, showing the same order on both lines. The Slack total reflects the money actually received that day, so the rows add up correctly for reconciliation.

### Do I need a particular Keap plan for this?

You need a Keap account you can connect and permission to view orders and payments. If you can see your sales inside Keap, this can read them.

### Can my bookkeeper work straight from this sheet?

Yes, that is the point. Every payment lands as a dated row with the order, customer, product, amount, and payment method, so it can be checked line by line against your bank statement.

Use this prompt in General Input: https://www.generalinput.com/prompts/log-yesterdays-keap-sales-to-a-sheet-and-slack-the-total