---
title: "Chat agent for your Google Search Console data"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/6110ee6b-6c0a-4e2b-a0e7-924b40b7c421"
updated: "2026-11-12"
---

# Chat agent for your Google Search Console data

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow with a webhook chat endpoint and an OpenAI agent. It lists your Search Console properties, builds a query from your request, calls the API with your Google login and answers with a Markdown table.

Chat agent for your Google Search Console data is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow lets you chat with your Google Search Console data. A webhook takes a message and a session id, and an OpenAI agent starts by listing the properties your Google account can reach. It asks which one you mean, turns your request into a Search Console query and replies with a Markdown table. The query step is the lower half of the same workflow, which the agent calls as a tool. A Postgres table keeps each session’s history, and the model sees the last 5 exchanges. Sixteen nodes do the work, beside fourteen sticky notes.

### Who it suits

SEO specialists, site owners and agencies who want quick answers from Search Console without opening its reports, and who can set up a Google OAuth credential. Skip it if you need charts or a ready chat page. The workflow only answers requests posted to its webhook, so a front end is yours to bring.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| SEO agencies | Account managers | Pull a client’s top queries before a call | A manager asks for last month’s top 50 queries with clicks and impressions. |
| Publishing | Editors | See which pages bring search traffic | An editor asks for the top pages by clicks over the last 3 months, as a table. |
| Ecommerce | Site owners | Check where search visitors come from | An owner asks for clicks by country and device. |
| Software | Growth marketers | See which queries lead to which pages | A marketer asks for the top queries by page for the last month. |

You need solid n8n for this one: a Google Cloud OAuth client, a Postgres database, a webhook login and a front end that posts to it.

### Where to use it

Any n8n with a public address that can reach Google, OpenAI and your database will run it. The agent’s answer is sent back as the webhook’s reply.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps, behind a public address
- A chat front end: any tool that can post \`chatInput\` and \`sessionId\` as JSON with Basic Auth
- Postgres or Supabase: the chat history table lives there

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. The Google credential takes the longest.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own, with a public address |
| Google | A Cloud project with the Search Console API on, an OAuth client, and an account that can see the properties |
| OpenAI | An API key that can use \`gpt-4o\` |
| Postgres | A database for the chat history. The memory node creates its table |
| Webhook login | A Basic Auth username and password of your choosing |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add an OAuth2 API credential for Google with your client’s id and secret and the read-only scope `https://www.googleapis.com/auth/webmasters.readonly`, then connect your account. Select it in the two HTTP Request nodes that call Google’s webmasters API, both named Search Console.
3. Add a Postgres credential and select it in `Postgres Chat Memory`.
4. Add an OpenAI credential and select it in `OpenAI Chat Model`.
5. Add a Basic Auth credential with a username and password you choose, and select it in the webhook node.
6. Save the workflow. `Call Search Console Tool` calls it by its own id, so it needs the saved copy.
7. Open the webhook’s test address and post a message with your login and a body such as `{"chatInput": "Which sites can you see?", "sessionId": "test-1"}`.
8. Press Publish. The production address ends in `/webhook/search-console-chat`.

### How to use it

Post each message with the same `sessionId` for one conversation. The agent greets you with your properties, asks which one you want and confirms the dates, dimensions and row count before it queries. The reply holds `output` with its answer and `intermediateSteps` with the raw tool results, which a front end can chart.

What to change for a different result

| To change | Where |
| --- | --- |
| The agent’s manner and defaults | The system message in \`AI Agent\`: the greeting, 3 months, 100 rows and the table format |
| The model | \`gpt-4o\` in \`OpenAI Chat Model\`, with a limit of 16000 output tokens |
| History kept in view | \`Postgres Chat Memory\`: a window of 5 exchanges, and the table name |
| The query | The body of the HTTP Request node that runs it, which sends \`dataState\` as \`all\` |
| The webhook | Its path and authentication in the webhook node |

### Example

An SEO manager posts “Which sites can you see?”, picks one property from the reply and asks for the top 20 queries of the last 3 months with clicks and impressions.

The agent calls the tool twice: once with `website_list` and once with `custom_insights`, with the property, two dates, the `query` dimension and a row limit of 20. The rows come back as a Markdown table. Check the dates it chose before you rely on the figures.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. The top half is the chat: a webhook, the agent, its model, its memory and the tool. The lower half is that tool, which turns the agent’s request into a Search Console call. Start with the property list before you ask for any data.

**For experts.** The tool passes one JSON string. The first Set node parses it with `parseJson()`, and `Switch` routes on `request_type`.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| The webhook | A POST with Basic Auth, answered by \`Respond to Webhook\` | The reply is the agent’s whole item, \`intermediateSteps\` included |
| \`Set fields\` | Takes \`chatInput\` and \`sessionId\` from the body or the top level, and adds the date | The agent’s prompt carries \`date\_message\`, so it can work out relative dates |
| \`Call Search Console Tool\` | A Tool Workflow node set to this workflow’s own id | The workflow must be saved |
| The query request | A POST to the property’s \`searchAnalytics/query\` | \`startRow\` is fixed at 0 |
| \`Postgres Chat Memory\` | Stores the chat history by session | The model sees the last 5 exchanges |

### Good to know

The endpoint is open to anyone you give the login to, and `gpt-4o` is scheduled to go.

- Models: OpenAI’s deprecations page, read on 12 November 2026, gives 14 January 2027 as the shutdown of \`gpt-4o\`, with \`gpt-6-luna\` as the replacement. Change the model in \`OpenAI Chat Model\` before then. The sticky notes still name \`gpt-4o\` and \`gpt-4o-mini\`
- Open endpoint: the webhook is protected only by the Basic Auth you add. Without it, anyone with the address can use your OpenAI key and list your properties
- Paging: the query always starts at row 0, so ask for a larger row limit. The API allows 1 to 25,000 rows a request, and 1,000 by default
- Fresh data: \`dataState\` is \`all\`, which includes fresh data
- Dimensions: the agent’s prompt lists page, query, searchAppearance, device and country. The API also takes date and hour
- Sessions: a session id is the only key to a chat’s history, so use ids that are hard to guess
- Your data: the Search Console rows, your questions and the history go to OpenAI, and the history stays in your Postgres table
- Credentials: the JSON holds none, and the tool’s workflow id is the workflow’s own

## README

```markdown
# Chat agent for your Google Search Console data

An n8n workflow that answers questions about your Search Console data. A webhook takes a message and a session id, and an
OpenAI agent lists your Search Console properties, builds a query from your request, calls Google's API and replies with a
Markdown table. A Postgres table keeps each session's chat history.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 30 nodes, fourteen of them sticky notes. It holds no credential.
  The agent and its tool sit in one file: the tool is the lower half of the canvas, which starts at `Tool calling`.
- `README.md`: these notes.

## What we changed from the original copy

- Every credential link is gone, so you select your own: OpenAI, Postgres, Basic Auth and the Google OAuth2 one.
- `Call Search Console Tool` pointed at a workflow id in its author's n8n, which was the id of this same workflow. It now
  reads `{{ $workflow.id }}`, so the tool calls whichever copy you import.
- The webhook's path was its author's webhook id followed by `/chat`. It is now `search-console-chat`.
- The workflow was saved as active. Mindket's copy is inactive until you publish it.
- The big sticky note held the author's screenshots, a link to n8n's guide and some advice on scopes. It now holds a short title.
- Nothing else. The file has no Code node, and its expressions needed no repair.

## Before you start

- An n8n instance, on n8n Cloud or your own server, with a public address for the webhook.
- An OpenAI API key.
- A Postgres database for the chat history, such as a Supabase project's. The memory node creates its table.
- A Google Cloud project with the Search Console API enabled, an OAuth client, and a Google account that can see the
  properties you want to ask about.
- A chat front end that can post JSON to a webhook, or a command line tool that can.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add an OAuth2 API credential for Google with your client's id and secret and the read-only scope
   `https://www.googleapis.com/auth/webmasters.readonly`, then connect your account. Select it in
   `Search Console - Get Custom Insights` and `## Search Console - Get List of Properties`.
3. Add a Postgres credential and select it in `Postgres Chat Memory`. The table is `insights_chat_histories`.
4. Add an OpenAI credential and select it in `OpenAI Chat Model`.
5. Add a Basic Auth credential with a username and password of your choosing, and select it in `Webhook - ChatInput`.
6. Save the workflow. `Call Search Console Tool` calls it by its own id, so it needs the saved copy.
7. Open the webhook's test address and post a message with its Basic Auth login and a body such as
   `{"chatInput": "Which sites can you see?", "sessionId": "test-1"}`. The reply holds `output` with the agent's answer and
   `intermediateSteps` with the raw tool results.
8. Press Publish. The production address ends in `/webhook/search-console-chat`.

## How a run goes

1. `Webhook - ChatInput` takes a POST with Basic Auth. `Set fields` copies `chatInput` and `sessionId` from the body, or
   from the top level, and adds today's date as `date_message`.
2. `AI Agent` reads the message and the date. On the first message of a session its instructions have it fetch the list of
   properties before it replies. It then confirms the property, the dates, the dimensions and the row count with you.
3. It calls `Call Search Console Tool` with a JSON string. `request_type` is `website_list` or `custom_insights`.
4. The lower half starts at `Tool calling`. `Set fields - Consruct API CALL` parses the string into fields, and `Switch`
   routes on `request_type`.
5. `custom_insights` goes to `Search Console - Get Custom Insights`, a POST to the property's `searchAnalytics/query`
   endpoint with the start and end date, the dimensions and the row limit. `website_list` goes to
   `## Search Console - Get List of Properties`.
6. A Set node and an Aggregate node fold the rows into one field, `response`, which the tool returns to the agent.
7. The agent writes a Markdown table, and `Respond to Webhook` sends the agent's item back as the webhook's reply.

## Change the look

- The agent's behaviour: its system message in `AI Agent`, which sets the greeting, the defaults of 3 months and 100 rows
  and the table format.
- The model: `gpt-4o` in `OpenAI Chat Model`, with a limit of 16000 output tokens.
- How much history the model sees: `Postgres Chat Memory` keeps its default window of 5 exchanges, and the table name is
  set there.
- The query: the body of `Search Console - Get Custom Insights`. It sends `dataState` as `all`.
- The webhook: its path and its authentication in `Webhook - ChatInput`.

## Good to know

- Models: OpenAI's deprecations page, read on 12 November 2026, gives 14 January 2027 as the shutdown of `gpt-4o`, with
  `gpt-6-luna` as the replacement. Change the model in `OpenAI Chat Model` before then. The sticky notes still name
  `gpt-4o` and `gpt-4o-mini`.
- Open endpoint: the webhook is protected only by the Basic Auth you add. Without it anyone with the address can use your
  OpenAI key and read your properties.
- The query always starts at row 0, so the agent cannot page through results. Ask for a larger row limit instead. Google's
  API allows 1 to 25,000 rows a request and 1,000 by default, and `dataState` of `all` includes fresh data.
- The agent's prompt lists the dimensions page, query, searchAppearance, device and country. The API also takes date and
  hour.
- A session id is the only key to a chat's history, so use ids that are hard to guess.
- Your data: the figures Search Console returns, your questions and the chat history go to OpenAI. The history is also kept
  in your Postgres table.
- The webhook's trigger only answers requests, so a chat window of your own must call it.
```

## What is in it

3 files, 34 KB, downloaded as a zip.

```text
NOTICE.md  688 B
README.md  6 KB
workflow.json  27 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 13 steps, starting when another workflow calls it or when its webhook is called
- AI: 1 step calls an AI model: AI Agent
- Sign-ins: Signs in to: www.googleapis.com, Postgres and OpenAI
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads 7 of its 8 step types. It does not read: HTTP Request

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/6110ee6b-6c0a-4e2b-a0e7-924b40b7c421)
- [Its page on Mindket](https://mindket.com/p/6110ee6b-6c0a-4e2b-a0e7-924b40b7c421)
