Templates / Automate SEO title & description updates for WordPress with Yoast SEO API

Automate SEO title & description updates for WordPress with Yoast SEO API

Ready for 3.0

by phil ✓ · 1,346 views · created 2025-08-08 · Content Creation

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (3)

What it does

This workflow automates the update of Yoast SEO metadata for a specific post or product on a WordPress or WooCommerce site. It sends a POST request to a custom API endpoint exposed by the Yoast SEO API Manager plugin, allowing for programmatic changes to the SEO title and meta description. Bulk version available here. Prerequisites A WordPress site with administrator access. The Yoast SEO plugin installed and activated. The Yoast SEO API Manager companion plugin installed and activated to expose the required API endpoint. WordPress credentials configured within your n8n instance. Setup Steps 1. Configure the Settings Node: In the Settings node, replace the value of the wordpress URL variable with the full URL of your WordPress site (e.g., https://your-domain.com/). 2. Set Credentials: In the HTTP Request - Update Yoast Meta node, select your pre-configured WordPress credentials from the Credential for WordPress API dropdown menu. 3. Define Target and Content: In the same HTTP Request node, navigate to the Body Parameters section and update the following values: postid: The ID of the WordPress post or WooCommerce product you wish to update. yoasttitle: The new SEO title. yoastdescription: The new meta description. How It Works 1. Manual Trigger: The workflow is initiated manually. This can be replaced by any trigger node for full automation. 2. Settings Node: This node defines the base URL of the target WordPress instance. This centralizes the configuration, making it easier to manage. 3. HTTP Request Node: This is the core component. It constructs and sends a POST request to the /wp-json/yoast-api/v1/update-meta endpoint. The request body contains the postid and the new metadata, and it authenticates using the selected n8n WordPress credentials. Customization Guide Dynamic Inputs: To update posts dynamically, replace the static values in the HTTP Request node with n8n expressions. For example, you can use data from a Google Sheets node by setting the postid value to an expression like {{ $json.columnname }}. Update Additional Fields: The underlying API may support updating other Yoast fields. Consult the Yoast SEO API Manager plugin's documentation to identify other available parameters (e.g., yoastcanonicalurl) and add them to the Body Parameters section of the HTTP Request node. Change the Trigger: Replace the When clicking ‘Test workflow’ node with any other trigger node to fit your use case, such as: Schedule: To run the update on a recurring basis. Webhook: To trigger the update from an external service. Google Sheets: To trigger the workflow whenever a row is added or updated in a specific sheet. Yoast SEO API Manager Plugin for WordPress language // ATTENTION: Replace the line below with <?php - This is necessary due to display constraints in web interfaces. <?php / Plugin Name: Yoast SEO API Manager v1.2 Description: Manages the update of Yoast metadata (SEO Title, Meta Description) via a dedicated REST API endpoint. Version: 1.2 Author: Phil - https://inforeole.fr (Adapted by Expert n8n) / if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class YoastAPIManager { public function construct() { addaction('restapiinit', $this, 'registerapiroutes'); } / Registers the REST API route to update Yoast meta fields. / public function registerapiroutes() { registerrestroute( 'yoast-api/v1', '/update-meta', 'methods' => 'POST', 'callback' => $this, 'updateyoastmeta', 'permissioncallback' => $this, 'checkroutepermission', 'args' => 'postid' => 'required' => true, 'validatecallback' => function( $param ) { $post = getpost( (int) $param ); if ( ! $post ) { return false; } $allowedposttypes = classexists('WooCommerce') ? 'post', 'product' : 'post'; return inarray($post->posttype, $allowedposttypes, true); }, 'sanitizecallback' => 'absint', , 'yoasttitle' => 'type' => 'string', 'sanitizecallback' => 'sanitizetextfield', , 'yoastdescription' => 'type' => 'string', 'sani

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.