Hourly Teachable sales to Google Sheets ledger

By General Input

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.

Integrations

  • Teachable
  • Google Sheets

Type

Deterministic Code

Categories

  • Operations
  • Finance

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads