Automate Notion Content Conversion with n8n Workflow

Discover how this unique n8n workflow automates converting Notion database page updates into rich Markdown content and back to Notion blocks, saving hours of manual formatting and duplication work for Notion users.
notionTrigger
notion
code
+3
Workflow Identifier: 2301
NODES in Use: notionTrigger, notion, code, splitOut, httpRequest, stickyNote
Automate Notion content with n8n and Notion

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow watches for changes in a Notion database page.
When a page updates, it grabs all content blocks and child blocks from that page.
It then turns these blocks into Markdown text, keeping formatting like bold and links.
The workflow changes the Markdown by tripling it as an example.
After that, it changes the Markdown back into Notion blocks with correct formatting.
Finally, it updates the original Notion page with the new blocks.
This saves time and stops mistakes from copying and pasting manually.

The workflow solves the problem of manually copying Notion content to Markdown and back, keeping things correct and easy.
It gives a fully updated Notion page with improved content after every update.


Who should use this workflow

This workflow fits content managers or anyone updating Notion pages often.
It helps users who want to switch between Notion’s blocks and Markdown without losing formatting.
If manual copying wastes hours or causes errors, this workflow can help.


Tools and services used

  • n8n: For automating workflows.
  • Notion API: Sends and receives Notion page and block data.
  • HTTP Request node: To call Notion API endpoints directly.
  • JavaScript Code node: Converts Notion blocks to Markdown and back.

Beginner step-by-step: How to build this workflow in n8n

Import the workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you want to run this workflow.
  3. Click “Import from File” and select the downloaded workflow.

Configure credentials and IDs

  1. Add or update the Notion API credentials inside n8n if not added.
  2. In the Notion Trigger node, update the Database ID to target your Notion journal or desired database.
  3. If needed, edit any email, channel, or folder IDs used in other nodes.
  4. Review the JavaScript code nodes for any hardcoded URLs or IDs and update if needed.

Test and activate

  1. Manually update a page in the linked Notion database to test triggering.
  2. Check the execution in n8n to verify blocks convert to Markdown and back with formatting intact.
  3. If tests succeed, activate the workflow by toggling it ON in the n8n editor.
  4. The workflow will now run every minute to detect and process updated pages.

Workflow inputs, processing, and output

Inputs

  • Notifications when a page in a specified Notion database updates.

Processing Steps

  • Fetch all content blocks of the updated Notion page.
  • Retrieve child blocks for full content context via HTTP Request.
  • Split child blocks to process them individually.
  • Use JavaScript code to convert Notion blocks’ rich text formatting into Markdown.
  • Demo step: triple the Markdown content to show manipulation.
  • Convert the Markdown back into properly formatted Notion blocks using JavaScript.
  • Update the Notion page by patching the new blocks as children using an HTTP PATCH request.

Output

  • The original Notion page updated with reformatted blocks, preserving rich text and links.

Customization ideas

  • Change the database ID in the Notion Trigger to monitor other databases.
  • Edit the JavaScript in Code nodes to add support for more Notion block types like tables.
  • Add a Function node after splitting blocks to filter unwanted content.
  • Insert nodes after Markdown conversion to send content to other platforms or messaging apps.
  • Improve back conversion code to handle nested lists or advanced formatting.

Troubleshooting common issues

  • Notion Trigger not firing: Check if database ID is correct and API credentials are valid.
  • Child blocks returning empty: Confirm HTTP Request URL uses dynamic page ID and integration permissions include reading page content.
  • Markdown format lost or wrong: Review JavaScript parsing functions and add extra cases for unsupported blocks.

Pre-production checklist

  • Make sure Notion API credentials have read and write access to the database.
  • Test the workflow by updating a page manually, watch the trigger fire in n8n.
  • Check HTTP requests return expected child blocks JSON.
  • Verify code nodes convert Notion blocks to Markdown and back correctly.
  • Backup important Notion pages before enabling this workflow in production.

Deployment guide

After verifying everything works, activate the workflow in n8n using the active toggle.
Monitor executions for any errors during the first runs to confirm processing is stable.
This can run on n8n’s cloud or self-host n8n for better control and data privacy.


Summary and benefits

✓ Saves time by automating Notion to Markdown conversions.
✓ Prevents formatting mistakes from manual copying.
✓ Keeps Notion pages fully updated with rich formatting.
✓ Opens possibilities to edit content in Markdown easily.
✓ Simplifies publishing workflows connected to Notion.
→ Runs every minute reacting to page changes in specified database.
→ Outputs reformatted and enriched Notion blocks on the original page.


Automate Notion content with n8n and Notion

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The Notion Trigger node polls the specified database every minute and fires when it detects a page has changed.
The workflow converts Notion blocks with rich text into Markdown text, then back from Markdown into Notion blocks.
Verify the HTTP Request uses the correct dynamic page ID in the URL and that the Notion API integration has permission to read page content.
Download the workflow file, import it using the ‘Import from File’ option in the n8n editor, add Notion API credentials, update database ID if needed, test once, then activate.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.