Hi fellow n8n users,
I wanted to share a project that pushes n8n to its limits using some “Software Engineering” best practices.
The Workflow Highlights:
-
The State Management Pattern: Using a single object passed through the flow, utilizing the
$(‘Node Name’)reference pattern to prevent data loss across AI nodes. -
Two-Stage AI Pipeline: It dynamically switches between models (mini vs flagship) based on triage priority to save on API costs.
-
Error Handling: Custom “Guard” nodes that validate and sanitize AI output before it hits Telegram or the database.
-
n8n Data Tables: I’ve provided a version that uses built-in Data Tables for those who want a pure n8n infrastructure.
Check out the .json files and documentation: https://github.com/fabcarvalho27/portfolio-impact-bot