This is a submission for the AI Agents Challenge powered by n8n and Bright Data
What I Built
The Dropship AI Agent is designed to be a dropshipping intelligence solution: an unstoppable workflow designed to automate product research and uncover products. It uses two powerful tools, n8n and Bright Data, to create a dynamic, real-time AI assistant.
Demo
n8n Workflow
- Product idea → n8n via a webhook: A user's product idea is passed to n8n via a webhook.
- Bright Data → scrape product data: Bright Data scrapes product data from a wholesale website.
- AI agent analyses data → generates a recommendation: An AI agent analyses the data and generates a structured recommendation.
The final, cleaned data is sent back to the application.
Dropship AI Agent
Overview
This is a web application designed to help users discover wholesale products with AI-powered recommendations from verified suppliers. It features a robust search, product comparison, and direct supplier inquiry capabilities, all powered by n8n workflow automation.
Features
- AI-Powered Product Search: Find products based on your search queries.
- Product Comparison: Compare up to 3 products side-by-side on key attributes.
- Direct Supplier Inquiry: Email suppliers directly from the app.
- Favorite Products: Save products to a favorites list for easy access.
- Responsive Design: Optimized for various screen sizes.
Technologies Used
- React: Frontend library for building user interfaces.
- Vite: Fast development build tool.
- Tailwind CSS: Utility-first CSS framework for styling.
- Lucide React: Icon library.
- n8n: Workflow automation for product search and email sending.
Getting Started
Follow these steps to get the project up and running on your local machine.
Prerequisites
…Technical Implementation
🧠 Stage 1: Product Discovery with the AI Agent
-
Webhook → Bright Data: Pass the
productIdea
parameter.
The process begins with the search input from a user, who provides a product idea.
n8n Workflow: This workflow is triggered by the user's search item. Once a specific product idea is identified, the n8n workflow transitions to the data collection phase.
"productIdea": "keyword"
📈 Stage 2: Bright Data Verified Node
- Bright Data → AI Agent: Pass scraped supplier data.
Bright Data unlocks the product catalogue and searches for 3-5 potential product ideas based on the user's input.
Dynamic Web Scraping: The workflow uses a Bright Data unlocker to perform a real-time, dynamic search on the Alibaba wholesale website.
The data is then passed to extract a complete, rich set of information with the following selectors (where available):
productUrl, imageUrl, title, priceText, originalPriceText, discountText, moq, estDelivery, sales, companyName, isVerified, supplierYears, supplierYears, ratingValue, ratingCount
I created a product data model based on the n8n workflow output. Then parsed the raw HTML from the product container to extract and clean each selector. This cleaned data was then used to rebuild the product cards on the frontend.
export interface Product {
id?: string;
title: string;
description: string;
wholesalePriceRange: string;
moq: string;
supplierInfo: string;
shippingInformation: string;
productSpecifications: string;
productRatings: number;
productReviews: string;
supplierRatings: number;
supplierReviews: string;
marketDemand: 'High' | 'Medium' | 'Low' | 'Unknown';
images: string[];
}
📊 Stage 3: Analysis, Filtering, and Final Recommendation
- AI Agent → Response Webhook: Send analysed results back.
AI Agent Node: An n8n LangChain agent node transforms the raw extracted data. It is instructed to act as a data analyst. It sorts and filters the suppliers based on key criteria (lowest price, highest rating, low MOQ if available) and performs sentiment analysis on supplier reviews to identify the top recommendations in an array.
You are an expert dropshipping data analyst. Analyse the following search results and provide product recommendations...
Product Data Model: The AI agent's analysis is then sent back to the application frontend in a structured format. It renders the data into a familiar card for each item, passing the corresponding data as props that mimic the product cards on the target website.
{
"recommendations": [
{
"title": "Product title from scraped data",
"description": "Generated 2-3 sentence product description based on title",
"wholesalePriceRange": "Exact price range from scraped data",
"moq": "MOQ from scraped data",
"supplierInfo": "Company name",
"supplierCredibility": "estimated credibility assessment",
"shippingInformation": "Delivery time from scraped data + shipping notes",
"productSpecifications": "Generated basic specs based on product title/category",
"productRatings": 4.2, // Estimated rating (3.5-4.8 range)
"productReviews": "Generated realistic review summary",
"supplierRatings": 4.1, // Estimated supplier rating (3.0-4.7 range)
"supplierReviews": "Generated supplier review summary",
"marketDemand": "High|Medium|Low", // Based on product category analysis
"images": ["imageUrl from scraped data"]
}
],
"analysis": "Overall market analysis and selection rationale",
"recommendation": "Final recommendation with reasoning"
}
I did not add memory to my AI Agent. Instead, I created a custom hook for managing localStorage
to create a history thread that persists with browser refresh. That way, I could return to my application to find my favourited products without having to store them anywhere.
📧 Dynamic Email Sending
This 3-node workflow allows the user to contact a seller without leaving the application.
Hello,
I am interested in your product: [Product Title]
Price Range: [Product Wholesale Price Range]
MOQ: [Product MOQ]
Please provide more details about:
- Availability
- Shipping options
- Payment terms
- Sample availability
Best regards
There is no need for an agent to perform this task, as the details are taken directly from the product model and this general email template is used.
Journey: A Cat and Mouse Game 🐾
Initially, I could access Alibaba's products without a problem, but the detectors found me! 🕵️♀️ I easily resolved the CORS issue in n8n and the initial anti-bot detection.
Adding delays helped prevent rate limits, but this was only a temporary fix. ⏳ Soon, Alibaba changed its CSS structure, which broke my selectors. I could update my selectors but then it updated its robots.txt file, which my agent couldn't override.
I then targeted the AliExpress catalogue, but all I got in return was a standard HTML error page.🛡️ Next, I pivoted to using Google’s cached version, hoping for a kinder reception but alas, Google refused entry❌.
It seems my dropshipping agent is more of a digital detective, spending its days figuring out why it can't dropship, rather than what to dropship! Perhaps I should rename it the "Web Blocker Diagnostic Agent." 🤷♀️
Top comments (3)
This isn’t a dropship AI agent, it’s basically a speed-running competition against Alibaba’s anti-bot team. Respect for turning product research into a spy thriller.
Thanks for the comment 😂 ❤️
Nice to show how you are making the world a place that is worse to live in.