This workflow enables the submission of business-critical URLs via the Google Indexing API and IndexNow.
Why is this important for SEO?
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:
sitemap.xml and submit them to Google and IndexNow.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:
Create your first crawl by: Clicking in Create configuration > choose a template > Automate > Webhook.
Webhook Node: In n8n, copy paste the Webhook callback URL into the Oncrawl Webhook section. At the end, Oncrawl sends a POST HTTP request to n8n containing: Workspace_ID, Project_ID, Crawl_ID. More details in Webhook Documentation: https://developer.oncrawl.com/#notification
Discover_sitemaps endpoint: doc: https://developer.oncrawl.com/. This endpoint checks the Sitemaps declared in your robots.txt file. You can filter the output to avoid duplicate sitemaps
Config: It’s an initiation node that populate variables such as:
Crawl_ID: Fetch from Webhook NodeSITE_URL: Your site keeping this structure https://your-site.comSITEMAP_URL: For subdomain sitemaps, you can duplicate this field.INDEXNOW_KEY: You can create it in the Bing Webmaster tools here https://www.bing.com/indexnow/getstartedINDEXNOW_KEY_URL: it's usually your domain and the INDEXNOW_KEY: wwww.example.com/<INDEXNOW_KEY>Variables you can update depending on your specs:
DAYS_BACK: 7 by default. For Google it's checking the status of the page before submitting but for Indexnow it will ask to index all the pages that been last updated in the last 7 daysBATCH_SIZE: 500 it's the default recommended by IndexNowUSE_GOOGLE, USE_INDEXNOW: by default it's true which means the process will run for both Google and IndexNowCheck Status Node (OAuth Setup):
USE_GOOGLE = true from Cofig?coverageState and lastCrawlTime of a given URL given by Google Search ConsoleSubmitted and indexed” -> Push to is New nodeCrawled - currently not indexed” -> Push to Submit node⚠️ Google alternative to batch index URLs consists in using Premium Service to by pass the URL inspection tool: https://fr.speedyindex.com/
loc, url fields. This is useful to recover the lastmod from Orphan pages referenced into Sitemaps.Assign mandatory sitemap fields" NodeNext nodes
loc, url fields. This is useful to recover the lastmod data for Google NodeAssign mandatory sitemap fields" NodeNext nodes