Generate Notion task results with OpenAI and save them to a Resultados database

Go to Workflow
0 views
Built by Mayron Kersbaum Mayron Kersbaum
Created on October 13, 2026

Description

Quick Overview
This workflow receives a Notion task (via webhook or as a sub-workflow input), enriches it with related Notion context, uses OpenAI to generate one or more task results, and then creates a separate page for each result in a Notion “Resultados” database.

How it works
Receives a POST request via webhook or is triggered as a sub-workflow with tarefa, data_sources, and participante inputs.
Calls a separate n8n workflow (“Enriquecer Página do Notion”) to fetch the task’s expanded context from Notion, including parent items, projects, taxonomies, notes, and knowledge pages.
Normalizes the Notion content into structured context fields (function rules, task details, project, taxonomies, notes, and knowledge) to guide generation.
Sends the structured context to OpenAI (GPT model with a JSON schema) to generate an array of results, each with a title, content, and emoji.
Splits the generated results into individual items and iterates through them.
Creates a new page in the Notion “Resultados” database for each result, linking it back to the task (and parent task), and relating the referenced taxonomies, notes, and knowledge items.

Setup
Add OpenAI credentials and select the model you want to use in the OpenAI node.
Add a Notion bearer token (HTTP Bearer Auth) with access to the databases/pages referenced by the workflow and sub-workflow.
Import and configure the “Enriquecer Página do Notion” workflow and select its workflow ID in the execute-workflow step.
Ensure your Notion workspace includes a database named “Resultados” in data_sources and that it has the expected properties/relations (Nome, Conteúdo, ✅ Tarefas, 📝 Anotações, 📚 Conhecimentos, 🏷️ Taxonomias).
If using the webhook trigger, copy the webhook URL and send a POST body containing tarefa, data_sources, and participante from the calling system or workflow.

This workflow was created by Mayron Kersbaum and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (2)

HTTP Request
n8n-nodes-base.httpRequest
OpenAI
@n8n/n8n-nodes-langchain.openAi