📊 Simple Google indexing workflow in n8n

⚡ 6,100 views · 📊 Market Research & Insights

Description

What it does

The workflow is a simple yet efficient way to automate the process of indexing your website on Google using the Google Indexing API.

How it works

It works by extracting information from your sitemap, converting it into a JSON file, and looping through each URL to submit it for indexing.

Here’s a brief rundown of the workflow:

  1. The workflow can be triggered manually via the “Execute Workflow” button or scheduled to run at a specific time using the “Schedule Trigger” node.

  2. The sitemap of your website is fetched using the “sitemap_set” node with a HTTP Request to the sitemap URL.

  3. This XML sitemap is then converted into a JSON file using the “sitemap_convert” node.

  4. The “sitemap_parse” node splits the JSON file into individual URLs.

  5. The “url_set” node then prepares each URL to be sent to the Google Indexing API.

  6. A loop is created using the “loop” node to process each URL individually and make a POST request to Google Indexing API indicating that the URL has been updated.

  7. If the POST request is successful and the URL has been updated, the workflow waits for 2 seconds before moving to the next URL.

  8. In case the daily limit for the Google Indexing API is reached (200/day by default), an error message is triggered using the “Stop and Error” node.

Before you use the workflow

Activate the indexing API

Create a Service Account and get credentials

image.png

Add the user as owner of the site

Beware, for each site you need to add the user as a owner like this:

image.png

Set your sitemap


Now you should be able to ensure that Google is always up-to-date with the latest content on your website, improving your website’s visibility and SEO rankings, have fun!

đź”— Nodes Used

HTTP Request, Stop and Error, Schedule Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup