Update Rank Math SEO Metadata via n8n HTTP Request

This n8n workflow automates updating Rank Math SEO metadata on WooCommerce products via WordPress API calls. It eliminates manual SEO editing, saving time and improving accuracy for WooCommerce store managers.
manualTrigger
set
httpRequest
Learn how to Build this Workflow with AI:
Workflow Identifier: 1552
NODES in Use: Manual Trigger, Set, HTTP Request

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

Opening Problem Statement

Meet Sarah, an eCommerce manager running her WooCommerce store on WordPress. Every week, Sarah spends hours manually updating SEO metadata such as titles, descriptions, and canonical URLs for dozens of products using the Rank Math SEO plugin. This manual process is time-consuming, error-prone, and delays new product launches or updates, directly affecting her search engine rankings and sales conversion rates.

Imagine spending up to 3 hours weekly navigating through product pages and Rank Math settings just to tweak SEO details—time that could be better spent on marketing or customer service. Plus, frequent human errors in metadata cause lower Google rankings and less organic traffic, meaning lost revenue and wasted effort.

What This Automation Does

This unique n8n workflow automates the entire SEO metadata update process for WooCommerce products using Rank Math’s API. When triggered manually, it performs the following key actions:

  • Fetches the WooCommerce base URL from a settings node for dynamic API targeting.
  • Sends an HTTP POST request to the Rank Math plugin’s update-meta endpoint.
  • Updates specific SEO meta fields like post_id, rank_math_title, rank_math_description, and rank_math_canonical_url.
  • Integrates with WordPress and WooCommerce APIs securely using pre-configured credentials for smooth authentication.
  • Retrieves immediate success or failure feedback due to retry mechanisms on failed requests.
  • Eliminates tedious manual SEO updates, saving hours per week and reducing errors.

Prerequisites ⚙️

  • 📧 WooCommerce account connected in n8n for accessing product details.
  • 📧 WordPress account with permissions to update Rank Math SEO metadata via API.
  • ⏱️ n8n automation platform with access to create and run workflows.
  • 💬 Rank Math SEO plugin installed and API enabled on your WordPress WooCommerce site.
  • 🔑 Predefined credentials setup within n8n for WordPress and WooCommerce API authentication.
  • Optional: Self-hosted n8n for enhanced control and security (consider Hostinger hosting with n8n).

Step-by-Step Guide to Build and Run This Workflow

Step 1: Add Manual Trigger Node

Go to n8n dashboard → Click + Add Node → Search and select Manual Trigger. This node allows you to manually start the workflow for testing or one-off updates.

After adding, position it as the first node. You should see a button labeled Execute Workflow in the editor.

Common Mistake: Forgetting to connect this trigger node to the next node will result in no workflow execution.

Step 2: Create Settings Node to Store WooCommerce URL

Add a Set node next. Navigate to + Add Node → Set. This node lets you store constant values to reuse in the workflow.

In the node parameters, add a new assignment named woocommerce url with the value set to your WooCommerce site’s base URL, e.g., https://mydom.com/.

This setup makes the URL easy to update later without changing the core HTTP request.

Step 3: Connect the Manual Trigger to Settings Node

Drag the connection arrow from the manual trigger node to the Settings node so the workflow flows correctly when triggered.

Step 4: Add HTTP Request Node to Update Rank Math Meta

Add an HTTP Request node (Search and add), naming it HTTP Request – Update Rank Math Meta.

Configure the following settings:

  • Method: POST
  • URL: Set dynamically using this expression: {{ $('Settings').item.json["woocommerce url"] }}wp-json/rank-math-api/v1/update-meta
  • Send Body: True
  • Body Parameters: Add these key-value pairs:
    • post_id: 246 (example product post ID)
    • rank_math_title: Demo SEO Title
    • rank_math_description: Demo SEO Description
    • rank_math_canonical_url: https://example.com/demo-product
  • Authentication: Use predefined WordPress credentials.
  • Retry on Fail: Enabled to handle occasional API failures.

Common Mistake: Not setting up proper WordPress API credentials will cause authentication errors.

Step 5: Connect Settings Node to HTTP Request Node

Ensure the connection arrow flows from the Settings node to the HTTP Request node so data flows smoothly.

Step 6: Save and Test the Workflow

Press Save in the top right, then click Execute Workflow in the manual trigger node. You should see the workflow run and an HTTP request being sent to update the SEO metadata.

Check your WordPress WooCommerce product Rank Math settings to confirm the updated metadata reflects correctly.

Customizations ✏️

  • Dynamic Post ID: Instead of hardcoding post_id, use a preceding WooCommerce node to pull product IDs dynamically and pass them as parameters to the HTTP request node. Change post_id to {{ $json["id"] }} in the HTTP body.
  • Multiple SEO Fields: Add more Rank Math fields like rank_math_facebook_title or rank_math_twitter_description by expanding the HTTP request body parameters to cover social SEO metadata.
  • Scheduled Updates: Replace the Manual Trigger node with a Cron node to automate periodic SEO updates across all products.
  • Error Notifications: Add a Slack or Email node connected to catch failures in the HTTP request node, alerting your team immediately.

Troubleshooting 🔧

  • Problem: “Authentication Failed” in HTTP Request node.

    Cause: Incorrect WordPress API credentials or missing permissions.

    Solution: Revisit your WordPress credential setup in n8n under Credentials → WordPress API and verify API user permissions.
  • Problem: “404 Not Found” response from Rank Math API endpoint.

    Cause: Incorrect WooCommerce URL or Rank Math API endpoint URL.

    Solution: Ensure your WooCommerce URL in the Settings node ends with a trailing slash and the complete endpoint path wp-json/rank-math-api/v1/update-meta is correct.
  • Problem: “Failed to update metadata” without clear errors.

    Cause: Missing required body parameters or invalid post IDs.

    Solution: Verify the post_id you provide corresponds to an existing product and all required SEO fields are included.

Pre-Production Checklist ✅

  • Verify WooCommerce site URL is accurately set in the Settings node.
  • Test WordPress API credentials for correct access rights.
  • Run one manual test via the Manual Trigger and inspect HTTP response outputs.
  • Confirm SEO metadata updates reflect properly on the WooCommerce product page.
  • Backup WordPress database before large-scale automation runs for easy rollback.

Deployment Guide

After thorough testing and confirmation of successful SEO metadata updates, activate the workflow in n8n by switching it from draft to active mode.

Optionally, integrate this workflow with schedulers like a Cron node for automatic routine updates without manual interventions.

Monitor workflow execution logs regularly through the n8n UI to catch any failures early.

Conclusion

Congratulations! You’ve set up a powerful automation to update Rank Math SEO metadata for WooCommerce products via n8n and WordPress API calls. This tailored workflow saves you hours of manual effort every week and reduces costly SEO data entry errors.

Try expanding this automation by dynamically fetching product IDs, scheduling updates, or integrating notifications for a fully robust SEO maintenance pipeline. Next time, take your WooCommerce SEO to the next level with smart automation powered by n8n!

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free