Automating SEO content gap research with OpenAI Agent in n8n

Hi all,

I’m doing recurring SEO content gap research with ChatGPT in the browser. The workflow:

  • Check sitemap(s) of a client

  • Exclude what’s already published

  • Suggest a new SEO article gap in a fixed plain text format (keywords, LSI, extra info, internal + 1 external link).

I’d like to automate this in n8n with the OpenAI API.

  • How would you set up the Agent so it can also “look online” and compare against existing sitemap content?

  • Any best practices or examples for keeping the output consistent in the exact format?

Curious to hear how you’d approach this.

@louwe-louwie here’s a sample workflow execution

  1. Input: Client sitemap URL
  2. Step 1: Extract all URLs - Filter published content
  3. Step 2: Research each topic via search API
  4. Step 3: AI analysis with structured prompt
  5. Step 4: Validation and formatting
  6. Output: Formatted content briefs to Google Sheets
1 Like

Hey there, Nice use case!
In n8n I’d grab the sitemap with HTTP Request, filter out what’s already published (Sheet/DB + IF or small Code node), then fetch page titles/headers with HTML Extract so GPT can see what exists. Feed that into OpenAI with a strict prompt so it always replies in the same structure. Add a quick validation step if needed, and schedule with Cron to drop results into a sheet or Slack.

2 Likes

Thank you both for your responses. Yes, definitely a great use case. News articles for my clients are already being created using n8n. And that works perfectly, saves a lot of time, and scores well SEO-wise.

However, I’ve noticed that the initial step—finding a good topic with the right keywords, title, and meta description—is still a manual process each time. Hence my question.

Currently, the chatgpt browser uses version 5 Thinking for internet browsing. This should actually happen automatically. So, using the sitemaps and URLs, we can see what’s already available and explore online where we can still gain SEO benefits within the relevant industry and the services my client provides.

So, I’d like my AI agent to handle the browser functionality. Is that possible by selecting version 5 OpenAI? Or is that not possible, and do I need to integrate a tool?

What’s your perspective on this?

1 Like

@louwe-louwie The Short Answer is No, you cannot use OpenAI’s built in browsing in n8n for this purpose. The browsing feature is only available in ChatGPT’s interface not through their API that n8n uses but you can build even better browsing capabilities yourself in n8n.

2 Likes

Okay, then I’ll use the steps you mentioned earlier. What advice can you give me about the tool connected to my AI agent that can search online for relevant keywords related to the industry and services my client offers?

Anyone? Some best practices. Perplexity maybe?

It just won’t let me go :wink: I found this article, web search available via the API. So it should be possible. However, this option isn’t available within n8n. So, much more customization is required?

https://platform.openai.com/docs/guides/tools-web-search?api-mode=responses

I’ve now implemented the solution that works well for me: AI Agent, ChatGPT 5 mini model, and Perplexity with Sonar Deep Research.

1 Like

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