Automate complex data transformation using this n8n workflow. Convert raw Markdown files into structured Notion blocks using a custom Code n8n node for seamless publishing.
Download this n8n workflow template and start using it instantly.
This powerful n8n workflow solves the common problem of moving richly formatted text from Markdown into Notion without losing structure. Integrating raw text can be challenging due to Notion's block-based architecture. This n8n template leverages a sophisticated Code n8n node containing custom JavaScript to accurately parse complex Markdown syntax—including headers (H1, H2, H3), bulleted and numbered lists, code blocks with language detection, quotes, links, and rich text formatting (bold/italic). It generates the precise JSON block structure required by the Notion API, providing a robust, production-ready solution for automated content synchronization and enhancing the functionality of your n8n automation platform.
The n8n workflow begins with the manual n8n trigger, initiating the automation process. First, the 'Mock data' n8n node introduces a sample Markdown string into the data stream, simulating input from a previous step in a real-world n8n workflow. This Markdown content is then processed by the critical 'Convert into Notion blocks' n8n node, a custom Code n8n node. This node executes comprehensive JavaScript logic that iterates line-by-line, recognizing Markdown patterns and transforming them into valid Notion block JSON objects (paragraph, heading, code, divider, etc.). It also handles inline formatting and link conversion. The final step uses the 'Insert Notion page content' n8n node, which is an HTTP Request node configured to use the Notion API. It sends a PATCH request, inserting the generated array of Notion blocks ($json.blocks) into a specified Notion page ID, completing the data transformation and insertion within the n8n environment.
output. 4. Action Configuration: In the 'Insert Notion page content' HTTP Request n8n node, you must update the URL. Replace the placeholder block ID in the endpoint URL (e.g., .../blocks/2255b6e0c94f80e7951df98d53ce2c39/children) with the actual ID of the Notion page you intend to populate or update using this n8n template. When clicking ‘Execute workflow’ (Manual Trigger n8n trigger): This is the entry point, primarily used for testing and development of this n8n template, allowing immediate execution of the logic.
Mock data (Set n8n node): Provides static Markdown content under the key output. This n8n node simulates data input for the rest of the n8n workflow and should be replaced by a live data source.
Convert into Notion blocks (Code n8n node): The core intelligence of this n8n workflow. It contains complex functions to correctly parse various Markdown elements (headers, lists, quotes, code, and inline rich text) and meticulously convert them into the required Notion block JSON structure, including handling links and annotations. This custom Code n8n node is essential for the transformation.
Insert Notion page content (HTTP Request n8n node): Configured to execute a PATCH request to the Notion API (/v1/blocks/{page_id}/children). It uses the blocks array output ({{ $json.blocks }}) from the previous n8n node as the request body to successfully upload the structured content to Notion. This node requires a predefined Notion API credential.
Automate content repurposing using an advanced n8n workflow. Generate multiple social snippets with GPT-4o-mini from Airtable content, manage status updates, and auto-publish to Facebook/Meta and Slack.

Convert long videos into viral social media shorts automatically using n8n, OpenAI Whisper, and Google Gemini. This powerful n8n workflow handles transcription, clip selection, cutting, and scheduled posting to TikTok, Instagram, and YouTube.

Use this powerful n8n workflow template to automatically convert long documents into structured, bite-sized micro-learning modules using GPT-4. Integrates with Slack and Google Docs.

Automate post-meeting tasks using this n8n workflow. It uses Google Gemini AI to analyze meeting notes, extract action items for Google Tasks, send follow-up emails via Gmail, and generate a summary document. Get these powerful n8n templates today.

Use this powerful n8n workflow to automate post-meeting processes. Leverage GPT-4o to extract structured data, create Asana tasks, and notify your team via Slack instantly.








































