# Update Teachable lessons from Markdown files

> Sync revised course scripts from Markdown into Teachable lessons: only changed lessons are touched, videos and quizzes stay, live ones wait for you.

Source: https://cotlet.dev/integrations/teachable-api-mcp-server/update-lessons-from-markdown

Your course scripts live in Markdown, in a folder or a Git repo, and Teachable keeps its own copy in each lesson's Text & Image block. After a revision you open lesson after lesson and paste the new text by hand, and over a few months the two copies drift apart.

Cotlet does it in your own Teachable account with list\_courses, get\_curriculum, get\_lesson, update\_lesson, create\_lesson and publish\_lesson, called by your AI agent, an n8n workflow or a script.

[Request access](https://cotlet.dev/app/signup?app=teachable) [All Teachable tools](https://cotlet.dev/integrations/teachable-api-mcp-server)

Hosted · nothing to install or maintain

Official options

## Can Teachable do this on its own?

Teachable's public API reads a lecture and can mark it complete for a student, but has no endpoint to create, edit or publish one (checked 12 Oct 2026). The experimental Teachable MCP mentions course descriptions, not lesson content, and Zapier has no lesson action. Inside the editor, Teachable offers an AI assistant that writes new text from a prompt and a Bulk upload that makes one lesson per uploaded file; neither puts text you already wrote into the lessons it belongs to.

By hand

## How you do it in Teachable today

1. Select the course in the Teachable admin sidebar, open the Curriculum tab and click the lesson name to open the Lesson Editor.
2. Click the Edit icon on the Text & Image block and replace the text in the WYSIWYG editor, fixing headings, lists and links by hand; Teachable links need http:// or https:// in front of the URL.
3. Click Save. On a published lesson, Teachable shows the change to students right away.
4. For a new lesson, click New lesson inside a section, add the content, then publish it with the Publish button or with Bulk edit on the Curriculum tab.
5. Repeat for every changed lesson. Teachable gives no signal of which lessons no longer match your source files, and a revision saved into the wrong lesson is live at once.

With an agent

## How to update Teachable lessons from Markdown files

Prompt

```
Compare my Python course with the Markdown files in ./scripts, update the lessons that changed, and ask me before touching published ones.
```

1. 01  
### Match every file to a lesson  
The agent reads get\_curriculum and pairs each Markdown file with a lesson by its title, or by a lesson\_id you keep at the top of the file. A file with no match becomes a proposed new lesson in the section you name. It is never pasted into the closest-sounding lesson.
2. 02  
### Diff before writing  
get\_lesson gives the text Teachable holds now. Lessons that already match the file are skipped, and every changed one gets a short before and after. When a lesson has two Text & Image blocks, the agent asks which one the file replaces.
3. 03  
### Leave media and quizzes alone  
Video, PDF, quiz and other blocks keep their place. If the new text mentions a video or quiz the lesson lacks, that goes in the report rather than into a made-up block. A Lesson Summary block is flagged as well, because Teachable wrote it with AI from the old text.
4. 04  
### Drafts go in, live lessons wait  
Unpublished lessons get their new text at once, and new lessons go in through create\_lesson as drafts. For a published lesson, update\_lesson waits for your OK on the diff, since students see the change on save.
5. 05  
### Publish as one decision  
When you have read the drafts, publish\_lesson releases them together. The report names any section still hidden because every lesson in it is unpublished.

### What you get back

Example data

```
Python for Beginners: 15 Markdown files, 14 matched to lessons.
Unchanged and skipped: 10 lessons.
Updated after your OK: Lesson 3: Functions, Lesson 7: Dictionaries (published, live now).
Updated as draft: Lesson 12: Packaging.
New draft: Lesson 15: Testing, at the end of Section 4: Projects.
Check by hand: Lesson 7 has a Lesson Summary block written for the old text.
```

### Other ways to ask

- Compare every lesson in Team Onboarding with the files in ./onboarding and list the ones that differ, without changing anything.
- Create lessons 15 to 18 from the new Markdown files as drafts in Section 4: Projects and leave them unpublished.
- After each push to the course-scripts repo, update the changed lessons and ask me before any published lesson changes.
- Publish every draft lesson in Section 4: Projects of the Python course.

Before you automate it

## What Teachable allows, and what to know first

- Teachable creates every new lesson unpublished and hides a whole section from students when all of its lessons are unpublished.
- Teachable keeps read-only code in a separate Code Example block, apart from the Text & Image block that holds the lesson text.
- Deleting a Teachable lesson is permanent, and videos inside a deleted lesson cannot be recovered within Teachable, so rewriting a lesson is safer than deleting and recreating it.
- Publishing Teachable lessons does not make a course enrollable; that needs the publish and product visibility settings on the course's Information tab.
- Teachable's Bulk upload, on paid plans only, adds files in alphabetical order, one lesson per file, so file names decide the lesson order.

update\_lesson and publish\_lesson ask for your OK by default. To run it on a schedule without you, switch confirmation off for those tools in your dashboard.

Sources: [Teachable Help: Add Lesson Content](https://support.teachable.com/en/articles/11682455-add-lesson-content) · [Teachable Help: Sections and Lessons](https://support.teachable.com/en/articles/11682453-sections-and-lessons) · [Teachable API reference index](https://docs.teachable.com/llms.txt) · [Teachable Help: Teachable MCP](https://support.teachable.com/en/articles/12703527-teachable-mcp)

REST

## Call update\_lesson from a script

curl

```
curl https://cotlet.dev/api/v1/teachable/update_lesson \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"course_id":"1204512","lesson_id":"35120874","title":"Lesson 3: Functions","body_markdown":"# Functions\n\nA function groups steps you want to reuse."}'
```

Example response

```
{
"lesson_id": "35120874",
"name": "Lesson 3: Functions",
"updated_block_id": "b_5521",
"published": true,
"updated_at": "2026-10-11T09:20:00+02:00"
}
```

MCP: add https://cotlet.dev/mcp/v1 with the same key; the tool is teachable\_update\_lesson. Example data.

[Schedule it in n8n, Make, Zapier or cron](https://cotlet.dev/integrations/teachable-api-mcp-server#automations)

Tools

## Teachable tools this automation uses

__Cotlet Teachable tools used to update Teachable lessons from Markdown files__
| Tool | Parameters |
| --------------- | -------------------------------------------------------- |
| list\_courses | published |
| get\_curriculum | course\_id |
| get\_lesson | course\_id, lesson\_id |
| update\_lesson | course\_id, lesson\_id, title, body\_markdown, block\_id |
| create\_lesson | course\_id, section\_id, title, body\_markdown |
| publish\_lesson | course\_id, lesson\_id, published |

[All 15 Teachable tools with descriptions](https://cotlet.dev/integrations/teachable-api-mcp-server#tools)

## More Teachable automations

- [Create Teachable coupon codes for a sale](https://cotlet.dev/integrations/teachable-api-mcp-server/create-discount-coupons)
- [Moderate and answer Teachable lesson comments](https://cotlet.dev/integrations/teachable-api-mcp-server/moderate-lesson-comments)
- [Teachable API and MCP server: every tool](https://cotlet.dev/integrations/teachable-api-mcp-server)
- [All use cases](https://cotlet.dev/use-cases)

## Give your agent access to Teachable.

Free 7-day trial with 5,000 credits, no card needed. Cotlet is independent and not affiliated with Teachable.

[Request access](https://cotlet.dev/app/signup?app=teachable)
