Latenode

Automatically sync Notion pages to Markdown and vice versa

This template watches a Notion database for updated pages, retrieves the page, and uses JavaScript to turn Notion blocks into Markdown.

It then turns that Markdown back into Notion blocks and updates the same page, so a Markdown draft and the Notion body stay aligned. Connect Notion, pick the database, and map a property if you also store the Markdown text on the page.

Updated Sep 16, 2026Est. run: 11sEst. cost: $0.0007
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how CPU seconds work →

Workflow preview

What this template does

  • Keeps Notion pages aligned with a Markdown version of the same content
  • Starts when a database page is updated
  • Converts blocks in JavaScript in both directions
  • Writes the result back to the same Notion page

How it works

1
Trigger

Watch the Notion database

The scenario starts when a page in the Notion database you choose is updated.

2
Action

Retrieve the page

Latenode loads the page content so JavaScript can read the blocks.

3
Logic

Convert to Markdown and back

JavaScript turns Notion blocks into Markdown, then turns Markdown into Notion blocks. If a property holds Markdown you pasted, that text becomes the source instead.

4
Action

Update the Notion page

The page is updated with the converted blocks so Notion and Markdown match.

Setup guide

1

Connect Notion

Add a Notion connection with access to the database you want to keep in sync.

2

Point the trigger at the database

Add a Notion trigger for an updated page in a database and select that database.

3

Convert in JavaScript

Retrieve the page. In JavaScript, convert blocks to Markdown and Markdown back to Notion blocks. If you keep Markdown in a property, read that property when it has text.

4

Write the blocks back

Update the page or append the new blocks. Edit a sample page and confirm the body and Markdown stay aligned.

Requirements

A Notion connection with write access to the target database
A Notion database whose pages you want to convert
A JavaScript mapping for the block types you use (headings, lists, code)

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work.