Skip to main content

Convert Notion page to WordPress (Gutenberg) HTML

Workflow preview

Workflow preview
100%
Convert Notion page to WordPress (Gutenberg) HTML preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow fetches the complete content of a specific Notion page and converts all its blocks into a single HTML string compatible with the WordPress Gutenberg block editor . It's designed to be...

Best for

  • Content Creation automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.notion, n8n-nodes-base.code, n8n-nodes-base.aggregate, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.manualtrigger, n8n-nodes-base.set, n8n-nodes-base.stickynote, n8n-nodes-base.filter

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Konrad Roziewski.

Original n8n.io source

1.1 Workflow description

Title
Convert Notion page to WordPress (Gutenberg) HTML
Workflow name
Convert Notion page to WordPress (Gutenberg) HTML

This workflow fetches the complete content of a specific Notion page and converts all its blocks into a single HTML string compatible with the WordPress Gutenberg block editor.

It's designed to be used as a sub-workflow. You can call it from a parent workflow (e.g., "when a Notion page is updated") by passing it a notion_url. It returns a single item containing the complete, ready-to-use HTML for a WordPress post body.


Key Features

  • Full Page Conversion: Fetches all blocks from a page, including nested blocks (like content inside columns or toggles).
  • Rich Text Support: Correctly parses and converts rich text annotations, including bold, italic, <u>underline</u>, <s>strikethrough</s>, and links.
  • Gutenberg-Compatible: Wraps content in the appropriate Gutenberg HTML comments (e.g., , , ``) so WordPress recognizes them as blocks.
  • Handles Complex Layouts: Includes specific logic to correctly rebuild Notion's column and column_list blocks into a responsive Gutenberg-friendly format.
  • Supports Various Blocks: Converts paragraphs, all heading types (H1, H2, H3), bulleted and numbered lists, images, videos (YouTube/Vimeo), embeds, code blocks, and dividers.

How It Works

  1. Input: The workflow is triggered by an Execute Workflow node, which expects a notion_url in the input data. (A manual trigger with a sample URL is included for testing).
  2. Fetch Data: It first gets the Notion page specified by the URL and then uses a second Notion node to fetch all child blocks recursively (fetchNestedBlocks: true).
  3. Process Rich Text: A Code node (decode paragraphs) iterates over text-based blocks (paragraphs, lists) and uses a helper function to convert the Notion annotations array into standard HTML tags (e.g., <strong>, <em>, <a>).
  4. Convert Blocks: A second Code node (decode blocks) uses a large switch statement to map each Notion block type to its corresponding Gutenberg HTML structure.
  5. Rebuild Columns: A crucial Code node (column&column_list) runs once on all blocks. It finds all column blocks, then finds their children, and finally wraps them inside their parent column_list block. This is essential for correctly handling nested layouts.
  6. Filter & Aggregate: The workflow filters out all nested blocks, keeping only the top-level ones (since the nested content is now inside its parent, like the column block). It then aggregates all the generated HTML snippets into a single array.
  7. Final Output: A final Set node joins the array of HTML blocks with newline characters, producing a single text string in a field named wp. This string can be directly used in the "Content" field of a WordPress node in your parent workflow.

Setup

  1. Notion Credentials: You must configure your Notion credentials in the two Notion nodes:
    • Get a database page
    • Get many child blocks
  2. Trigger: To use this, call it from another workflow using an Execute Workflow node. Pass the URL of the Notion page you want to convert in the notion_url field.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Get a database page

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 2 - Get many child blocks

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 3 - decode blocks

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - decode paragraphs

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 6 - When Executed by Another Workflow

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 7 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 8 - Edit Fields2

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - drop unnecessary fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - nested blocks

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - choose content field

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - only top level blocks

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 15 - join lines

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Convert Notion page to WordPress (Gutenberg) HTML
Complexity advanced
Nodes 17
Categories Content Creation
Author Konrad Roziewski
Published 19 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9917/9917.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Convert Notion page to WordPress (Gutenberg) HTML do?

This workflow fetches the complete content of a specific Notion page and converts all its blocks into a single HTML string compatible with the WordPress Gutenberg block editor . It's designed to be...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation use case.