Google Indexing Workflow

Hello everyone,

I did a bit of research and despite being a feature request, there was no N8N contribution towards using the Google Indexing API.

For your information, the Google Indexing API is the absolute fastest and best way to get Google to index your content from the search console. The primary purpose is to improve the SEO of the the URLs. By notifying Google that the content has changed, Google’s search engine will re-crawl the updated pages and adjust their search rankings accordingly.

The only working solution available at the moment is this script that reads a list of URLs from a file called “urls.txt” and sends them to Google’s Indexing API.

I’m not a developper but I understand these are the steps:

I would like to have confirmation this is technically doable with N8N, any advice is appreciated.
It would be a game-changer for SEOs on N8N as it would be possible to trigger an instant update using for example the webflow trigger on update.
image

Thank you very much!

Hi @Joachim_Brindeau, looking at Google’s docs for this API suggests the HTTP Requests are reasonably simple.

n8n does support OAuth2 authentication, so you should be able to use the n8n’s “Google OAuth2 API” credentials in the HTTP Request as well (including the https://www.googleapis.com/auth/indexing scope)

2 Likes

I saw that Google Account Service Key is already implemented.
I tried to make a workflow with sending a batch (如何使用 Indexing API | Google 搜索中心  |  Google Developers) but I got some error.

{ "error": { "code": 400, "message": "Failed to get multipart boundary.", "status": "INVALID_ARGUMENT" } } 

As I see in the documentation, batch need to look like this.

POST /batch HTTP/1.1
Host: indexing.googleapis.com
Content-Length: content_length
Content-Type: multipart/mixed; boundary="===============7330845974216740156=="
Authorization: Bearer oauth2_token

--===============7330845974216740156==
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: <b29c5de2-0db4-490b-b421-6a51b598bd22+2>

POST /v3/urlNotifications:publish [1]
Content-Type: application/json
accept: application/json
content-length: 58

{ "url": "http://example.com/jobs/42", "type": "URL_UPDATED" }
--===============7330845974216740156==
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: <b29c5de2-0db4-490b-b421-6a51b598bd22+1>

POST /v3/urlNotifications:publish [2]
Content-Type: application/json
accept: application/json
content-length: 75

{ "url": "http://example.com/widgets/1", "type": "URL_UPDATED" }
--===============7330845974216740156==
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: <b29c5de2-0db4-490b-b421-6a51b598bd22+3>

POST /v3/urlNotifications:publish [3]
Content-Type: application/json
accept: application/json
content-length: 58

{ "url": "http://example.com/jobs/43", "type": "URL_DELETED" }
--===============7330845974216740156==

It is possible to make it with HTTP node?
As i understand batching in HTTP node can only send batch without multipart?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.