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.
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.
Example output
Additional information
What does this prompt do?
- 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 do I need to use this?
- 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.
How can I customize it?
- 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.
FAQs
Will this overwrite what is already in my spreadsheet?
What happens on a day with no sales?
What if a customer paid for one order in two installments?
Do I need a particular Keap plan for this?
Can my bookkeeper work straight from this sheet?
Related templates
Every weekday, find every unpaid JobNimbus invoice, email each customer one reminder that gets firmer as it ages, and post a receivables summary to Slack.
Every weekday at 7am, your active courses are checked for missing work, silent logins, and slipping grades, with a ranked list sent to your advising channel.
Every hour, find the tickets closest to breaching, leave a nudge on each one, and post a ranked at-risk list to your support channel.
Every weekday afternoon, each student who is behind gets a warm, personal message in their Canvas inbox listing exactly what they owe.
Every Monday at 8am, see exactly which assignments have work waiting, sorted worst first, posted to Slack and logged to a spreadsheet.
Every weekday morning we compare your password vault against your HR records and suspend access for anyone who has already left.
Stop rebuilding yesterday's sales by hand.
Let your Keap sales write their own ledger every morning, with the daily total waiting in Slack when you start work.