Hourly Teachable sales to Google Sheets ledger
Automatically add every new Teachable transaction to a Google Sheet each hour so your team has an always-current revenue ledger without opening the admin.
Build a code workflow that runs on an hourly cron and mirrors new Teachable sales into a Google Sheet so my team has an always-current revenue ledger without touching the Teachable admin.
Trigger: cron, every hour.
Inputs I want to configure: the Google Sheet spreadsheet ID, the tab name to append into (default: Sheet1), and the target Teachable school (via the Teachable credential). The workflow should keep a checkpoint in workflow state — the id (or created_at timestamp) of the last transaction it processed.
Step 1. Call Teachable List Transactions and page through results, filtering to transactions created since the last checkpoint. Because Teachable's /v1/transactions endpoint has a documented lag of up to two minutes, use a small overlap window on the checkpoint (for example, checkpoint minus a few minutes) so we never miss late-arriving rows — the dedupe step handles the overlap. Sort ascending by created_at so we append in chronological order.
Step 2. For each transaction, build a row with these columns in this order: transaction date, student email, student name, course name, pricing plan, gross amount, currency, and payment status. Look up the course name and pricing plan name from the transaction payload; if only ids are present, resolve them via the Teachable Retrieve Course and Retrieve Pricing Plan operations, cached within the run so we don't refetch the same course twice.
Step 3. Before appending, read the transaction-id column from the sheet (append a hidden last column called transaction_id that stores the Teachable transaction id) and skip any row whose id already exists. This makes the workflow fully idempotent even if two runs overlap or a run is retried.
Step 4. Use the Google Sheets Append Values operation to write the new rows in one batched call with valueInputOption USER_ENTERED so dates and currencies render cleanly.
Step 5. After a successful append, update the workflow-state checkpoint to the id and created_at of the most recent transaction we appended. If the append fails, do not advance the checkpoint so the next run retries.
Integrations: Teachable (List Transactions, Retrieve Course, Retrieve Pricing Plan) and Google Sheets (Append Values, Get Values for the dedupe read). Please handle Teachable's 100 req/min rate limit gracefully by respecting the RateLimit-Reset header.
Additional information
What does this prompt do?
- Runs every hour and picks up any new Teachable sales since the last run.
- Adds one row per sale to a Google Sheet with date, student, course, plan, amount, currency, and status.
- Remembers the last sale it processed so re-runs never create duplicate rows.
- Gives finance, marketing, and course creators one shared source of truth for revenue.
What do I need to use this?
- A Teachable school on the Pro plan or higher (API access is required).
- A Google account with edit access to the Google Sheet you want to fill.
- A Google Sheet with a header row that matches the columns you want tracked.
How can I customize it?
- Change the schedule from hourly to every 15 minutes, daily, or a custom cadence.
- Pick which columns land in the sheet, or add fields like coupon code and order number.
- Filter to a single course or pricing plan if you only want to track one product line.
Frequently asked questions
Will this create duplicate rows if the workflow runs twice?
How quickly do new sales show up in the sheet?
Do I need to prepare the Google Sheet first?
Does this work on Teachable's free plan?
Can I send the same data somewhere else, like Slack or Airtable?
Related templates
Stop copying Teachable sales into a spreadsheet by hand.
Connect Teachable and Google Sheets once, and Geni keeps your revenue ledger up to date every hour.