Urgent.News

the world's headlines, one feed

Editions

Tech

From Visual Workflows to Native Code in Production: The Complete Journey of an n8n Backend That Couldn't Stop Evolving

I'll tell this story in the order it happened. It doesn't start with a compiler. It starts with two n8n servers and a synchronization problem I had to solve before I could sleep peacefully. Act 1 — The problem nobody mentions when they recommend n8n CoreAutoCRM is an auto repair shop management SaaS operating entirely via WhatsApp. AI customer service, scheduling, quotes, yard management,…

In the early days, the author built an auto repair shop management SaaS entirely using n8n workflows, from AI customer service to yard management. However, as the product grew and required staging and production environments, the synchronization problem between these environments emerged. Since workflows existed only in the server's database without a file history, there was no way to track changes, who made them, or when.

Exporting and importing workflows manually between servers was impractical, especially with 74 workflows in place. The author needed a solution to capture the current state of workflows as files, version them in Git, and automate deployment to the production server. He built GitOps for n8n, turning visual workflows into versionable code using n8n's REST API.

This GitOps structure allowed for easy synchronization, review, and deployment of workflows between staging and production. However, as the product continued to grow, the cost of running n8n instances for 126 workflows became evident. Each n8n node serialized and deserialized the entire state, resulting in high latency and memory usage.

The author considered two options: rewriting the backend in native code or scaling horizontally with more n8n instances. Both options were deemed undesirable. The turning point came when the author realized he already had 74 workflows as structured JSON files in the Git repository. With this realization, he could now treat the workflows as structured code, enabling further automation and improving the overall speed and scalability of the backend.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.

Read the original at dev.to →

More in Tech

iPhone 18 Pro Will Reportedly Start With 256GB of Storage

iPhone 18 Pro Will Reportedly Start With 256GB of Storage

While the iPhone 17 Pro has double the base storage compared to the iPhone 16 Pro, there will apparently be no further increase this year. In a report this week estimating that the iPhone 18 Pro's bill of materials will be nearly 40% higher than the iPhone 17 Pro , Taiwanese research firm TrendForce said the iPhone 18 Pro will start with…