Magento 2 + Google Sheets: alt text cleanup done
Your Magento catalog looks “fine”… until you audit it and realize hundreds of product images have blank alt text. That’s a quiet SEO leak, and it’s also an accessibility problem that tends to show up at the worst possible time (a marketplace review, an ADA/WCAG check, or a sudden traffic drop).
This Magento alt text automation hits eCommerce Managers hardest, but SEO leads and store admins end up cleaning the same mess. The outcome is simple: missing image labels get filled in bulk, consistently, without someone spending their afternoon clicking through product pages.
You’ll set up an n8n workflow that pulls products from Magento 2, finds media entries with empty labels, updates them using the product name, and logs what happened so you can review changes quickly.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Magento 2 + Google Sheets: alt text cleanup done
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get All Product Skus"]
n1@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Code"]
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>HTTP Request"]
n3 --> n4
n4 --> n6
n5 --> n2
n6 --> n2
n2 --> n3
n0 --> n5
n1 --> n0
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n1 trigger
class n3 decision
class n0,n6 api
class n4 code
classDef customIcon fill:none,stroke:none
class n0,n4,n6 customIcon
Why This Matters: Missing Image Alt Text in Magento 2
Alt text feels like a “later” task until you have 500 SKUs, multiple images per SKU, and a backlog created by imports, vendor feeds, or rushed launches. In Magento 2, image alt text is stored as the media gallery “label”, so if that label is empty, you’re leaving search engines and assistive tech with nothing useful. The painful part is the workflow of fixing it: open a product, click images, spot blanks, copy the product name, paste, save, repeat. It’s boring, error-prone, and it steals attention from work that actually grows revenue.
It adds up fast. Here’s where it breaks down in real catalogs.
- Manual fixes become a weeks-long task once you have thousands of images across categories and variants.
- Teams miss edge cases, like older products or SKUs that were bulk-imported before anyone cared about labels.
- Inconsistent wording slips in because three different people write alt text three different ways.
- You don’t get a clean audit trail, so you can’t easily review what changed or prove it was handled.
What You’ll Build: Bulk Alt Text Cleanup + Google Sheets Log
This workflow connects to your Magento 2 store via the REST API, pulls a paginated list of product SKUs, and inspects each product’s media gallery entries. When it finds an image label that’s empty or null, it automatically sets the label to the product’s name (a solid baseline alt text for most catalogs). Then it updates the product back in Magento using the V1/products/:sku endpoint, so the store becomes the source of truth again. Because the workflow runs in batches, you can process large catalogs without trying to do everything in one risky “big bang” run. The result is a cleaner catalog that’s easier to search, easier to use, and less likely to fail a basic accessibility review.
The workflow starts with a manual run (or a schedule if you switch the trigger). It loops through products, checks for images, fills only the missing labels, and pushes updates back to Magento. You end up with consistent alt text coverage without hand-editing product after product.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you have 1,000 products and an average of 3 images each. If checking and fixing one product takes about 2 minutes (open product, click images, edit labels, save), that’s roughly 30+ hours of repetitive work. With this automation, you start the run, let it process in batches, and review results afterward; most teams spend about 15 minutes configuring and maybe another 15 minutes spot-checking. You get the catalog cleaned up without sacrificing a whole week to busywork.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Magento 2 (Adobe Commerce) for product and media gallery data
- Google Sheets to log updates for review
- Magento 2 Bearer Token (get it from your Magento integration/API user)
Skill level: Intermediate. You’ll paste API credentials, confirm Magento endpoints, and test on a small batch first.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A manual (or scheduled) run kicks things off. In the provided version, you click “Execute” in n8n. If you want, you can swap that for a Cron trigger later so it runs every week and catches new gaps.
Magento 2 sends back product SKUs in pages. An HTTP Request node calls your Magento REST API to retrieve a list of products, then splits them into individual items so the workflow can handle them one at a time.
Each product gets checked and cleaned. The workflow loops through products in batches, confirms the product actually has images, and uses a small piece of logic to fill empty image labels with the product name. Honestly, this is the part that removes 90% of the pain, because it’s the repetitive “spot blank, paste name” cycle done automatically.
Magento gets updated, and your log stays readable. A second API request pushes the updated media labels back to the V1/products/:sku endpoint, and you can send results into Google Sheets so your team can review what changed without digging through Magento screens.
You can easily modify the label rule to use a richer template (like “{Product Name} in {Color}”) based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Set up the manual trigger to start the workflow on demand during development and testing.
- Add the Manual Execution Start node as your trigger.
- Leave the default settings as-is for manual runs.
Step 2: Connect the Primary SKU Source
Configure the primary API request that retrieves the SKU list.
- Add the Retrieve Product SKUs node and connect it to Manual Execution Start.
- Configure the HTTP request parameters (URL, method, headers, and auth) for your SKU endpoint.
- Connect Retrieve Product SKUs to Separate Items.
Step 3: Split and Batch the SKU Records
Split the response into individual items and batch them for controlled processing.
- Configure Separate Items to split the SKU list into individual items (use the correct property based on your API response structure).
- Add Iterate Through Records after Separate Items to process records in batches.
- Confirm the loop behavior: Separate Items outputs to Iterate Through Records, then the second output of Iterate Through Records goes to Conditional Check.
Step 4: Add Conditional Logic and Secondary Processing
Filter and transform items before making a secondary API request.
- Set up Conditional Check to evaluate each SKU item and route only qualifying records.
- Connect Conditional Check to Transform Logic and define your data transformation inside the code editor.
- Connect Transform Logic to Secondary API Request and configure the request details for the follow-up API call.
- Connect Secondary API Request back to Iterate Through Records to continue batch processing.
Step 5: Test and Activate Your Workflow
Run a manual test, validate the outputs, then activate for production use.
- Click Execute Workflow to run Manual Execution Start and monitor each node’s output.
- Verify that Retrieve Product SKUs returns data, Separate Items splits items correctly, and Secondary API Request processes transformed records.
- Confirm that Iterate Through Records loops through all records without errors.
- Once validated, toggle the workflow to Active for production use.
Troubleshooting Tips
- Magento 2 Bearer Token credentials can expire or lack access to the products endpoint. If things break, check your Magento integration/API user permissions and regenerate the token first.
- If you’re processing a big catalog in batches, API throttling and network timeouts can happen. Lower the page size and batch size if updates start failing halfway through.
- Product names aren’t always “good” alt text when the name is vague (like “Basic Tee”). If you see weak labels, adjust the transformation logic so it includes one more attribute you already trust (brand, material, or color).
Quick Answers
About 30 minutes if your Magento API access is ready.
No. You’ll mostly connect Magento credentials and confirm the endpoint settings. The included logic is already built into the workflow.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Magento hosting and API usage (usually negligible for internal cleanup runs).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you probably should. You can keep the same Magento pull-and-loop structure, then adjust the “Transform Logic” step so labels use a template (product name + color), or skip certain attribute sets entirely. Some teams only update the “base” image and leave gallery images alone. You can also swap the manual trigger for a Cron schedule and push a summary into Google Sheets at the end of each run.
Most of the time it’s an expired Bearer Token or a token tied to a user without product edit permissions. Update the credential in n8n, then re-test the “Retrieve Product SKUs” request first because it fails earliest. Also confirm the base URL is correct (stores with multiple websites sometimes trip people up), and watch for 401/403 responses in the node output.
A lot.
For Magento catalog cleanup, usually yes. You typically need batching, conditional checks, and a bit of transformation logic, and n8n handles that without turning your automation into a fragile chain of paid steps. It also lets you self-host, which matters when you want unlimited runs for maintenance tasks. Zapier or Make can still work if you only need something tiny, but Magento’s API workflows get complex quickly. If you’re unsure, Talk to an automation expert and you’ll get a straight recommendation.
Once this is in place, alt text stops being a quarterly cleanup project. Run it, review the log, move on.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.