Automate SEO title & description updates for WordPress with Yoast SEO API
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.
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
- Configure the Settings Node: In the
Settingsnode, replace the value of thewordpress URLvariable with the full URL of your WordPress site (e.g.,https://your-domain.com/). - Set Credentials: In the
HTTP Request - Update Yoast Metanode, select your pre-configured WordPress credentials from the Credential for WordPress API dropdown menu. - Define Target and Content: In the same
HTTP Requestnode, navigate to the Body Parameters section and update the following values:post_id: The ID of the WordPress post or WooCommerce product you wish to update.yoast_title: The new SEO title.yoast_description: The new meta description.
How It Works
- Manual Trigger: The workflow is initiated manually. This can be replaced by any trigger node for full automation.
- Settings Node: This node defines the base URL of the target WordPress instance. This centralizes the configuration, making it easier to manage.
- HTTP Request Node: This is the core component. It constructs and sends a
POSTrequest to the/wp-json/yoast-api/v1/update-metaendpoint. The request body contains thepost_idand 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 Requestnode with n8n expressions. For example, you can use data from a Google Sheets node by setting thepost_idvalue to an expression like{{ $json.column_name }}. - 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.,
yoast_canonical_url) and add them to the Body Parameters section of theHTTP Requestnode. - 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
// 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 Yoast_API_Manager {
public function __construct() {
add_action('rest_api_init', [$this, 'register_api_routes']);
}
/**
* Registers the REST API route to update Yoast meta fields.
*/
public function register_api_routes() {
register_rest_route( 'yoast-api/v1', '/update-meta', [
'methods' => 'POST',
'callback' => [$this, 'update_yoast_meta'],
'permission_callback' => [$this, 'check_route_permission'],
'args' => [
'post_id' => [
'required' => true,
'validate_callback' => function( $param ) {
$post = get_post( (int) $param );
if ( ! $post ) {
return false;
}
$allowed_post_types = class_exists('WooCommerce') ? ['post', 'product'] : ['post'];
return in_array($post->post_type, $allowed_post_types, true);
},
'sanitize_callback' => 'absint',
],
'yoast_title' => [
'type' => 'string',
'sanitize_callback' => 'sanitize_text_field',
],
'yoast_description' => [
'type' => 'string',
'sanitize_callback' => 'sanitize_text_field',
],
],
] );
}
/**
* Updates the Yoast meta fields for a specific post.
*
* @param WP_REST_Request $request The REST API request instance.
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error on failure.
*/
public function update_yoast_meta( WP_REST_Request $request ) {
$post_id = $request->get_param('post_id');
if ( ! current_user_can('edit_post', $post_id) ) {
return new WP_Error(
'rest_forbidden',
'You do not have permission to edit this post.',
['status' => 403]
);
}
// Map API parameters to Yoast database meta keys
$fields_map = [
'yoast_title' => '_yoast_wpseo_title',
'yoast_description' => '_yoast_wpseo_metadesc',
];
$results = [];
$updated = false;
foreach ( $fields_map as $param_name => $meta_key ) {
if ( $request->has_param( $param_name ) ) {
$value = $request->get_param( $param_name );
update_post_meta( $post_id, $meta_key, $value );
$results[$param_name] = 'updated';
$updated = true;
}
}
if ( ! $updated ) {
return new WP_Error(
'no_fields_provided',
'No Yoast fields were provided for update.',
['status' => 400]
);
}
return new WP_REST_Response( $results, 200 );
}
/**
* Checks if the current user has permission to access the REST API route.
*
* @return bool
*/
public function check_route_permission() {
return current_user_can( 'edit_posts' );
}
}
new Yoast_API_Manager();
Bulk version available here : this bulk version, provided with a dedicated WordPress plugin, allows you to generate and bulk-update meta titles and descriptions for multiple articles simultaneously using artificial intelligence. It automates the entire process, from article selection to the final update in Yoast, offering considerable time savings.
.
🇫🇷 Contactez nous pour automatiser vos processus
Automate SEO Title & Description Updates for WordPress with Yoast SEO API
This n8n workflow provides a foundation for automating the update of SEO titles and descriptions for WordPress posts or pages, leveraging the Yoast SEO API. It's designed to be a starting point for more complex SEO automation tasks, allowing you to programmatically manage your on-page SEO.
What it does
This workflow, in its current form, outlines the initial steps for an SEO automation process:
- Manual Trigger: The workflow is initiated manually, serving as a placeholder for a scheduled trigger or a webhook from another system.
- Sticky Note: Includes a sticky note for documentation or instructions within the workflow canvas.
- Edit Fields (Set): A "Set" node is included to define or modify data fields. This is where you would typically set the post ID, new SEO title, and new SEO description that you intend to update in WordPress.
- HTTP Request: An HTTP Request node is configured, ready to make a call to an external API. This node is intended to interact with the Yoast SEO API (or WordPress REST API) to send the updated SEO data.
Prerequisites/Requirements
- n8n Instance: A running instance of n8n.
- WordPress Website: A WordPress website with the Yoast SEO plugin installed and configured.
- Yoast SEO API Access: Ensure your WordPress site's Yoast SEO API is accessible and you have the necessary authentication (e.g., application passwords for the WordPress REST API, if Yoast SEO API uses it).
- API Endpoint Details: You will need the specific API endpoint for updating SEO titles and descriptions via Yoast SEO.
Setup/Usage
- Import the Workflow:
- Copy the provided JSON code.
- In your n8n instance, go to "Workflows" and click "New".
- Click the three dots next to the workflow name, then "Import from JSON".
- Paste the JSON code and click "Import".
- Configure "Edit Fields (Set)" Node:
- Open the "Edit Fields (Set)" node.
- Add the fields for your WordPress Post ID, the new SEO Title, and the new SEO Description. For example:
post_id(e.g.,123)seo_title(e.g.,"My New Awesome SEO Title")seo_description(e.g.,"This is a compelling new meta description for my post.")
- Configure "HTTP Request" Node:
- Open the "HTTP Request" node.
- Method: Set this to
POSTorPUTdepending on the Yoast SEO API's requirements for updating. - URL: Enter the full URL for the Yoast SEO API endpoint to update post/page metadata. This typically looks something like
https://your-wordpress-domain.com/wp-json/yoast/v1/posts/<POST_ID>/seo. You'll need to dynamically insert thepost_idfrom the previous node. - Authentication: Configure the appropriate authentication method (e.g., "Basic Auth" with WordPress application passwords, or "Header Auth" if an API key is used).
- Body Parameters: In the "Body Parameters" section, add the fields for
titleanddescription(or whatever the Yoast SEO API expects) and reference the data from the "Edit Fields (Set)" node using expressions (e.g.,{{$json.seo_title}},{{$json.seo_description}}).
- Test the Workflow:
- Click "Execute Workflow" on the "Manual Trigger" node to test the flow.
- Check the output of the "HTTP Request" node for success or error messages.
- Verify on your WordPress site that the SEO title and description have been updated.
- Expand the Workflow:
- This workflow is a starting point. You can extend it by:
- Replacing the "Manual Trigger" with a "Cron" node for scheduled updates, or a "Webhook" node to trigger updates from an external system.
- Adding a "WordPress" node to fetch post data first.
- Integrating with an AI service (like OpenAI) to generate SEO titles and descriptions.
- Adding error handling and notifications (e.g., Slack, Email) for failed updates.
- This workflow is a starting point. You can extend it by:
Related Templates
Create verified user profiles with email validation, PDF generation & Gmail delivery
Verified User Profile Creation - Automated Email Validation & PDF Generation --- Overview This comprehensive automation workflow streamlines the user onboarding process by validating email addresses, generating professional profile PDFs, and delivering them seamlessly to verified users. 🎯 What This Workflow Does: Receives User Data - Webhook trigger accepts user signup information (name, email, city, profession, bio) Validates Email Addresses - Uses VerifiEmail API to ensure only legitimate email addresses proceed Conditional Branching - Smart logic splits workflow based on email verification results Generates HTML Profile - Creates beautifully styled HTML templates with user information Converts to PDF - Transforms HTML into professional, downloadable PDF documents Email Delivery - Sends personalized welcome emails with PDF attachments to verified users Data Logging - Records all verified users in Google Sheets for analytics and tracking Rejection Handling - Notifies users with invalid emails and provides guidance ✨ Key Features: ✅ Email Verification - Prevents fake registrations and maintains data quality 📄 Professional PDF Generation - Beautiful, branded profile documents 📧 Automated Email Delivery - Personalized welcome messages with attachments 📊 Google Sheets Logging - Complete audit trail of all verified users 🔀 Smart Branching - Separate paths for valid and invalid emails 🎨 Modern Design - Clean, responsive HTML/CSS templates 🔒 Secure Webhook - POST endpoint for seamless form integration 🎯 Perfect Use Cases: User registration systems Community membership verification Professional certification programs Event registration with verified attendees Customer onboarding processes Newsletter signup verification Educational platform enrollments Membership card generation 📦 What's Included: Complete workflow with 12 informative sticky notes Pre-configured webhook endpoint Email verification integration PDF generation setup Gmail sending configuration Google Sheets logging Error handling guidelines Rejection email template 🛠️ Required Integrations: VerifiEmail - For email validation (https://verifi.email) HTMLcsstoPDF - For PDF generation (https://htmlcsstopdf.com) Gmail OAuth2 - For email delivery Google Sheets OAuth2 - For data logging ⚡ Quick Setup Time: 15-20 minutes 🎓 Skill Level: Beginner to Intermediate --- Benefits: ✅ Reduces manual verification work by 100% ✅ Prevents spam and fake registrations ✅ Delivers professional branded documents automatically ✅ Maintains complete audit trail ✅ Scales effortlessly with user growth ✅ Provides excellent user experience ✅ Easy integration with any form or application --- Technical Details: Trigger Type: Webhook (POST) Total Nodes: 11 (including 12 documentation sticky notes) Execution Time: ~3-5 seconds per user API Calls: 3 external (VerifiEmail, HTMLcsstoPDF, Google Sheets) Email Format: HTML with binary PDF attachment Data Storage: Google Sheets (optional) --- License: MIT (Free to use and modify) --- 🎁 BONUS FEATURES: Comprehensive sticky notes explaining each step Beautiful, mobile-responsive email template Professional PDF styling with modern design Easily customizable for your branding Ready-to-use webhook endpoint Error handling guidelines included --- Perfect for: Developers, No-code enthusiasts, Business owners, SaaS platforms, Community managers, Event organizers Start automating your user verification process today! 🚀
Automate Reddit brand monitoring & responses with GPT-4o-mini, Sheets & Slack
How it Works This workflow automates intelligent Reddit marketing by monitoring brand mentions, analyzing sentiment with AI, and engaging authentically with communities. Every 24 hours, the system searches Reddit for posts containing your configured brand keywords across all subreddits, finding up to 50 of the newest mentions to analyze. Each discovered post is sent to OpenAI's GPT-4o-mini model for comprehensive analysis. The AI evaluates sentiment (positive/neutral/negative), assigns an engagement score (0-100), determines relevance to your brand, and generates contextual, helpful responses that add genuine value to the conversation. It also classifies the response type (educational/supportive/promotional) and provides reasoning for whether engagement is appropriate. The workflow intelligently filters posts using a multi-criteria system: only posts that are relevant to your brand, score above 60 in engagement quality, and warrant a response type other than "pass" proceed to engagement. This prevents spam and ensures every interaction is meaningful. Selected posts are processed one at a time through a loop to respect Reddit's rate limits. For each worthy post, the AI-generated comment is posted, and complete interaction data is logged to Google Sheets including timestamp, post details, sentiment, engagement scores, and success status. This creates a permanent audit trail and analytics database. At the end of each run, the workflow aggregates all data into a comprehensive daily summary report with total posts analyzed, comments posted, engagement rate, sentiment breakdown, and the top 5 engagement opportunities ranked by score. This report is automatically sent to Slack with formatted metrics, giving your team instant visibility into your Reddit marketing performance. --- Who is this for? Brand managers and marketing teams needing automated social listening and engagement on Reddit Community managers responsible for authentic brand presence across multiple subreddits Startup founders and growth marketers who want to scale Reddit marketing without hiring a team PR and reputation teams monitoring brand sentiment and responding to discussions in real-time Product marketers seeking organic engagement opportunities in product-related communities Any business that wants to build authentic Reddit presence while avoiding spammy marketing tactics --- Setup Steps Setup time: Approx. 30-40 minutes (credential configuration, keyword setup, Google Sheets creation, Slack integration) Requirements: Reddit account with OAuth2 application credentials (create at reddit.com/prefs/apps) OpenAI API key with GPT-4o-mini access Google account with a new Google Sheet for tracking interactions Slack workspace with posting permissions to a marketing/monitoring channel Brand keywords and subreddit strategy prepared Create Reddit OAuth Application: Visit reddit.com/prefs/apps, create a "script" type app, and obtain your client ID and secret Configure Reddit Credentials in n8n: Add Reddit OAuth2 credentials with your app credentials and authorize access Set up OpenAI API: Obtain API key from platform.openai.com and configure in n8n OpenAI credentials Create Google Sheet: Set up a new sheet with columns: timestamp, postId, postTitle, subreddit, postUrl, sentiment, engagementScore, responseType, commentPosted, reasoning Configure these nodes: Brand Keywords Config: Edit the JavaScript code to include your brand name, product names, and relevant industry keywords Search Brand Mentions: Adjust the limit (default 50) and sort preference based on your needs AI Post Analysis: Customize the prompt to match your brand voice and engagement guidelines Filter Engagement-Worthy: Adjust the engagementScore threshold (default 60) based on your quality standards Loop Through Posts: Configure max iterations and batch size for rate limit compliance Log to Google Sheets: Replace YOURSHEETID with your actual Google Sheets document ID Send Slack Report: Replace YOURCHANNELID with your Slack channel ID Test the workflow: Run manually first to verify all connections work and adjust AI prompts Activate for daily runs: Once tested, activate the Schedule Trigger to run automatically every 24 hours --- Node Descriptions (10 words each) Daily Marketing Check - Schedule trigger runs workflow every 24 hours automatically daily Brand Keywords Config - JavaScript code node defining brand keywords to monitor Reddit Search Brand Mentions - Reddit node searches all subreddits for brand keyword mentions AI Post Analysis - OpenAI analyzes sentiment, relevance, generates contextual helpful comment responses Filter Engagement-Worthy - Conditional node filters only high-quality relevant posts worth engaging Loop Through Posts - Split in batches processes each post individually respecting limits Post Helpful Comment - Reddit node posts AI-generated comment to worthy Reddit discussions Log to Google Sheets - Appends all interaction data to spreadsheet for permanent tracking Generate Daily Summary - JavaScript aggregates metrics, sentiment breakdown, generates comprehensive daily report Send Slack Report - Posts formatted daily summary with metrics to team Slack channel
Competitor intelligence agent: SERP monitoring + summary with Thordata + OpenAI
Who this is for? This workflow is designed for: Marketing analysts, SEO specialists, and content strategists who want automated intelligence on their online competitors. Growth teams that need quick insights from SERP (Search Engine Results Pages) without manual data scraping. Agencies managing multiple clients’ SEO presence and tracking competitive positioning in real-time. What problem is this workflow solving? Manual competitor research is time-consuming, fragmented, and often lacks actionable insights. This workflow automates the entire process by: Fetching SERP results from multiple search engines (Google, Bing, Yandex, DuckDuckGo) using Thordata’s Scraper API. Using OpenAI GPT-4.1-mini to analyze, summarize, and extract keyword opportunities, topic clusters, and competitor weaknesses. Producing structured, JSON-based insights ready for dashboards or reports. Essentially, it transforms raw SERP data into strategic marketing intelligence — saving hours of research time. What this workflow does Here’s a step-by-step overview of how the workflow operates: Step 1: Manual Trigger Initiates the process on demand when you click “Execute Workflow.” Step 2: Set the Input Query The “Set Input Fields” node defines your search query, such as: > “Top SEO strategies for e-commerce in 2025” Step 3: Multi-Engine SERP Fetching Four HTTP request tools send the query to Thordata Scraper API to retrieve results from: Google Bing Yandex DuckDuckGo Each uses Bearer Authentication configured via “Thordata SERP Bearer Auth Account.” Step 4: AI Agent Processing The LangChain AI Agent orchestrates the data flow, combining inputs and preparing them for structured analysis. Step 5: SEO Analysis The SEO Analyst node (powered by GPT-4.1-mini) parses SERP results into a structured schema, extracting: Competitor domains Page titles & content types Ranking positions Keyword overlaps Traffic share estimations Strengths and weaknesses Step 6: Summarization The Summarize the content node distills complex data into a concise executive summary using GPT-4.1-mini. Step 7: Keyword & Topic Extraction The Keyword and Topic Analysis node extracts: Primary and secondary keywords Topic clusters and content gaps SEO strength scores Competitor insights Step 8: Output Formatting The Structured Output Parser ensures results are clean, validated JSON objects for further integration (e.g., Google Sheets, Notion, or dashboards). Setup Prerequisites n8n Cloud or Self-Hosted instance Thordata Scraper API Key (for SERP data retrieval) OpenAI API Key (for GPT-based reasoning) Setup Steps Add Credentials Go to Credentials → Add New → HTTP Bearer Auth* → Paste your Thordata API token. Add OpenAI API Credentials* for the GPT model. Import the Workflow Copy the provided JSON or upload it into your n8n instance. Set Input In the “Set the Input Fields” node, replace the example query with your desired topic, e.g.: “Google Search for Top SEO strategies for e-commerce in 2025” Execute Click “Execute Workflow” to run the analysis. How to customize this workflow to your needs Modify Search Query Change the search_query variable in the Set Node to any target keyword or topic. Change AI Model In the OpenAI Chat Model nodes, you can switch from gpt-4.1-mini to another model for better quality or lower cost. Extend Analysis Edit the JSON schema in the “Information Extractor” nodes to include: Sentiment analysis of top pages SERP volatility metrics Content freshness indicators Export Results Connect the output to: Google Sheets / Airtable for analytics Notion / Slack for team reporting Webhook / Database for automated storage Summary This workflow creates an AI-powered Competitor Intelligence System inside n8n by blending: Real-time SERP scraping (Thordata) Automated AI reasoning (OpenAI GPT-4.1-mini) Structured data extraction (LangChain Information Extractors)