← All N8N workflows
Automation & utilitiesHTTP RequestIfManual TriggerSchedule TriggerEdit Fields

Google Site Index - sitemap.xml example

Configured with HTTP Request, Schedule Trigger, Sort, Loop Over Items, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen clicking "Testworkflow"Manual TriggerTransformSplit OutSplit OutWeb / APICheck statusHTTP RequestRoutingLoop Over ItemsLoop Over ItemsWaitWaitWaitWeb / APIURL UpdatedHTTP RequestTriggerSchedule TriggerSchedule TriggerRoutingis new?IfTransformGet content-specificsitemapsSplit OutTransformConvert sitemap to JSONXmlTransformForce urlset.url toarrayEdit FieldsTransformAssign mandatirysitemap fieldsEdit FieldsTransformconvert page data toJSONXmlWeb / APIGet sitemap.xmlHTTP RequestWeb / APIGet content of eachsitemapHTTP RequestTransformSortSort

Node categories in this workflow

  • Trigger
  • Transform
  • Web / API
  • Routing
  • Wait

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When clicking "Test workflow"TriggerManual TriggerSee node parameters
Split OutTransformSplit OutSee node parameters
Check statusWeb / APIHTTP RequestSee node parameters
Loop Over ItemsRoutingLoop Over ItemsSee node parameters
WaitWaitWaitSee node parameters
URL UpdatedWeb / APIHTTP RequestPOST
Schedule TriggerTriggerSchedule TriggerSee node parameters
is new?RoutingIfSee node parameters
Get content-specific sitemapsTransformSplit OutSee node parameters
Convert sitemap to JSONTransformXmlSee node parameters
Force urlset.url to arrayTransformEdit FieldsSee node parameters
Assign mandatiry sitemap fieldsTransformEdit FieldsSee node parameters
convert page data to JSONTransformXmlSee node parameters
Get sitemap.xmlWeb / APIHTTP RequestSee node parameters
Get content of each sitemapWeb / APIHTTP RequestSee node parameters
SortTransformSortSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • googleOAuth2Api

Workflow notes

Collect list of URLs

Collect list of URLs

This part extracts all pages from all sitemaps and sorts by the last modified date lastmod (from newest to oldest)

Check URL metadata and update, if:

Check URL metadata and update, if:

  • Google returns error (404 error means that this URL was not previously added)
  • Date of article update is after the date of last request to re-index
Get sitemap.xml

Get sitemap.xml

Various CMS systems often have multiple sitemaps for different content (posts, tags, pages etc). Need to fetch all sitemaps first and then extract all pages from all sitemaps.

Remember to update the real sitemap URL!

Update the `lastmod` and `loc` fields

Update the lastmod and loc fields

These are pre-defined fields according to the XML schema for the Sitemap protocol.

If your CMS system has different field names, please rename them here:

  • the last modified field lastmod
  • URL of the page in loc field
Google Site Index - sitemap.xml example

Google Site Index - sitemap.xml example

Purpose and structure

This folder contains the Google Site Index - sitemap.xml example workflow. Its executable nodes use httpRequest, if, manualTrigger, scheduleTrigger, set, sort, splitInBatches, splitOut, wait, xml. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When clicking "Test workflow", Schedule Trigger

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Wait/1145_Wait_Splitout_Automation_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Feel free to adapt this part depending on your website CMS

More in Automation & utilities