Enrich Notion page data with related pages, relations, and content

Go to Workflow
0 views
Built by Mayron Kersbaum Mayron Kersbaum
Created on September 24, 2026

Description

Quick overview
This workflow is called by another n8n workflow to expand selected Notion page properties, resolving relation fields via a helper sub-workflow, and returns the original page object enriched with the requested nested property data.

How it works
Receives a Notion page object and a list of property names to expand as inputs from another n8n workflow.
Splits the requested Properties list into individual items and iterates through them.
For each property, calls the “Get Relation Info” sub-workflow to resolve the Notion relation property into related page data.
If the current property includes nested properties to expand and the resolved data is not empty, it iterates through the related items and recursively calls this same workflow to expand the nested properties.
Aggregates the resolved property objects from all iterations.
Merges the aggregated resolved properties back into the original Notion page object and outputs the enriched page.

Setup
Configure the Notion credentials required by the “Get Relation Info” sub-workflow (and any Notion calls it performs).
Ensure the “Get Relation Info” workflow (ID: 14yGdu1YOQ0RgCzZ) exists in your workspace and is compatible with the provided inputs (Page and Propriedade).
Ensure this workflow is invoked from a parent workflow using the Execute Workflow node, passing a Notion page object in Page and an array of objects in Properties (for example: { "nome": "📝 Anotações", "propriedades": [...] }).

Nodes Used (1)

Code
n8n-nodes-base.code