πŸ“Š Generate competitor content gap reports in Slack with GPT-4o-mini

⚑ 31 views Β· πŸ“Š Market Research & Insights

πŸ’‘ Pro Tip β€” HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it β€” it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

Description

Submit your page URL, a competitor’s page URL, and a target keyword using a simple form. The workflow automatically scrapes both pages, strips all HTML, and sends the full comparison to GPT-4o-mini for analysis. Within seconds, a structured 6-section content gap report lands in your Slack channel β€” ready to act on. Built for SEO teams, content strategists, and agency analysts who need fast, repeatable competitor insights.


What This Workflow Does


Setup Requirements

Tools Needed

Estimated Setup Time: 10–15 minutes


Step-by-Step Setup

  1. Import the workflow β€” Open n8n β†’ Workflows β†’ Import from JSON β†’ paste the workflow JSON β†’ click Import
  2. Connect your OpenAI credential β€” Go to node 10. OpenAI β€” GPT-4o-mini Model β†’ click the credential dropdown β†’ add your OpenAI API key β†’ test the connection
  3. Connect your Slack credential β€” Go to node 12. Slack β€” Send Gap Report β†’ click the credential dropdown β†’ select OAuth2 β†’ follow the Slack OAuth flow to connect your workspace
  4. Set your Slack channel β€” In node 12. Slack β€” Send Gap Report, set the channel field to the channel name where reports should be posted (e.g. #seo-reports)
  5. Activate the workflow β€” Toggle the workflow to Active β†’ copy the Form URL from node 1. Form β€” Submit Page URLs β†’ open it in a browser to test

> ⚠️ Bot-Protected Sites β€” Some sites return a 403 Forbidden error when scraped. If this happens, open nodes 3. HTTP β€” Scrape Your Page and 4. HTTP β€” Scrape Competitor Page, add a header with Name = User-Agent and Value = Mozilla/5.0 (compatible; n8n-bot/1.0) in both nodes.


How It Works (Step by Step)

Step 1 β€” Form: Submit Page URLs You open the form URL in a browser and fill in four fields: your page URL, the competitor’s page URL, the target keyword, and your business name. Submitting the form kicks off the entire workflow automatically.

Step 2 β€” Set: Extract Form Fields All four form inputs are mapped to clean named variables. A run timestamp is automatically added so every report is dated. These variables flow into every downstream step.

Step 3 β€” HTTP: Scrape Your Page (parallel) An HTTP request fetches the full HTML content of your page. This step runs at the same time as Step 4, so both pages are retrieved simultaneously without waiting.

Step 4 β€” HTTP: Scrape Competitor Page (parallel) An identical HTTP request fetches the competitor’s page in parallel with Step 3. Both pages are ready at the same time.

Step 5 β€” Code: Clean Your Page HTML A code step removes all script tags, style tags, and HTML markup from your page. The result is plain readable text, trimmed to 8,000 characters to keep AI costs low and responses fast.

Step 6 β€” Code: Clean Competitor Page HTML The same cleaning process runs on the competitor’s page. This step also carries forward all the form variables (keyword, URLs, business name, run date) so nothing is lost in the merge.

Step 7 β€” Merge: Combine Both Pages Both cleaned page texts β€” yours and the competitor’s β€” flow into a merge step that combines them into a single pipeline for the next step.

Step 8 β€” Code: Combine Page Data A code step safely joins both items into one clean object. If either page failed to scrape, it uses a fallback message instead of crashing the workflow.

Step 9 β€” AI Agent: Gap Analyzer GPT-4o-mini receives both page texts, the target keyword, business name, and both URLs. It produces a plain-text 6-section analysis: keyword usage comparison, topics your page is missing, topics you have that the competitor lacks, content depth and quality comparison, five priority actions ranked by impact, and a quick 3-sentence verdict.

Step 10 β€” OpenAI: GPT-4o-mini Model This is the language model powering the AI Agent. It is configured with a temperature of 0.4 for consistent, factual analysis and a max token limit of 1,500 to keep reports concise.

Step 11 β€” Set: Prepare Slack Message All report fields are assembled into a single clean object: the AI analysis, both URLs, target keyword, business name, and run date. This is the complete payload that goes to Slack.

Step 12 β€” Slack: Send Gap Report The full report is posted to your Slack channel in a formatted message. It includes the business name, keyword, run date, both URLs, the full 6-section AI analysis, and a footer noting the report was generated by n8n + GPT-4o-mini.


Key Features

βœ… Parallel scraping β€” Both pages are fetched at the same time, not one after the other, saving you time on every run βœ… Auto HTML stripping β€” Scripts, styles, and all tags are removed automatically β€” no manual cleanup needed βœ… Token budget control β€” Each page is hard-capped at 8,000 characters so API costs stay predictable βœ… Fallback handling β€” If a page fails to scrape, the workflow continues and notes the failure rather than crashing βœ… 6-section structured report β€” Every report follows the same format so results are easy to compare across competitors and dates βœ… Slack delivery with metadata β€” Reports arrive with business name, keyword, run date, and both URLs for full context βœ… Plain text output β€” No markdown symbols in the AI analysis, making it easy to paste directly into a doc or client report βœ… One-form trigger β€” The whole workflow starts with a single form submission β€” no coding, no manual steps


Customisation Options

Change the text limit per page β€” In nodes 5. Code β€” Clean Your Page HTML and 6. Code β€” Clean Competitor Page HTML, change .substring(0, 8000) to a higher number (e.g. 12000) if you want deeper analysis on long-form pages. Note this will increase GPT token usage.

Add email delivery β€” After node 11. Set β€” Prepare Slack Message, add a Gmail or SMTP node to also send the report by email. Use the same gapReport variable for the email body.

Save reports to Google Sheets β€” Add a Google Sheets node after the Slack node to log every run: business name, keyword, date, competitor URL, and a summary of the verdict section.

Schedule weekly competitor checks β€” Replace the form trigger with a Schedule trigger and a Set node with hardcoded URLs and keywords to automatically run gap analysis every Monday morning.

Expand the AI report sections β€” In node 9. AI Agent β€” Gap Analyzer, edit the prompt to add a Section 7 covering suggested internal links, or a Section 8 comparing schema markup signals.


Troubleshooting

OpenAI credential not working:

Scraping returns a 403 or empty result:

Slack message not arriving:

Report is too short or generic:

Form submission not triggering the workflow:


Support

Need help setting this up or want a custom version built for your team or agency?

πŸ“§ Email: info@incrementors.com 🌐 Website: https://www.incrementors.com/contact-us/

πŸ”— Nodes Used

HTTP Request, Slack, AI Agent, OpenAI Chat Model, n8n Form Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup