A
Thread Author
Abhi
Guest
This is a submission for the AI Agents Challenge powered by n8n and Bright Data
Selling on Amazon is one thing; being discovered is another. RankGap is a multi-agent AI system designed to uncover Amazon ranking blind spots for your products using real-time data. It identifies where your product ranks, which search queries you’re missing, and how to optimize for better visibility.
Unlike generic reports, RankGap delivers actionable Amazon SEO insights by combining intelligent query generation, ranking analysis, and gap detection.
Being discovered on Amazon isn’t just luck — it’s about strategic keyword targeting and SEO-aware visibility tracking.
Key challenges sellers face:
Around 60% of product discoveries on Amazon happen via keyword or query searches.
Try out the Live App - RankGap
There are 3 workflows involved:
Main Workflow:
The main workflow is the entry point of the entire pipeline. It executes the following steps:

Total number of n8n nodes in this workflow - 19
The json file of the Main workflow can be found here
Download Product Data from Amazon Workflow:
This workflow’s sole job is to scrape Amazon product data using the Bright Data web scraper. Steps:

Total number of n8n nodes - 8
The json file of the Main workflow can be found here
Analysis of the scraped product data Workflow:
This workflow performs structured analysis on the target product and its competitors:

Total number of n8n nodes in this workflow - 18
The json file of the Main workflow can be found here
Combined total nodes - 19 + 18 + 8 = 45
There are 4 AI agents in the complete workflow. Refer the following table for detailed info:
Used for:
Tech stack:
Screenshots:
Form input:

Results:





This was my first time working with both n8n and Bright Data. While there was a learning curve, the community support on discord and the documentation made the process smooth.
Some key challenges and learnings:
Building RankGap required handling the complexities of Amazon search, real-time scraping, and nested n8n loops — but the result is a powerful system that makes Amazon SEO more transparent and actionable.
If you found this useful, press
Like or drop a comment.
Thanks for reading!
Continue reading...
What I Built
Selling on Amazon is one thing; being discovered is another. RankGap is a multi-agent AI system designed to uncover Amazon ranking blind spots for your products using real-time data. It identifies where your product ranks, which search queries you’re missing, and how to optimize for better visibility.
Unlike generic reports, RankGap delivers actionable Amazon SEO insights by combining intelligent query generation, ranking analysis, and gap detection.
Why This Matters
Being discovered on Amazon isn’t just luck — it’s about strategic keyword targeting and SEO-aware visibility tracking.
Key challenges sellers face:
- Keyword uncertainty: Many sellers don’t know which queries actually drive traffic.
- Manual rank tracking is slow: Monitoring dozens of queries across multiple products is tedious.
- Visibility gaps cost revenue: Missing even one relevant search query can drastically affect sales.
- Real-time complexity: Tracking and analyzing search data dynamically is challenging without automation.

Demo
Try out the Live App - RankGap
n8n Workflow
There are 3 workflows involved:
- Main Workflow
- Download Product Data from Amazon
- Analysis of the scraped product data
Main Workflow:
The main workflow is the entry point of the entire pipeline. It executes the following steps:
- The pipeline is triggered via a webhook (a POST request) with the following payload:
Code:
{
"url": "https://www.amazon.com/dp/B07QTVRF3J", -- amazon product url
"queryCount": 3, -- number of search queries to generate
"execution_id": <uuid> -- identifying workflow end result from supabase
}
The given Amazon product is scraped using the Download Product Data from Amazon workflow, returning the full attribute list from Bright Data.
A Search Query Generator agent produces multiple relevant search queries (see AI agents table below for prompts and details).
Search results for each query are scraped using Bright Data Unlocker. The Amazon search URL pattern is:
https://www.amazon.com/s?k=
The HTML returned is parsed, and the top 20 product ASINs are extracted.
The Download Product Data from Amazon workflow scrapes detailed info for these top 20 products.
Data transformations are applied to retain only relevant attributes.
Both the target product and competitors are sent to the Analysis of the Scraped Product Data workflow.
The final analysis is stored in a Supabase database, linked via the execution_id passed at trigger time.

Total number of n8n nodes in this workflow - 19
The json file of the Main workflow can be found here
Download Product Data from Amazon Workflow:
This workflow’s sole job is to scrape Amazon product data using the Bright Data web scraper. Steps:
- Input is a list of product URLs in the following format:
Code:
[
{
"url": "https://www.amazon.com/dp/B07DSVRF2J"
},
{
"url": "https://www.amazon.com/dp/B07ABCDF2J"
}
]
- Bright Data Verified Node triggers a collection using the Trigger Collection By URL operation, returning a snapshot ID.
- Using Monitor Snapshot and an n8n Loop node, the workflow waits until the snapshot is ready.
- Once complete, the Download Snapshot operation retrieves product data.

Total number of n8n nodes - 8
The json file of the Main workflow can be found here
Analysis of the scraped product data Workflow:
This workflow performs structured analysis on the target product and its competitors:
- Input: Target product JSON + search results JSON.
- Sent to the Visibility & Presence Analysis Agent for ranking visibility.
- Sent to the Competitor & Attribute Gap Analysis Agent for feature/attribute gaps.
- Sent to the Final Recommendations & Action Plan Agent for actionable next steps.

Total number of n8n nodes in this workflow - 18
The json file of the Main workflow can be found here
Combined total nodes - 19 + 18 + 8 = 45
Technical Implementation
There are 4 AI agents in the complete workflow. Refer the following table for detailed info:
Agent Name | Functionality | LLM Model | BackUp Model | System Prompt Instructions | Memory | Tools |
---|---|---|---|---|---|---|
Search Query Generator | Generate natural language keyword and search queries based on input product data | GPT-4o | Gemini 2.5 Pro | https://github.com/Better-Boy/RankGap/blob/main/prompts.txt#L1 | NA | NA |
Visibility & Presence Analysis Agent | Analyze visibility and presence of the target product in the search results | GPT-5-mini | Gemini 2.5 Pro | https://github.com/Better-Boy/RankGap/blob/main/prompts.txt#L20 | NA | NA |
Competitor & Attribute Gap Analysis | Analyze attribute gap between the target and competitor products | GPT-5-mini | Gemini 2.5 Pro | https://github.com/Better-Boy/RankGap/blob/main/prompts.txt#L71 | NA | NA |
Final Recommendations & Action Plan Agent | Final Recommendation on what can be done better | GPT-5-mini | Gemini 2.5 Pro | https://github.com/Better-Boy/RankGap/blob/main/prompts.txt#L122 | NA | NA |
Bright Data Verified Node
Used for:
- Scraping Amazon search page HTML via Web Unlocker
- Submitting multiple URLs for product scraping
- Monitoring snapshot status
- Downloading product data snapshots
Application
Tech stack:
- Backend - n8n cloud webhook
- Database - supabase to store results
- Frontend - React + vite + tailwind
- Deployment - Vercel
Screenshots:
Form input:

Results:





Journey
This was my first time working with both n8n and Bright Data. While there was a learning curve, the community support on discord and the documentation made the process smooth.
Some key challenges and learnings:
Even when a Bright Data snapshot shows as “ready,” downloading sometimes fails withstatus: building
. Increasing the wait time from 5s → 10s solved this.
Cloudflare times out requests after 100 seconds, while n8n workflows can run up to 3 minutes. My workflow often needed 3–5 minutes, so I used anexecution_id
stored in Supabase. By long-polling Supabase from the frontend, I ensured results were fetched once available.
Building RankGap required handling the complexities of Amazon search, real-time scraping, and nested n8n loops — but the result is a powerful system that makes Amazon SEO more transparent and actionable.
If you found this useful, press

Thanks for reading!

Continue reading...