Back to Blog
Use Case

From 24 Hours to 10 Minutes: Syncing 2.6 Million Price Rows Weekly Between ERP and E-Commerce with n8n

A deep dive into high-throughput data plumbing at iMi digital GmbH: how breaking synchronization pipelines into sub-workflows on n8n eliminated memory leaks, slashed sync duration by 99%, and replaced costly custom middleware.

Quick Answer

iMi digital GmbH resolved critical ERP-to-Shopware synchronization bottlenecks using self-hosted n8n. By pairing an SFTP hot-folder watcher with partitioned sub-workflows and batched Shopware Sync APIs, the team compressed sync runs from 24 hours to 10 minutes while processing 2.6 million price updates weekly with zero memory leaks.

From 24 Hours to 10 Minutes: Syncing 2.6 Million Price Rows Weekly Between ERP and E-Commerce with n8n

Table of Contents

In omnichannel retail and e-commerce operations, synchronization latency between core Enterprise Resource Planning (ERP) databases and online storefronts represents a continuous source of friction.

When purchase costs fluctuate, promotional tiers trigger, or inventory levels shift, these updates must reflect instantly across customer-facing catalogs. If data plumbing bottlenecks, customers encounter outdated pricing, place orders for out-of-stock items, or companies inadvertently absorb margin losses from outdated discount matrices.

For retail operations managing tens of thousands of SKUs across multi-tier B2B and B2C customer groups, weekly pricing record mutations routinely reach into the millions.

iMi digital GmbH—a German technology agency supporting e-commerce infrastructure across a retail group established in 2000—faced this exact data volume challenge. They develop and maintain high-traffic e-commerce operations on Shopware and Magento, tightly integrated with enterprise ERP backends.

An earlier importer engineered by an external third-party vendor required nearly a full day (approximately 24 hours) to execute a complete synchronization run. The process frequently crashed from memory leaks, delaying critical commercial pricing updates.

By re-architecting their data integration pipelines around self-hosted n8n, iMi digital achieved dramatic efficiency milestones:

  • Sync Duration: Slashed full catalog update cycles from 24 hours down to approximately 10 minutes (a 99% reduction in latency).
  • Processing Scale: Reliably processes 2.6 million price rows per week with zero server memory crashes.
  • Maintenance Overhead: Replaced fragile, custom-coded middleware plugins with auditable, visual workflows that adapt smoothly across e-commerce platform version upgrades.
  • Operational Compound Value: Automated marketing data transfers from core databases directly into CRM and Mautic marketing segments, eliminating dozens of hours of manual copy-pasting every month.

iMi digital Engineering Team Monitoring Integration Pipelines


1. The Memory Leak Nightmare in High-Volume Synchronization

Prior to adopting n8n, iMi digital maintained an integration architecture reliant on custom-coded PHP middleware.

As the retail business scaled, catalog export files from the ERP grew exponentially heavier. Pricing was not a single flat number; it multiplied across customer tiers, wholesale volume tiers, regional currencies, and promotional campaigns. Weekly pricing fluctuations reached roughly 2.6 million individual rows.

Whenever legacy middleware attempted to parse and load these massive datasets into memory within a single execution block, server RAM exhausted rapidly. Execution dragged across 24 hours, locking server resources and preventing critical price changes from reflecting on the live storefront.

Furthermore, every time the e-commerce platform released a major version update, developers had to rewrite custom integration plugins. Maintaining these brittle interfaces consumed significant engineering hours, pulling PHP developers away from building strategic revenue-generating features.


2. High-Throughput Pipeline Architecture on n8n

To resolve the root bottleneck, Developer Team Lead Alexander Menk chose to migrate the synchronization engine to self-hosted n8n.

The new architecture operates around four core operational principles:

HIGH-THROUGHPUT DATA PIPELINE ARCHITECTURE (IMI DIGITAL)

┌─────────────────────────────────────────────────────────────┐
│ 1. HOT FOLDER INGESTION (SFTP File Watcher)                 │
│ Detect CSV exports in real-time • Route by filename prefix  │
├─────────────────────────────────────────────────────────────┤
│ 2. SUB-WORKFLOW PARTITIONING (Memory Protection)            │
│ Process in bounded batches • Zero memory leaks on large runs│
├─────────────────────────────────────────────────────────────┤
│ 3. BULK SYNCHRONIZATION (Shopware Sync REST API)            │
│ Batch HTTP payloads • Maximize network and DB throughput   │
├─────────────────────────────────────────────────────────────┤
│ 4. LATENCY OBSERVABILITY (n8n Timeline Analysis Tool)       │
│ Microsecond node profiling • Extend automations to CRM/Mktg│
└─────────────────────────────────────────────────────────────┘

iMi digital High-Throughput Pipeline Flow Diagram

Principle 1: Reactive Ingestion via File Watchers

The pipeline initiates with an n8n file watcher node monitoring a designated hot folder fed by CSV files from the ERP's SFTP server.

Based on filename prefixes (such as

products_
,
customers_
, or
prices_
), the workflow routes each file into its dedicated processing pipeline. Once execution concludes successfully, source files automatically move into an archive directory to maintain clean operational workspaces.

Principle 2: Sub-Workflow Partitioning for RAM Protection

This technical pattern represents the most critical lesson for teams handling enterprise-scale data through workflow engines.

Rather than forcing 2.6 million records through a monolithic workflow—which inevitably causes memory bloat—iMi digital broke the logic into modular sub-workflows. The primary workflow segments incoming records into bounded batches and passes them sequentially to sub-workflows. Once a batch completes, its memory allocation releases immediately before the next batch initiates. This discipline keeps server memory usage flat and predictable throughout millions of rows.

Additionally, n8n’s native data-pinning capability enables developers to freeze execution state at specific nodes, drastically accelerating debugging whenever upstream API schemas vary.

Principle 3: Batched Ingestion via the Shopware Sync API

To push records into Shopware, the team avoided chatty single-item REST requests. They utilized the bulk Shopware Sync API, packing hundreds of mutations into batched payloads.

This batching strategy minimized HTTP handshake overhead, saturated available network throughput efficiently, and compressed full catalog syncs from a full 24-hour cycle down to roughly 10 minutes.

Principle 4: Granular Latency Profiling

To understand precisely where execution duration was concentrated beyond the standard user interface, Alexander Menk engineered an open-source performance profiling utility (publicly available on GitHub at

iMi-digital/n8n-timeline-analysis
).

The tool interfaces with n8n’s execution API to chart microsecond-level timing across individual nodes, allowing the engineering team to diagnose network and database bottlenecks systematically.


3. Operational Compound Value: Extending Pipelines to Marketing

Once the core n8n infrastructure proved stable, iMi digital quickly unlocked secondary operational dividends: extending workflow automation across business departments without licensing additional software.

A prime example was internal marketing data operations. Previously, when prospects registered for webinars or educational events, marketing personnel manually opened databases, transcribed participant records, and manually tagged contacts within CRM and Mautic marketing segments. Each participant required multiple minutes of manual data entry.

The technical team deployed a lightweight n8n workflow: the moment a new registration appears in the core database, n8n instantly synchronizes contact information into the CRM and segments the lead inside Mautic. This hands-off flow completely relieved marketing staff from repetitive data entry, saved dozens of hours each month, and ensured immediate email delivery to prospects.


4. Key Takeaways for Growing Retail Operations

From our operational transformation work at OXMODE, the iMi digital case surfaces three foundational rules for retail and e-commerce leaders:

  1. Fix Core Data Plumbing Before Pursuing AI: High-level AI initiatives collapse if fundamental operational data remains out of sync for 24 hours. Resilient, real-time data plumbing across inventory, pricing, and orders is the non-negotiable foundation of digital operations.
  2. Avoid the Trap of Proprietary Custom Plugins: Contracting developers to build bespoke, hardcoded integrations creates massive technical debt. When third-party platforms update their APIs, maintenance costs erode operational margins. Orchestration engines like n8n provide visual maintainability, lower debugging friction, and flexible business logic.
  3. Partition High-Volume Data into Bounded Batches: When transactional scale grows, never attempt to process millions of records in a single block. Segmenting data flows into sub-workflows and batched payloads is the only way to build systems that scale without crashing production servers.

Frequently Asked Questions

Tại sao các đợt đồng bộ dữ liệu lớn giữa ERP và sàn bán hàng thường bị lỗi tràn bộ nhớ (memory leaks)?

Khi xử lý hàng triệu dòng dữ liệu (như bảng giá hoặc danh mục sản phẩm), các hệ thống trung gian truyền thống thường cố gắng tải toàn bộ dữ liệu vào bộ nhớ RAM trước khi xử lý. Khi dung lượng dữ liệu vượt quá ngưỡng chịu đựng, hệ thống sẽ bị treo hoặc sập hoàn toàn. n8n giải quyết việc này bằng cách chia nhỏ tác vụ thành các luồng con (sub-workflows) xử lý theo từng lô (batching) và giải phóng bộ nhớ ngay sau mỗi lô.

Làm thế nào để đo lường và tối ưu hóa thời gian chạy của từng mắt xích trong quy trình n8n?

Đội ngũ kỹ sư tại iMi digital GmbH đã xây dựng một công cụ phân tích dòng thời gian mã nguồn mở (n8n-timeline-analysis) kết nối trực tiếp với API của n8n. Công cụ này cho phép đo lường chính xác thời gian thực thi của từng node riêng lẻ, giúp đội ngũ phát hiện ngay lập tức các nút thắt cổ chai về mạng hoặc API của hệ thống đích.

Doanh nghiệp bán lẻ và thương mại điện tử tại Việt Nam có thể học được gì từ mô hình này?

Các doanh nghiệp bán lẻ vừa và nhỏ tại Việt Nam thường duy trì nhiều phần mềm rời rạc (ERP kế toán, phần mềm quản lý kho, sàn thương mại điện tử và CRM). Thay vì thuê ngoài lập trình các cổng kết nối độc quyền đắt đỏ và khó bảo trì, việc dùng một công cụ điều phối luồng mã nguồn mở như n8n giúp chuẩn hóa đường ống dữ liệu, linh hoạt thay đổi logic kinh doanh và tiết kiệm hàng trăm triệu chi phí kỹ thuật.

Does this sound like your business?

Book a 30-minute call for OXMODE to analyze your specific case.

Contact Us