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

- Workflow type: code
- Services: Teachable, Google Sheets
- Categories: Operations, Finance
- Published: 2026-07-11

## What it does

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

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

## Prompt

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.

## How to customize

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

## FAQ

### Will this create duplicate rows if the workflow runs twice?

No. The workflow remembers the last sale it wrote to the sheet and skips anything already there, so re-runs and small time overlaps are safe.

### How quickly do new sales show up in the sheet?

Within the hour. The workflow runs every 60 minutes by default, and Teachable itself can take a minute or two to report a sale, so most rows land 60 to 65 minutes after checkout.

### Do I need to prepare the Google Sheet first?

Yes. Create a sheet with a header row (date, student email, student name, course, pricing plan, amount, currency, status) and share it with the Google account you connect.

### Does this work on Teachable's free plan?

No. Teachable only offers API access on the Pro plan and above, which is what this workflow uses to pull sales.

### Can I send the same data somewhere else, like Slack or Airtable?

Yes. Once your sales are flowing into the sheet, you can chain another workflow to post a Slack summary, mirror rows into Airtable, or build a weekly revenue digest.

Use this prompt in General Input: https://www.generalinput.com/prompts/hourly-teachable-sales-to-google-sheets-ledger