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.

Deterministic Code
KeapGoogle SheetsSlack BotFinanceOperationsData SyncDaily Digests
PromptCreate

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

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

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

Related templates

Chase past-due JobNimbus invoices with escalating emails

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.

JobNimbus
Gmail
Slack Bot
Agentic Task
Flag at-risk students in Canvas before they fall behind

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.

Canvas
Google Sheets
Slack Bot
Agentic Task
Catch Jira service desk tickets before their SLA runs out

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.

Jira Service Management
Slack Bot
Agentic Task
Send Canvas students a kind nudge about missing work

Every weekday afternoon, each student who is behind gets a warm, personal message in their Canvas inbox listing exactly what they owe.

Canvas
Slack Bot
Agentic Task
Weekly Canvas grading backlog report in Slack and Sheets

Every Monday at 8am, see exactly which assignments have work waiting, sorted worst first, posted to Slack and logged to a spreadsheet.

Canvas
Slack Bot
Google Sheets
Deterministic Code
Revoke Bitwarden access when someone leaves in BambooHR

Every weekday morning we compare your password vault against your HR records and suspend access for anyone who has already left.

Bitwarden
BambooHR
Slack Bot
Agentic Task

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.