Back to Catalog

Automate your Magento 2 weekly sales & performance reports

Kanaka Kishore KandregulaKanaka Kishore Kandregula
108 views
2/3/2026
Official Page

Automatically fetches last week’s Magento 2 orders, summarises sales and product performance, logs the data to Google Sheets, and emails a polished report β€” all without logging into admin or buying extra modules.

Perfect for store owners and agencies.

βœ… What This Workflow Does:

This workflow automatically fetches the last 7 days of orders from your Magento 2 store, summarizes key metrics (orders, revenue, products sold), groups product performance data, generates a Google Sheet with two tabs (Weekly Summary & Product Breakdown), and emails the report to your team in a modern dashboard-style HTML format β€” all without ever logging into Magento admin.

πŸ”§ Modules Used:

πŸ•’ Schedule Trigger βš™οΈ Code (JavaScript) 🌐 HTTP Request πŸ“Š Google Sheets βœ‰οΈ Gmail (HTML Email with custom design)

πŸ’Ό Use Cases:

  • E-commerce store managers who want weekly sales snapshots without logging into Magento 2.
  • Agencies managing multiple Magento clients and reporting to them weekly.
  • Business owners who want automated insights without paying for extra reporting modules.
  • Marketing or growth teams that need product-wise performance regularly in Google Sheets.

πŸ”’ Credentials Required:

  • Magento 2 API (Bearer Token)
  • Google Sheets OAuth2
  • Gmail OAuth2 (for sending HTML email reports)

πŸ“‚ Category:

E-commerce / Magento 2 / Reporting / Automation

✨ Why This Saves Hours:

This workflow replaces manual Magento report exports, repetitive data cleanup, and weekly email formatting. Store managers often waste 1–2 hours/week collecting data β€” now it takes 0 minutes. Just set it and forget it. You don’t need to buy reporting extensions, log into the admin, or manually touch a spreadsheet again.

🀝 Need a Custom Workflow?

If you need this tailored for your own workflow, store, or client β€” πŸ“© Let’s connect. I build custom, high-performance n8n automations for e-commerce, growth, and reporting.

Contact: Author

πŸ‘€ Author

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

n8n Workflow: Scheduled Data Extraction and Reporting

This n8n workflow is designed to automate the process of fetching data from an external API, processing it, and then storing it in Google Sheets, with an optional email notification. It's ideal for generating regular reports or syncing data between systems.

What it does

This workflow performs the following steps on a scheduled basis:

  1. Triggers on a Schedule: The workflow starts at predefined intervals (e.g., daily, weekly, monthly).
  2. Makes an HTTP Request: It calls an external API endpoint to retrieve data.
  3. Processes Data with Custom Code: A Code node is used to transform or manipulate the data received from the HTTP request. This could involve filtering, reformatting, or calculating new values.
  4. Writes Data to Google Sheets: The processed data is then appended or updated in a specified Google Sheet.
  5. Sends Email Notification (Optional): After the data is written to Google Sheets, an email can be sent via Gmail to notify stakeholders or confirm the report generation.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • API Endpoint: Access to an API that provides the data you wish to process.
  • Google Account: A Google account with access to Google Sheets.
  • Gmail Account (Optional): A Gmail account if you wish to send email notifications.
  • n8n Credentials: Configured credentials for:
    • Google Sheets (OAuth2 recommended)
    • Gmail (OAuth2 recommended)

Setup/Usage

  1. Import the Workflow:
    • Download the provided JSON file.
    • In your n8n instance, click "Workflows" in the left sidebar.
    • Click "New" and then "Import from JSON".
    • Paste the JSON content or upload the file.
  2. Configure Credentials:
    • Locate the "Google Sheets" and "Gmail" nodes.
    • Click on each node and select or create the necessary credentials for your Google account.
  3. Configure HTTP Request Node:
    • Open the "HTTP Request" node.
    • Set the URL, Method, and any Headers or Body parameters required by your API.
  4. Configure Code Node:
    • Open the "Code" node.
    • Modify the JavaScript code to perform the desired data transformations based on the output of your HTTP Request node and the input format required by Google Sheets.
  5. Configure Google Sheets Node:
    • Open the "Google Sheets" node.
    • Specify the Spreadsheet ID and Sheet Name where you want to write the data.
    • Configure the Operation (e.g., "Append Row", "Update Row") and map the data fields from the previous nodes to your sheet columns.
  6. Configure Gmail Node (Optional):
    • Open the "Gmail" node.
    • Set the To email address, Subject, and Body of the email. You can use expressions to include dynamic data from previous nodes in the email.
  7. Configure Schedule Trigger:
    • Open the "Schedule Trigger" node.
    • Set your desired schedule for the workflow to run (e.g., every Monday at 9 AM).
  8. Activate the Workflow:
    • Save the workflow.
    • Toggle the "Active" switch in the top right corner of the workflow editor to enable it.

Related Templates

Automatically disable unsold Magento 2 products after 1 year with Gmail approval

This workflow is designed for Magento 2 merchants who want to automatically identify and deactivate products that haven't been sold in the past 12 months, helping to maintain a clean and optimised catalog. This automation includes order analysis, product comparison, management approval, and automated product deactivation, with full reporting and transparency. πŸ”§ What It Does 1st of Every Month at 8 AM, it triggers a scheduled cleanup. Calculates the date 12 months ago from the current day. Fetches all Magento 2 orders created in the last 12 months via REST API. Extracts all SKUs of products sold during that period. Fetches the entire product catalog from Magento 2. Compares all products with sold SKUs to determine which products had zero sales in the last year. Prepares an HTML email report (including SKU, Name, Price, Status) of the unsold products. Sends the report to the merchant (e.g., kmyprojects@gmail.com) for approval via interactive email (Approve / Decline). If approved, each product is automatically disabled (status updated to 1) in Magento 2 using the REST API. Aggregates all disabled products and sends a confirmation email with a summary and product table. Ensures safe operations with conditional logic and user review before taking any action. 🧠 Key Features βœ… Fully automated detection of inactive inventory. βœ… Uses n8n's Gmail Approval Node for human decision-making. βœ… Works with Magento 2’s REST API and handles large product sets with batching and aggregation. βœ… Includes fail-safe conditional checks (e.g., don’t run if no orders are found). βœ… Clean HTML email reports with product metadata. βœ… Modular and scalable for different business sizes or intervals. πŸ“¦ Use Case Perfect for: Magento 2 store owners or managers Digital operations teams aiming for lean product catalogs Agencies maintaining Magento-based ecommerce stores Any business needing automated product lifecycle management πŸ” Credentials Required Magento 2 API Bearer Token (for reading orders and updating products) Gmail OAuth2 (for sending approval and summary emails) πŸ› οΈ Customizable Parameters Trigger interval (currently set to monthly at 8 AM) Email recipients for approval and notifications Product status change (can be extended to delete or archive instead of disabling) 🧩 Workflow Stack Trigger: Schedule (Monthly) Nodes Used: HTTP Request Code (JavaScript) IF Condition Gmail (Approval & Notification) Split Out / Split in Batches Aggregate Merge

Kanaka Kishore KandregulaBy Kanaka Kishore Kandregula
63

Daily Magento 2 customer sync to Google Contacts & Sheets without duplicates

Automatically sync newly registered Magento 2 customers to Google Contacts and Google Sheets every 24 hours β€” with full duplication control and seamless automation. This workflow is a plug-and-play customer contact automation system designed for Magento 2 store owners, marketers, and CRM teams. It fetches customer records registered within the last 24 hours (from 00:00:00 to 23:59:59), checks against an existing Google Sheet to avoid reprocessing, and syncs only the new ones into Google Contacts. This ensures your contact list is always fresh and up to date β€” without clutter or duplicates. βœ… What This Workflow Does: Automates Customer Syncing Every day, it fetches newly registered Magento 2 customers via API based on the exact date range (midnight to midnight). Deduplicates Using Google Sheets A master Google Sheet tracks already-synced emails. Before adding a customer, the workflow checks this list and skips if already present. Creates Google Contacts Automatically For each unique customer, it creates a new contact in your Google Contacts, saving fields like first name, last name, and email. Logs New Entries to Google Sheets In Google Sheets, it even records magento 2 customer group, createdat, websiteid & store_id After syncing, it adds each new email to the tracking sheet, building a cumulative record of synced contacts. Fully Scheduled & Automated Can be scheduled with the Cron node to run daily (e.g., 12:05 AM) with no manual intervention required. πŸ”§ Modules Used: HTTP Request (Magento 2 API) Date & Time (for filtering registrations) Google Sheets (for reading/writing synced emails) Google Contacts (for contact creation) Set, IF, and Merge nodes (for control logic) Cron (for scheduling the automation) πŸ’Ό Use Cases: Keep your email marketing tools synced with Magento 2 customer data. Build a CRM-friendly contact base in Google Contacts without duplicates. Share customer data with sales or support teams through synced Google Sheets. Reduce manual work and human error in data transfer processes. πŸ”’ Credentials Required Magento 2 Bearer Auth: Set up as a credential in n8n using your Magento 2 API access token. Google API πŸ“‚ 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

Kanaka Kishore KandregulaBy Kanaka Kishore Kandregula
163

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

Kanaka Kishore KandregulaBy Kanaka Kishore Kandregula
61