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

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

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.


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 Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free