The Engineering City Journal
Issue 20/2025
Setting the pages…
ECJ 20/2025

The Engineering City Journal

Issue 20/2025 · Yerevan, November, 2025

The purpose of the Journal is to disseminate knowledge, experience, and best practice in engineering & manufacturing. The articles are written by practicing professionals in the Engineering City (EC) in Yerevan. They cover issues relevant to their projects, operations, and organizations. The articles address the challenges of the time. As such, the Journal is also a chronicle of the evolution of the EC, its companies, and its individuals. It is the aim of the Journal to advance the engineering & manufacturing practice, to enrich the engineering & manufacturing community, and to contribute to the worldwide discourse in engineering & manufacturing.

Published by the Engineering Association

The Engineering City JournalIssue 20/2025Published by the Engineering AssociationYerevan, November, 2025
End of issueThe Engineering City JournalIssue 20/2025Table of ContentsFront coverOriginal PDF

Table of Contents

N8N Popularization CornerSearching for Parts in the Inventory Database using n8n and AIN8N Ultimate Cheat SheetEC Community CornerWorking for the Valley, Working for the City
N8N Popularization Corner

Searching for Parts in the Inventory Database using n8n and AI

English translation

AI-Based Warehouse Inventory Analysis System (Warehouse AI)

1. Introduction

This report contains a detailed technical analysis of the Warehouse AI system, designed for intelligent search and provision of information on warehouse stocks of electronic components and other materials. The system combines a web interface, server logic in Python, a database in Google Sheets and a complex workflow on the n8n platform using artificial intelligence agents (AI Agents).

The main task of the system is to replace manual search and help engineers obtain information on the availability and characteristics of components in the warehouse quickly and clearly.

2. System Architecture

The system architecture consists of three key components:

  1. Frontend (Client): Web interface in HTML/CSS/JavaScript (index.html).

  2. Backend (Server): A simple HTTP server in Python (Server.py), which serves the frontend and static data.

  3. Operating logic and AI (Workflow): An automated workflow on the n8n platform (WerhouseAI.json), which processes requests, interacts with the database and generates answers using AI.

2.1. Frontend (index.html)

The frontend is a single-page application (SPA) with a chat interface.

Element Purpose

Webhook

Field for entering the address of the n8n webhook to which requests are sent.

URL

First-level filter (for example, Electronic (SMT), Product). Loaded from

Domain (L1)

/api/domains.

Category

Second-level filter (for example, Resistor, Connector). Loaded from /api/categories.

(L2)

When the engineer enters a request in plain words (for example, "capacitor 100nF 25V,

Input field

package 0805").

Collects the selected filters and the request and sends them as a JSON payload to

Logic

the configured Webhook URL.

Image 1: User interface

2.2. Backend (Server.py)

The Python server (http.server module) acts as a static file server and a simple API for managing filters.

API Endpoint Method Purpose

/index.html GET Serves the main interface file (template/index.html).

API Endpoint Method Purpose

/api/domains GET Returns the list of domains from data/domain.json.

/api/categories GET Returns the list of categories from data/category.json.

/api/domains POST Adds a new domain to data/domain.json.

/api/categories POST Adds a new category to data/category.json.

The server keeps the frontend running and allows the filter lists (Domain and Category) to be updated dynamically without restarting the main AI workflow.

Image 2: Project file structure

3. The Workflow on n8n

All the main logic of the system is implemented as an n8n workflow, which processes each request from start to finish.

Image 3: General workflow diagram

3.1. Data Processing Stages

Stage n8n Node Description

Webhook Entry point. Accepts a POST request at /webhook/inventory-analysis,

1. Input

Trigger containing filters and query.

Extract Extracts and standardizes filters (domain, category) and query from the request

2. Parsing Query

body. Parameters

Load 3. Data Connects to the Google Sheets API. Loads data from the Inventory sheet Inventory Loading Stock of the document. Data

Key stage. Here the domain and category filters are applied. Field names are normalized. The data are sorted:

4. Filtering Filter and

first the items with Total > 0 (those in stock), then by descending and Processing Process Data quantity. Finally, the data are formatted into a text context that will be passed to the AI.

Image 4: Initial workflow stages (Trigger, Parsing, Loading, Filtering)

3.2. AI Agent Branches

The workflow includes three AI agent branches. At present only one is active, which provides flexibility for testing and future changes.

Name

Branch Status Purpose and Logic

(n8n Note)

Main workflow. Uses the full component description (Description (Comments)). Ամբողջ Response format: SUMMARY → IN STOCK (max. 5) Active Description ACTIVE → OUT OF STOCK (max. 4) → NOTES. (Comments) S. Uses technical language and a temperature of 0.1 for stability. Always states the exact MPN.

MPN և Fallback option. Uses a shortened Alternative ֆիքսված DISABLED description (up to 90 characters). Intended for Disc... M. testing an alternative version of the AI agent.

Experimental branch. Testing without Առանց MPN Experimental DISABLED mandatory MPN and with alternative K. formatting logic.

Image 5: Active AI agent branch
Image 6: Alternative AI agent branch
Image 7: Experimental AI agent branch

3.3. Final Processing and Sending

Stage n8n Node Description

Format Single exit point. The response text is extracted from the active AI agent. 5. Final The text is cleaned of Markdown, quotation marks and extra formatting.

Formatting

Response The final JSON object is prepared: {reply: 'response_text'}.

Returns the final JSON response via Webhook Response. Send Sets the required CORS headers (Access-Control-Allow-

6. Sending

Response Origin: *) for interaction with the frontend. Completes the request-response cycle with HTTP status 200.

Image 8: Final processing and sending of the response

4. Technical Details and Features

4.1. Context for the AI Agent

The AI agent receives the filtered and sorted data as a structured text context. The data processing ensures that the agent works only with relevant and up-to-date items.

Key fields passed to the AI:

Item MPN (Manufacturer Part Number) Description (Comments) Manufacturer Total (Остаток)

4.2. Strict Response Formatting Rules

To make the response as useful as possible for the engineer, the prompt of the active AI agent strictly limits the response format:

  • Format: Plain text, without Markdown, tables or quotation marks.

  • Structure: SUMMARY → BEST MATCHES — IN STOCK → MORE OPTIONS — OUT OF STOCK → NOTES.

  • Brevity: Each item must be described in one line (up to ~90 characters), focused on key technical characteristics (Pitch, SMT/THT, package, number of pins).

  • Priority: A maximum of 9 items in total (5 in stock + 4 not in stock).

4.3. Use of AI Models

The active branch uses the OpenAI GPT-4o-mini model with a temperature of 0.1. A low temperature (close to 0) was chosen to minimize "hallucinations" and ensure the most stable and factual answers, which is a critical requirement when working with engineering data.

5. Conclusion

The Warehouse AI system is a highly efficient solution for intelligent access to WMS data. The integration of the frontend, backend and n8n workflow with AI agents turns a complex search of the inventory database into an intuitive dialogue.

Key advantages:

  • Accuracy: Strict filtering and formatting of the data before they are fed to the AI.

  • Reliability: Use of the stable GPT-4o-mini model with a low temperature.

  • Engineering orientation: A response format focused on MPN, availability and brief technical characteristics, ideally suited to engineers.

The system is ready for scaling and further development. In particular, the alternative AI agent branches can be activated and tested to optimize the brevity or format of the response.

Note: Since the answers are generated by artificial intelligence, occasional inaccuracies are possible. Critical data should be double-checked before use in design or production work.

N8N Popularization Corner

N8N Ultimate Cheat Sheet

English translation

EC Community Corner

Working for the Valley, Working for the City

English translation

By Rama, EA

When you ask someone who works in one of the Silicon Valley companies “where he works?”, the answer most often will be - “I work for the Valley”. They may or may not mention the particular company where they work in, but in the majority of the cases, they identify themselves and the company that they work in as part of the Silicon Valley community. This is quite powerful.

The same answer could be for all who work in the EC companies. The answer to where we work may be simply – “I work for the City”.

Why is this powerful?

Because, first of all, it indicates that there is a community – a community which is much bigger than the companies.

Secondly, this means that there is mobility between the companies in the community. Meaning, that people can easily move between companies in the community because they all share a similar mission, similar values, similar professions, and comraderie.

Thirdly, when people move between companies they bring with them ideas and practices from the previous company, and learn about ideas and practices from the new company - as such enriching both the companies and themselves with these new ideas and practices.

And forthly, it is a safety net for both the people and the companies in the community. All companies work in the marketplace. Market places are dynamic. So, some companies may have a good growth some times, and slower growth in other times. And vice-versa, some other companies may feel a slower growth or a negative growth now, yet may move to growth in other times. When individuals have the ability to easily move from one company to another, two things get secured – the individual always has a job, and the community and the companies do not lose the individual. In this sense, the community protects both the individual and the company.

So, next time someone asks you where you work, you can bravely say that – “you work for the City”.

I think that this would be very powerful.

© 2025 The Authors of the articles

All materials contained in The Engineering City Journal may be used with reference to the Authors.

For feedback on the Journal, its content, and its articles please send to info@engineeringcity.am.

To submit articles, please send to info@engineeringcity.am. Articles can be in any language.