Skip to main content

Magento 2: auto-fix missing image alt tags with product name

Workflow preview

Workflow preview
100%
Magento 2: auto-fix missing image alt tags with product name preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n workflow connects to a Magento 2 store and automatically updates product images that are missing alt tags (labels). It fetches product data via the Magento 2 REST API, identifies media gal...

Best for

  • Content Creation automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.stickynote, n8n-nodes-base.manualtrigger, n8n-nodes-base.splitinbatches, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.splitout

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Kanaka Kishore Kandregula.

Original n8n.io source

1.1 Workflow description

Title
Magento 2: auto-fix missing image alt tags with product name
Workflow name
Magento 2: auto-fix missing image alt tags with product name

This n8n workflow connects to a Magento 2 store and automatically updates product images that are missing alt tags (labels). It fetches product data via the Magento 2 REST API, identifies media gallery entries with empty or null labels, and updates them by assigning the corresponding product name as the alt text.

This is useful for:
  • Improving SEO and accessibility by ensuring all product images have descriptive alt tags.
  • Automating manual content cleanup tasks for product catalogs.
  • Keeping your store compliant with basic accessibility and usability standards.
⚙️ How It Works
  • Manual Trigger
  • The workflow is designed to run manually or on a schedule (can be modified).
  • Fetch Product Data
  • The Get All Product Skus HTTP node pulls a paginated list of products using Magento's REST API
  • The Split Out and Loop Over Items nodes iterate through each product.
  • Filter Products With Images
  • The If node checks if a product has at least one image.
  • Label Missing Alt Texts
  • The Code node inspects each image's label field. If it's empty or null, it sets it to the product’s name.
  • Update Back to Magento 2
  • The HTTP Request (PUT) node updates each product using Magento’s V1/products/:sku endpoint, sending the updated image labels back to the store.
🧠 Use Case

Problem: Magento 2 stores often have hundreds or thousands of product images, and it’s common to miss assigning alt text (label) to all of them—especially for bulk-imported or older products.

Solution: This workflow ensures every product image has an alt label (minimum: product name), thus improving:
  • Search engine optimization (SEO)
  • Product discovery
  • Accessibility compliance (WCAG)
  • Store quality score (for marketplaces or audits)
🧪 Requirements
  • Magento 2 REST API access
  • A valid Bearer Token for Magento 2
  • Magento endpoint URL
  • Basic understanding of how your store handles image paths and media entries
🔒 Credentials Required

Magento 2 Bearer Auth: Set up as a credential in n8n using your Magento 2 API access token.

🛠️ Modifications You Can Make
  • Increase the pageSize in the GET request to process more products per run.
  • Set up a Cron trigger to run this regularly.
  • Update other missing fields like position, disabled, or types programmatically.
  • Include logging or email notifications after each batch update.
🧰 Helpful For
  • Magento Developers & Store Managers
  • SEO/Accessibility Compliance Teams
  • Automation Engineers managing eCommerce workflows
📂 Category

E-commerce → Magento 2 (Adobe Commerce)

💬 Need Help?

💡 Having trouble setting it up or want to customize this workflow further? Feel free to reach out — I’m happy to help with setup, customization, or Magento 2 API integration issues.

Contact: Author

👤 Author

Kanaka Kishore Kandregula Certified Magento 2 Developer https://gravatar.com/kmyprojects https://www.linkedin.com/in/kanakakishore

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Get All Product Skus

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 2 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 6 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 7 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 10 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Magento 2: auto-fix missing image alt tags with product name
Complexity intermediate
Nodes 11
Categories Content Creation
Author Kanaka Kishore Kandregula
Published 30 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6715/6715.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Magento 2: auto-fix missing image alt tags with product name do?

This n8n workflow connects to a Magento 2 store and automatically updates product images that are missing alt tags (labels). It fetches product data via the Magento 2 REST API, identifies media gal...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation use case.