n8n

How to Automate Google Search Console Insights?

Use a simple chat prompt to pull live SEO data from Google Search Console. An AI agent understands plain language and returns clean tables you can use right away. Teams get quick answers to SEO questions without building manual reports.

The flow starts with a secure webhook that accepts chatInput and sessionId. A Set node adds a date message to help build the right date range. The AI agent uses OpenAI for reasoning and a Postgres memory to keep the last few turns of the chat. When data is needed, the agent calls a tool workflow that builds a Search Console API request. A Switch routes the call to either list properties or fetch custom insights. Google Search Console nodes return the data, then aggregation nodes format the response for the agent. The reply goes back through Respond to Webhook so you can render tables or even build charts from intermediate steps.

Setup needs OpenAI, Google Search Console access, and a PostgreSQL database. Expect big time savings on ad hoc SEO questions and weekly checks. Great for marketing teams, agencies, and web publishers who want fast answers on clicks, impressions, pages, and queries across many sites.

What are the key features?

  • Secure webhook input with Basic Auth to receive chatInput and sessionId
  • Set node formats a date message to guide time ranges for queries
  • AI agent powered by OpenAI with tool calling for precise API actions
  • Postgres chat memory stores recent messages in insights_chat_histories
  • Execute Workflow Trigger handles tool calls for website list and insights
  • Switch node routes between listing properties and running analytics queries
  • Google Search Console nodes fetch properties and search analytics data
  • Aggregation nodes build clean arrays for agent friendly responses
  • Respond to Webhook returns final text and intermediate steps for charts
  • Configurable model choice with support for cost friendly options

What are the benefits?

  • Reduce manual report work from hours to minutes by pulling data on demand
  • Automate up to 80 percent of repeated SEO data requests
  • Improve accuracy by using direct API data instead of copy and paste
  • Connect OpenAI, Google Search Console, and PostgreSQL in one flow
  • Support multiple chat sessions at once using sessionId based memory
  • Enable non technical users to request data in plain language

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI, Google Search Console and PostgreSQL. See the Tools Required section above for links to create accounts with these services.
  3. Open the Webhook node and set Basic Auth credentials. Copy the Test URL for later. Make sure response mode is set to use the Respond to Webhook node.
  4. In the n8n credentials manager, create an OpenAI credential. Get your API key from your OpenAI account, paste it into the credential, and save.
  5. Create a Google Search Console OAuth2 credential in n8n. Double click the Search Console nodes, choose 'Create new credential', then follow the on screen instructions to connect your Google account with the required Search Console scope.
  6. Create a PostgreSQL credential in n8n Cloud. Enter host, port, database, user, and password. Test the connection. Make sure the table insights_chat_histories exists or allow the node to create it.
  7. Open the AI Agent and select the OpenAI Chat Model node. Choose your model and set max tokens as needed. Link the Postgres Chat Memory node and keep the context length at 5 if you want short memory.
  8. Open the Call Search Console Tool and make sure the linked tool workflow is available. If not, select the correct workflow in the 'Credential to connect with' or workflow selector.
  9. Check the Set nodes that build request_type and date ranges. Confirm fields match your Search Console needs, such as property URL, dimensions, and date window.
  10. Open both Google Search Console nodes and choose your Google credential. Test each node with a short sample query to confirm access.
  11. Send a POST request to the webhook Test URL with a JSON body containing chatInput and sessionId. Ask for 'list my websites' to confirm the property list path works.
  12. Ask for a specific insight, for example 'show clicks and impressions by page for the last 28 days for example.com'. Verify the returned table and check the intermediate steps for chart data.
  13. If you see 401 errors, reconnect the Google credential and confirm scopes. If results are empty, confirm the property URL matches Search Console. If memory feels off, check the sessionId value and the Postgres table name. For timeouts, try a smaller date range or a lighter model.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Search Console

Sign up

Free: $0 (API usage is free; quotas apply)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

PostgreSQL

Sign up

Free: $0 (open-source PostgreSQL License; self-hosted)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.