Saltar al contenido

Sistema POS Inteligente con Actualizaciones en Vivo a Telegram y Hojas de Cálculo

Sistema POS inteligente con interfaz web para pedidos, que obtiene datos de productos de Google Sheets, procesa pedidos, guarda transacciones en Google Sheets, genera informes de ventas con IA (OpenRouter) y envía notificaciones por Telegram.

AI 16 nodos 9 tipos conectado
Cargando workflow...

Nodos

Telegram GoogleSheets Webhook RespondToWebhook Wait Code Agent LmChatOpenRouter StickyNote

Herramientas

Telegram Google Sheets OpenRouter AI

Detalles

ID
6714
Nodos
16
Conex.
Tipos
9

Pertenece a:

¿Qué hace este workflow?

Este workflow implementa un Sistema de Punto de Venta (POS) inteligente y totalmente automatizado que optimiza la gestión de pedidos y ventas. Utiliza una interfaz web intuitiva para que los usuarios puedan registrar pedidos, extrayendo la información de productos directamente desde Google Sheets. Cada transacción es procesada y guardada automáticamente en Google Sheets, asegurando un registro contable y operativo preciso y actualizado. Además, el sistema integra capacidades avanzadas de IA a través de OpenRouter para generar informes de ventas perspicaces, ayudando a tomar decisiones estratégicas. Las actualizaciones y notificaciones clave se envían en tiempo real a través de Telegram, manteniendo a los equipos informados al instante sobre el estado de los pedidos y el rendimiento de las ventas. Este sistema reduce drásticamente el trabajo manual, minimiza errores y proporciona una visión 360 grados del negocio, permitiendo una gestión más eficiente y rentable.

¿Cómo funciona?

Este workflow usa 16 nodos conectados con 9 tipos diferentes: Telegram, GoogleSheets, Webhook, RespondToWebhook, Wait y 4 más. La estructura está totalmente conectada — listo para importar.

¿Para quién es?

Diseñado para empresas de Ecommerce y equipos de Operaciones & Finanzas. Nivel intermedio — necesitas familiaridad con n8n. Alto valor de negocio: automatiza una tarea recurrente con impacto directo.

¿Lo quieres en tu empresa?

Lo implementamos por ti end-to-end: integración, deploy, mantenimiento y soporte. Consultoría B2B con Genai Sapiens.

Hablemos de tu proyecto

¿Quieres aprender a hacerlo?

Sprints de 30 días con companion IA + comunidad. Aprende n8n, automatización y agentes IA desde cero o nivel avanzado.

Ver formación Momentum

Workflows similares

\n\n\n"},"typeVersion":1.4},{"id":"da9ca9ef-1767-4fe9-aff2-9e15a7194fd8","name":"Wait for click","type":"n8n-nodes-base.wait","position":[-240,220],"webhookId":"2b00ae48-f8f7-49f5-8237-d50f83ff5aa2","parameters":{"resume":"webhook","options":{},"httpMethod":"POST","responseMode":"responseNode"},"typeVersion":1},{"id":"7e69a7e5-5a31-41b8-9ac2-bae76e807dd1","name":"Respond to click","type":"n8n-nodes-base.respondToWebhook","position":[-40,220],"parameters":{"options":{},"respondWith":"text","responseBody":"=\n\n\n \n Processing Order\n \n \n \n\n\n
\n
Order is successfully processed
\n
You will be redirected shortly...
\n\n\n"},"typeVersion":1},{"id":"2f766abf-2d22-4721-9942-247d5534b482","name":"Format data for sheet","type":"n8n-nodes-base.code","position":[180,40],"parameters":{"jsCode":"// Get data from body\nconst data = $input.first().json.body;\n\n// Parse orderItems and orderTotals\nconst items = JSON.parse(data.orderItems);\n\n// Function to generate unique Sales ID\nfunction generateSalesId() {\n const timestamp = Date.now();\n const random = Math.floor(Math.random() * 10000).toString().padStart(4, '0');\n return `S-${timestamp}-${random}`;\n}\n\n// Get today's date\nconst today = new Date().toISOString().split('T')[0];\n\n// Generate output\nconst salesId = generateSalesId();\nconst output = items.map(item => {\n const discount = Number((item.originalPrice - item.price).toFixed(2));\n return {\n 'SALES ID': salesId,\n 'SALES DATE': today, \n 'SALES CUSTOMER NAME': data.customerName,\n 'SALES PRODUCT NAME': item.name,\n 'SALES CATEGORY NAME': '', // Category data not available yet\n 'SALES PRICE (USD)': item.price,\n 'SALES QTY': item.quantity,\n 'SALES DISCOUNT': discount,\n 'SALES TOTAL': item.total\n };\n});\n\nreturn output.map(item => ({ json: item }));\n"},"typeVersion":2},{"id":"89ac1e1d-3a2d-47b7-b0c4-e0e06a90471e","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[180,420],"parameters":{"text":"=customer name : {{ $json.body.customerName }}\norder items : {{ $json.body.orderItems }}\norder total : {{ $json.body.orderTotals }}\n\nSales report format : \nNew sales! (opening or greetings to the owner )\ncustomer name : \norder details :\nHave a good day (closing)","options":{"systemMessage":"=You are a virtual assistant whose primary task is to create sales reports for business owners.\nWrite in a simple and friendly format. Use emojis to make it more interactive.\nSome item prices are separated by commas.\nFormat all numbers such as prices, subtotal, and total to 2 decimal places only (e.g., 12.97, not 12.969999999999999).\nAvoid using long floating-point numbers.\n\nAvoid using special characters that may break Markdown formatting, such as:\n*, _, [, ], (, ), ~, >, #, +, -, =, {, }, ., !, $.\nUse plain text without special symbols unless necessary.\nDo not use Markdown or HTML formatting."},"promptType":"define"},"typeVersion":2},{"id":"f4b29ac5-8dee-48bc-83a3-136795a447fa","name":"OpenRouter Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[180,600],"parameters":{"model":"google/gemini-2.0-flash-exp:free","options":{}},"credentials":{"openRouterApi":{"id":"5gucapot70b4Qz8b","name":"OpenRouter ASNM"}},"typeVersion":1},{"id":"72a622bc-b3b7-4840-9b08-686c65b482f9","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1760,-440],"parameters":{"width":500,"height":1320,"content":"# Smart POS System with Live Updates to Telegram & Sheets\n\nThis Smart POS (Point of Sale) System template provides a lightweight yet powerful sales management solution. It features a modern web based interface for placing orders, with **real-time integration** to **Google Sheets** and **instant Telegram notifications**, enhanced by **AI-generated reports**. \nIdeal for small businesses, mobile vendors, or anyone who needs a quick and smart POS system.\n\n## ✨ Key Features\n- 🖥️ Modern web interface with product catalog and search\n- 🛒 Cart system with quantity, price, and discount handling\n- 🆔 Unique Sales ID generation for every transaction\n- 📊 Google Sheets integration to store product and sales data\n- 🤖 AI-generated sales summary via OpenRouter\n- 🚀 Instant Telegram notifications for new orders\n\n---\n\n## 🔧 Requirements\n- A Google Sheet to store products and sales data \n 👉 [Use this Google Sheets template to get started](https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEETS_ID/edit?usp=sharing)\n- Telegram Bot Token and User ID \n (Create a bot via [@BotFather](https://t.me/BotFather))\n- OpenRouter API Key \n (Sign up at [openrouter.ai](https://openrouter.ai) and use the LLM model)\n\n---\n\n## ⚙️ Setup Instructions\n1. **Set Up Your Google Sheets**\n - Use the template and fill in product details in the `products` tab\n\n2. **Configure Telegram Bot**\n - Create a bot via BotFather\n - Obtain your Bot Token and Chat ID (message the bot once to get ID)\n\n3. **Set Up AI Agent**\n - In the AI agent node, replace the placeholder with your actual OpenRouter API Key\n\n---\n\n## 🚀 Deploy the Workflow\n1. **Activate** the workflow in n8n\n2. **Open** the webhook URL to access the POS interface\n3. **Enter** product orders and customer details\n4. **Submit** the order\n5. **Receive** an instant Telegram notification with AI-generated sales summary\n6. **Data** is automatically saved to Google Sheets for tracking and analysis\n\n"},"typeVersion":1},{"id":"ae33dc7d-b8c1-483d-a685-370c5b08e61f","name":"Format data for webhook","type":"n8n-nodes-base.code","position":[-740,220],"parameters":{"jsCode":"// Get all input data\nconst input = $input.all();\n\n// Extract product data columns\nconst productId = input.map(item => item.json[\"PRODUCT ID\"]);\nconst productName = input.map(item => item.json[\"PRODUCT NAME\"]);\nconst productImage = input.map(item => item.json[\"PRODUCT IMAGE\"]);\nconst productCategoryName = input.map(item => item.json[\"PRODUCT CATEGORY NAME\"]);\nconst productPriceUsd = input.map(item => item.json[\"PRODUCT PRICE (USD)\"]);\nconst productDiscount = input.map(item => item.json[\"PRODUCT DISCOUNT\"]);\n\n// Return in JSON string format\nreturn [{\n json: {\n // Product data\n productId: JSON.stringify(productId),\n productName: JSON.stringify(productName),\n productImage: JSON.stringify(productImage),\n productCategoryName: JSON.stringify(productCategoryName),\n productPriceUsd: JSON.stringify(productPriceUsd),\n productDiscount: JSON.stringify(productDiscount),\n\n // Webhook URL (if needed for redirect or resubmit)\n webhookUrl: '{{ $json.webhookUrl }}',\n resumeWebhookUrl: '{{ $resumeWebhookUrl }}'\n }\n}];\n"},"typeVersion":2},{"id":"7b344857-b997-4882-94c9-770c19df9394","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-540,40],"parameters":{"color":2,"width":640,"height":340,"content":"- Creates POS interface in HTML format\n- Receives order data from HTML form submitted by user using POST method"},"typeVersion":1},{"id":"570f22fa-08aa-4b1f-8e84-de57f893f90f","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-1220,40],"parameters":{"width":640,"height":340,"content":"- Provides webhook endpoint accessible from browser\n- Reads and retrieves product data from Google Sheets\n- Data is formatted and prepared for use in POS frontend or subsequent response."},"typeVersion":1},{"id":"a873b6fd-a22c-46c6-a6aa-0a88188df4e0","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[140,-120],"parameters":{"color":4,"width":500,"height":340,"content":"- Creates sales data in format suitable for Google Sheets.\n- Saves formatted sales results to sales sheet in Google Sheets file."},"typeVersion":1},{"id":"28e4314f-7883-4517-95f6-3653674085a2","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[140,300],"parameters":{"color":5,"width":500,"height":420,"content":"- Receives order data, converts it to business owner-friendly sales report (using LLM), then sends the report to Telegram."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"5be9223c-a7a3-4295-a853-a7776c722d17","connections":{"AI Agent":{"main":[[{"node":"Send a text message","type":"main","index":0}]]},"Wait for click":{"main":[[{"node":"Respond to click","type":"main","index":0}]]},"Respond to click":{"main":[[{"node":"AI Agent","type":"main","index":0},{"node":"Format data for sheet","type":"main","index":0}]]},"Get products data":{"main":[[{"node":"Format data for webhook","type":"main","index":0}]]},"Start the webhook":{"main":[[{"node":"Get products data","type":"main","index":0}]]},"Respond to Webhook":{"main":[[{"node":"Wait for click","type":"main","index":0}]]},"Format data for sheet":{"main":[[{"node":"Append or update row in sheet","type":"main","index":0}]]},"OpenRouter Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Format data for webhook":{"main":[[{"node":"Respond to Webhook","type":"main","index":0}]]}}}