Back to Templates
  • +9

AI Agent to chat with you Search Console Data, using OpenAI and Postgres

Created by:

Dataki

Last update:

Last update 5 months ago

Categories:
Share:

Edit 19/11/2024: As explained on the workflow, the AI Agent with the original system prompt was not effective when using gpt4-o-mini.

To address this, I optimized the prompt to work better with this model. You can find the prompts I’ve tested on this Notion Page. And yes, there is one that works well with gpt4-o-mini.

AI Agent to chat with you Search Console Data, using OpenAI and Postgres

This AI Agent enables you to interact with your Search Console data through a chat interface. Each node is documented within the template, providing sufficient information for setup and usage. You will also need to configure Search Console OAuth credentials.

Follow this n8n documentation to set up the OAuth credentials.

Important Notes

Correctly Configure Scopes for Search Console API Calls

  • It’s essential to configure the scopes correctly in your Google Search Console API OAuth2 credentials. Incorrect configuration can cause issues with the refresh token, requiring frequent reconnections. Below is the configuration I use to avoid constant re-authentication:
    Search Console API oAuth2 config 1
    Search Console API oAuth2 config 2

Of course, you'll need to add your client_id and client_secret from the Google Cloud Platform app you created to access your Search Console data.

Configure Authentication for the Webhook

Since the webhook will be publicly accessible, don’t forget to set up authentication. I’ve used Basic Auth, but feel free to choose the method that best meets your security requirements.

🤩💖 Example of awesome things you can do with this AI Agent

Example of chat with this AI Agent