Automatische Erzeugung von Produktbeschreibungen für Adobe Commerce (Magento 2)
Dies ist ein Miscellaneous, Multimodal AI-Bereich Automatisierungsworkflow mit 13 Nodes. Hauptsächlich werden Set, Code, Merge, HttpRequest, ManualTrigger und andere Nodes verwendet. Automatisierte Erstellung von Produktbeschreibungen für Adobe Commerce/Magento mit Azure OpenAI
- •Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
- •OpenAI API Key
Verwendete Nodes (13)
Kategorie
{
"id": "LVoDtVFQ069sOYcC",
"meta": {
"instanceId": "965bb8e7bf93f91108971d05aa397ffa90b643c7ff8c03d51df51a28ffdc99dc",
"templateCredsSetupCompleted": true
},
"name": "Automated Product Description Generation for Adobe Commerce (Magento 2)",
"tags": [],
"nodes": [
{
"id": "7272f57f-3ebd-4a5d-a3ae-1c6a16e0a140",
"name": "Bei Klick auf 'Workflow testen'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1504,
16
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1e10c1ee-3777-466e-ab0f-a211046f4114",
"name": "Konfigurierbares speichern",
"type": "n8n-nodes-base.httpRequest",
"position": [
64,
16
],
"parameters": {
"url": "=https://www.example.com/rest/V1/products/{{ encodeURIComponent($('get Product without description').first().json.items[0].sku) }}",
"method": "PUT",
"options": {},
"jsonBody": "={\n \"product\": {\n \"custom_attributes\": [{\n \"attribute_code\": \"description\",\n \"value\": \"{{ $json.description.replaceAll('\\n',' ').replaceAll('\"\"','\\\\\"') }}\"\n }]\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "magento2Api"
},
"credentials": {
"magento2Api": {
"id": "yGyqOmSuvrgMUFB9",
"name": "Magento 2 PROD"
}
},
"typeVersion": 4.2
},
{
"id": "5373fa9b-e857-435f-a3ae-08978e7717df",
"name": "Beschreibung festlegen",
"type": "n8n-nodes-base.set",
"position": [
-128,
16
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "c21f389d-4104-4a6f-b616-324abb221798",
"name": "description",
"type": "string",
"value": "={{ $json.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e127791d-b564-4c23-86a2-a55cbe1bad49",
"name": "Einfache LLM-Kette",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-528,
16
],
"parameters": {
"text": "=Write an English product description based on this Magento2 attributes. Please use html paragraphs and breaks only. Ensure the text is grammatically correct, natural, and tailored to the ... market. Use terminology that is common in this sector, and avoid overly literal or informal style. \n\nWrite in a consistent style suitable for webshop product descriptions: professional, clear, and customer-oriented, while keeping a persuasive tone aimed at ...\n\nAdditionally, make the text SEO-friendly : include relevant keywords naturally without unnecessary repetition, and ensure the text reads smoothly while supporting search visibility.\n\nHere is the Magento product: {{ JSON.stringify($json) }}",
"batching": {},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "487315aa-572d-40a4-ba61-a091b8157061",
"name": "Azure OpenAI-Chat-Modell",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
-528,
192
],
"parameters": {
"model": "model-router",
"options": {}
},
"credentials": {
"azureOpenAiApi": {
"id": "Skyi4ZtQphRSSRSw",
"name": "Azure Open AI account 4"
}
},
"typeVersion": 1
},
{
"id": "5198d2bb-89db-401a-bf35-21884378c2f5",
"name": "Warten bis Knoten bereit",
"type": "n8n-nodes-base.merge",
"position": [
-1040,
16
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "3807a3cf-d7aa-4315-8d25-cc6386b1181a",
"name": "Produkt ohne Beschreibung abrufen",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1264,
-128
],
"parameters": {
"url": "=https://www.example.com/rest/V1/products",
"options": {},
"sendQuery": true,
"authentication": "predefinedCredentialType",
"queryParameters": {
"parameters": [
{
"name": "searchCriteria[filter_groups][0][filters][0][field]",
"value": "description"
},
{
"name": "searchCriteria[filter_groups][0][filters][0][condition_type]",
"value": "null"
},
{
"name": "searchCriteria[pageSize]",
"value": "1"
}
]
},
"nodeCredentialType": "magento2Api"
},
"credentials": {
"magento2Api": {
"id": "yGyqOmSuvrgMUFB9",
"name": "Magento 2 PROD"
}
},
"typeVersion": 4.2
},
{
"id": "9c551919-8e15-44bb-937b-3ae06dc5ffc2",
"name": "Attribute vorbereiten",
"type": "n8n-nodes-base.code",
"position": [
-720,
16
],
"parameters": {
"jsCode": "// Assuming the JSON data is stored in a variable called \"jsonData\"\nconst product = $(\"get Product without description\").first().json.items[0];\nconst data = $('Get attributes and options').first().json.items; // Extract the items containing attributes and options\nconst customAttributes = product.custom_attributes; // Extract the custom attributes\n//console.log(customAttributes);\n// Create a map of attribute_code to their options (for select-type attributes)\nconst attributeOptionsMap = {};\nfor (const attribute of data) {\n if (attribute.options) {\n attributeOptionsMap[attribute.attribute_code] = attribute.options;\n }\n}\n// Loop over all custom attributes to check if they exist in the attributeOptionsMap\nfor (const customAttribute of customAttributes) {\n const attributeCode = customAttribute.attribute_code;\n //console.log(attributeCode);\n\n // Check if this custom attribute exists in the attributeOptionsMap (i.e., it has options)\n if (attributeOptionsMap[attributeCode]) {\n \n const attributeOptions = attributeOptionsMap[attributeCode];\n const value = customAttribute.value;\n //console.log(value);\n\n // Find the label corresponding to the current value\n const matchingOption = attributeOptions.find(option => option.value === value);\n if (matchingOption) {\n // Replace the value with the label\n customAttribute.value = matchingOption.label;\n }\n }\n}\n// After this, customAttributes will have all applicable values replaced by their labels\nproduct.custom_attributes = customAttributes;\nreturn product;"
},
"typeVersion": 2
},
{
"id": "88d7173a-e816-4530-87e5-6be43f44b5b2",
"name": "Attribute und Optionen abrufen",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1264,
144
],
"parameters": {
"url": "https://www.example.com/rest/V1/products/attributes?searchCriteria[filter_groups][0][filters][0][field]=frontend_input&searchCriteria[filter_groups][0][filters][0][value]=select&fields=items[frontend_input,attribute_code,default_frontend_label,options]",
"options": {},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "magento2Api"
},
"credentials": {
"magento2Api": {
"id": "yGyqOmSuvrgMUFB9",
"name": "Magento 2 PROD"
}
},
"executeOnce": true,
"typeVersion": 4.2
},
{
"id": "50edd904-37c6-44cb-860c-023041f51892",
"name": "Haftnotiz",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1552,
-336
],
"parameters": {
"color": 4,
"width": 720,
"height": 704,
"content": "### Step 1: Get Product Information from Magento\n- Retrieves a single product that is missing a description. \n- Reads all product attributes through the Magento API. "
},
"typeVersion": 1
},
{
"id": "7f7d74f8-2203-4268-a342-193b2c01eac9",
"name": "Haftnotiz1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-800,
-336
],
"parameters": {
"color": 6,
"width": 560,
"height": 704,
"content": "### Step 2: Generate Description with LLM\n- Resolves attribute options into **human-readable labels** (e.g. size = `3` → \"Large\"). \n- Prepares structured product data for use in the LLM prompt. \n- Passes the **readable product attributes** to an **Azure OpenAI** model. \n- Uses a defined **prompt** to instruct the LLM on how to write the description. \n- Produces a clear, engaging product description that can be tailored to brand or SEO needs. \n- Allows easy replacement of Azure OpenAI with any other LLM node in n8n. "
},
"typeVersion": 1
},
{
"id": "3eef5219-71a7-4409-a135-658c8fe42a5c",
"name": "Haftnotiz2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
-336
],
"parameters": {
"color": 2,
"width": 560,
"height": 704,
"content": "### Step 3: Save Product in Magento\n- Takes the generated description and updates the product via the **Magento 2 API**. \n- Ensures the new description is stored and visible on the webshop. \n- Supports updating other fields if desired (e.g. short description, meta description). \n- Confirms the product is enriched without requiring manual editing. "
},
"typeVersion": 1
},
{
"id": "62670ee5-58ad-45fc-b07e-f6d0885c4b98",
"name": "Haftnotiz3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2464,
-336
],
"parameters": {
"width": 880,
"height": 1664,
"content": "# 🛍️ Automated Product Description Generation for Adobe Commerce (Magento 2)\n\n## Description\nThis n8n template demonstrates how to automatically generate **product descriptions** for items in **Adobe Commerce (Magento 2)** that are missing one. \n\nThe workflow retrieves product data, converts raw attribute values (like numeric IDs) into **human-readable labels**, and passes the enriched product data to an **LLM** (Azure OpenAI by default). The LLM generates a compelling description, which is then saved back to Magento using the API. \n\nThis ensures all products have professional descriptions without manual writing effort.\n\n**Use cases include:** \n- Auto-generating missing descriptions for catalog completeness. \n- Creating consistent descriptions across large product datasets. \n- Reducing manual workload for content managers. \n- Tailoring descriptions for SEO and customer readability. \n\n---\n\n## Good to know\n- All **attribute options** are resolved to human-readable labels before being sent to the LLM. \n- The flow uses **Azure OpenAI**, but you can replace it with **OpenAI, Anthropic, Gemini, or other LLM providers**. \n- The LLM prompt can be **customised** to adjust tone, length, SEO-focus, or specific brand style. \n- Works out-of-the-box with Adobe Commerce (Magento 2) APIs, but can be adapted for other ecommerce systems. \n\n---\n\n## How it works\n1. **Get Product from Magento** \n - Retrieves a product that has no description. \n - Collects all product attributes.\n\n2. **Generate Description with LLM** \n - Resolves attribute option IDs into **human-readable values** (e.g. `color_id = 23 → \"Red\"`). \n - Passes the readable product attributes to an **Azure OpenAI model**. \n - The LLM creates a clear, engaging product description. \n - The prompt can be customised (e.g. SEO-optimized, short catalog text, or marketing style). \n\n3. **Save Description in Magento** \n - Updates the product via the **Magento API** with the generated description. \n - Ensures product data is enriched and visible in the webshop immediately. \n\n---\n\n## How to use\n- Configure your **Magento 2 API credentials** in n8n. \n- Replace the **Azure OpenAI** node with another provider if needed. \n- Adjust the **prompt** to match your brand’s tone of voice. \n- Run the workflow to automatically process products missing descriptions. \n\n---\n\n## Requirements\n- ✅ n8n instance (self-hosted or cloud) \n- ✅ Adobe Commerce (Magento 2) instance with API access \n- ✅ Azure OpenAI (or other LLM provider) credentials \n- (Optional) Prompt customisations for SEO or brand voice \n\n---\n\n## Customising this workflow\nThis workflow can be adapted for: \n- **Other attributes**: Include or exclude attributes (e.g. only color & size for apparel). \n- **Different LLMs**: Swap Azure OpenAI for OpenAI, Anthropic, Gemini, or any supported n8n AI node. \n- **Prompt tuning**: Adjust instructions to generate shorter, longer, or SEO-rich descriptions. \n- **Selective updates**: Target only specific categories (e.g. electronics, fashion). \n- **Multi-language support**: Generate product descriptions in multiple languages for international shops. \n\n---\n"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "11259216-9fa3-4fea-b872-e36c88d412c8",
"connections": {
"e127791d-b564-4c23-86a2-a55cbe1bad49": {
"main": [
[
{
"node": "5373fa9b-e857-435f-a3ae-08978e7717df",
"type": "main",
"index": 0
}
]
]
},
"5373fa9b-e857-435f-a3ae-08978e7717df": {
"main": [
[
{
"node": "1e10c1ee-3777-466e-ab0f-a211046f4114",
"type": "main",
"index": 0
}
]
]
},
"1e10c1ee-3777-466e-ab0f-a211046f4114": {
"main": [
[],
[]
]
},
"9c551919-8e15-44bb-937b-3ae06dc5ffc2": {
"main": [
[
{
"node": "e127791d-b564-4c23-86a2-a55cbe1bad49",
"type": "main",
"index": 0
}
]
]
},
"5198d2bb-89db-401a-bf35-21884378c2f5": {
"main": [
[
{
"node": "9c551919-8e15-44bb-937b-3ae06dc5ffc2",
"type": "main",
"index": 0
}
]
]
},
"Azure OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "e127791d-b564-4c23-86a2-a55cbe1bad49",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"88d7173a-e816-4530-87e5-6be43f44b5b2": {
"main": [
[
{
"node": "5198d2bb-89db-401a-bf35-21884378c2f5",
"type": "main",
"index": 1
}
]
]
},
"3807a3cf-d7aa-4315-8d25-cc6386b1181a": {
"main": [
[
{
"node": "5198d2bb-89db-401a-bf35-21884378c2f5",
"type": "main",
"index": 0
}
]
]
},
"7272f57f-3ebd-4a5d-a3ae-1c6a16e0a140": {
"main": [
[
{
"node": "88d7173a-e816-4530-87e5-6be43f44b5b2",
"type": "main",
"index": 0
},
{
"node": "3807a3cf-d7aa-4315-8d25-cc6386b1181a",
"type": "main",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten - Verschiedenes, Multimodales KI
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
JKingma
@jkingmaDiesen Workflow teilen