Automate Product Label Generation With N8n
detail.loadingPreview
This n8n workflow automates the process of generating product labels by fetching detailed product information and associated fabric roll data. It streamlines inventory and production processes by ensuring accurate and on-demand label creation.
About This Workflow
This n8n workflow is designed to automate the generation of product labels, a critical step in inventory and production management. It kicks off when a 'emitirEtiqueta' webhook is triggered, typically by a request to print labels for specific product batches. The workflow then retrieves essential product details, including its code, description, brand, size (gradex/gradey), fabric width, and composition, from a MySQL database. Simultaneously, it fetches configuration settings for printing and details about associated fabric rolls from a PostgreSQL database. Finally, it merges this information to provide a comprehensive dataset ready for label printing, ensuring efficiency and accuracy in your operations.
Key Features
- Automated Data Fetching: Seamlessly retrieves product details, fabric information, and printing configurations from multiple data sources.
- Dynamic Querying: Utilizes dynamic SQL queries to fetch specific product information based on incoming webhook requests.
- Data Integration: Merges data from MySQL and PostgreSQL databases to create a complete dataset for label generation.
- Webhook Triggered: Initiates the label generation process via a simple HTTP POST request to a dedicated webhook endpoint.
How To Use
- Configure Webhook: Set up the 'emitirEtiqueta' node to receive POST requests at the '/emitirEtiqueta' endpoint. Ensure the incoming request body contains
id_produto_gradeandrolos(withobjectIdfor each roll). - Set Printing Configuration: Configure the 'PegarConfiguracaoImpressao' node with the correct URL and Parse Application ID to fetch printing settings.
- Define Product Data Query: In the 'dadosProduto' node, customize the MySQL query to accurately retrieve product information based on the
id_produto_gradereceived from the webhook. Pay close attention to the database connection and table names. - Retrieve Fabric Roll Data: Configure the 'dadosRolo' node with your PostgreSQL credentials and ensure the query correctly fetches details for the
idRolospassed from the 'trataRetorno' node. - Process Roll IDs: The 'trataRetorno' function node is pre-configured to extract
objectIds from the incoming 'rolos' data and pass them to the 'dadosRolo' node. - Merge Data: The 'roloProduto' node is set to merge data from 'dadosRolo' and 'dadosProduto' based on
id_movimentacao_detalhe(ensure this is correctly mapped or adjusted if needed). This merged data can then be passed to subsequent nodes for label generation or further processing.
Apps Used
Workflow JSON
{
"id": "8c2af6d5-4787-4245-8bbe-8e749e941e1e",
"name": "Automate Product Label Generation With N8n",
"nodes": 5,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 8c2af6d5-4787...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.