Back to Templates

Automated Oncrawl Sitemap URL Submission to Google Indexing API & IndexNow

Created by

Created by: Philippe || traversac

Philippe

Last update

Last update 9 hours ago

Categories

Share


This workflow enables the submission of business-critical URLs via the Google Indexing API and IndexNow.

Why is this important for SEO?

  • If your objective is visibility within AI-powered search and answer engines (such as Copilot, Perplexity, or OpenAI tools), the IndexNow integration is particularly relevant. IndexNow accelerates URL discovery for Bing and Yandex, which are key retrieval sources for several LLM-based platforms.
  • In parallel, Google remains the dominant search engine, representing ~80% of global search traffic. Gemini is deeply integrated into Google’s ecosystem and, when grounding is enabled, can leverage Google Search as an external retrieval source. Ensuring fast and reliable indexation of critical URLs therefore remains a strategic foundation for both traditional SEO and AI-assisted search experiences.

Description

This workflow uses OnCrawl API endpoint to automatically discover your sitemaps.xml and submit their latest updates to both Google Indexing API and IndexNOW.

It includes two variations:

  • Index orphan pages detected in sitemap.xml and submit them to Google and IndexNow.
  • Index newly released pages by identifying indexable canonical URLs added between a pre-release crawl and a post-release crawl.

How it works

This workflow works for Oncrawl users with API access enabled in their plan.

if you are not an Oncrawl users, please refer to: https://n8n.io/workflows/8778-workflow-for-submitting-changed-sitemap-urls-using-google-indexing-api-and-bing-indexnow/

To get an API Key, just go in your User Account profile > tokens > + Add API access token:

  • Description: any name
  • Scope: select all checkboxes
  • Click in Create token. Keep your API secret safe

Discover & parse Sitemaps

Google IndexAPI

  • Create a service account here https://console.cloud.google.com/iam-admin/serviceaccounts
    • Assign role: Owner
  • Generate a JSON key (contains email + private key)
  • For the two Google API nodes:
    • Authentication: Predefined credential type
    • Credential Type: Google Service Account API
  • Credential configuration:
  • Others Nodes
    • Gate: Google Is USE_GOOGLE = true from Cofig?
    • Check status: Useful to get the coverageState and lastCrawlTime of a given URL given by Google Search Console
    • Loop Over Items: Prevents rate-limiting
    • Switch:
      • Case: coverageState= “Submitted and indexed” -> Push to is New node
      • Case: coverageState= “Crawled - currently not indexed” -> Push to Submit node
    • Is New: URLs from Sitemap with Last modification date AFTER the GoogleLast Crawl date
      • > If true, we submit URLs to Index API
      • > If false -> no need to push that URL for indexation
    • URL Updates
    • Wait: Generates a random delay between 0.30 and 1.50 seconds, rounded to 2 decimals

⚠️ Google alternative to batch index URLs consists in using Premium Service to by pass the URL inspection tool: https://fr.speedyindex.com/

IndexNow auto-submitting

  • documentation:
    https://www.bing.com/indexnow/getstarted
  • Gate: IndexNow: Is USE_INDEXNOW is true from Config?
  • Split in Batches: split in batch of 500 URLs max to avoid rate Limiting issues
  • Build IndexNow payload: description in the node name
  • IndexNow Submit: Submit the URLs to indexNow

VariationA: Index orphan pages

  • API documentation: https://developer.oncrawl.com/#Data-API
  • OQL definition: Get orphan pages for both sitemaps & logs
  • Merge node: Merge Items that InnerJoin loc, url fields. This is useful to recover the lastmod from Orphan pages referenced into Sitemaps.
    This data can be shared into Google Node afterward.
    Input1 should be: "Assign mandatory sitemap fields" Node

Next nodes

  • change "Set Node" name in the script variables

VariationB: Index newly added pages between a Crawl 1 & a Crawl2

  • API documentation: https://developer.oncrawl.com/#Data-API
  • OQL definition: Returns indexable canonical pages added in Crawl 2
  • Merge node: Merge Items that match between loc, url fields. This is useful to recover the lastmod data for Google Node
    Input1 should be: "Assign mandatory sitemap fields" Node

Next nodes

  • change "Set Node" name in the script variables