Skip to content

EbubeIreneaus/market_ai_automation_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRICE EXTRACTION & COMPETITIVE PRICING INTELLIGENCE PIPELINE

OVERVIEW

This project is an end-to-end price intelligence automation pipeline designed to:

  • Extract competitor prices (Amazon & BestBuy) for 4 products
  • Compare them against internal company prices
  • Detect price gaps and cheapest sellers
  • Generate executive-level insights using Generative AI
  • Distribute results via Email and Google Sheets
  • Perform weekly trend analysis and pricing recommendations

The system is split into TWO AUTOMATED WORKFLOWS:

  1. Daily Price Monitoring (Operational)
  2. Weekly Price Pattern Analysis (Strategic)

The goal is fast decision-making, not raw data.

TECH STACK

  • Playwright: Browser automation for dynamic sites (Amazon JS rendering)
  • Python
  • Pandas: Data normalization & comparison
  • Google Generative AI (GenAI): Analysis & executive summaries
  • Google Sheets (Excel equivalent)
  • Google Apps Script: Reporting + Email delivery

===================================== WORKFLOW PART 1: DAILY PRICE MONITORING

RUN FREQUENCY

Daily (cron / scheduler)

OBJECTIVE

Track current competitor prices, detect underpricing/overpricing, and notify management with clear actions.

STEPS

  1. PRODUCT INPUT

  • Product name
  • My company price
  • Amazon product URL
  • BestBuy product URL
  1. PRICE EXTRACTION

  • Playwright launches a real browser
  • Simulates human behavior (JS execution, DOM load)
  • Scrapes:
    • Amazon price
    • BestBuy price
  • Handles:
    • Dynamic content
    • JS-rendered prices
    • Delayed page loads
  1. DATA NORMALIZATION

Raw prices are cleaned and converted to float.

Example structure: { "product_name": name, "amazon_price": amazon_price, "bestbuy_price": bestbuy_price, "my_price": my_price, "diff_amazon": amazon_price - my_price, "diff_bestbuy": bestbuy_price - my_price, "cheapest": min(price_dict, key=price_dict.get) }

  1. PRICE COMPARISON LOGIC

For each product:

  • Compare My Price vs Amazon
  • Compare My Price vs BestBuy
  • Identify cheapest seller
  • Flag overpriced products
  • Quantify price gaps
  1. GENERATIVE AI ANALYSIS (DAILY)

The normalized dataset is sent to Google GenAI.

GenAI outputs:

  • Executive Summary (high-level)
  • Per-product breakdown:
    • Price comparison
    • Overpriced status
    • Cheapest competitor
    • Clear recommended action

Example outcomes:

  • Maintain price
  • Reduce price
  • Urgent price correction
  • Marketing advantage opportunity
  1. REPORT DISTRIBUTION

  • Executive summary sent to Company Manager via Email
  • Full dataset appended to Google Sheets using Apps Script
  • Sheet acts as the historical price database

======================================== WORKFLOW PART 2: WEEKLY PRICE INTELLIGENCE

RUN FREQUENCY

Weekly (once every 7 days)

OBJECTIVE

Move from daily reactions to strategic pricing decisions using trends.

STEPS

  1. DATA FETCH (LAST 7 DAYS)

  • Google Apps Script fetches:
    • Last 7 days of price data
    • All products
    • All competitors
  1. DATA AGGREGATION

Using Pandas:

  • Average competitor price per product
  • Price volatility
  • Frequency of undercutting
  • Trend direction (increasing / decreasing)
  1. GENERATIVE AI ANALYSIS (WEEKLY)

The 7-day dataset is sent to Google GenAI.

GenAI analyzes:

  • Competitor pricing patterns
  • Repeated underpricing
  • Temporary vs consistent discounts
  • Risk of price wars
  • Margin pressure signals
  1. WEEKLY STRATEGIC OUTPUT

GenAI generates:

  • Weekly Executive Summary
  • Product-level insights:
    • Stable vs unstable pricing
    • Aggressive competitors
    • Recommended pricing strategy
  • Actionable recommendations:
    • Hold price
    • Temporary discount
    • Permanent price adjustment
    • Monitor only
  1. WEEKLY REPORT DELIVERY

  • Strategic report emailed to management
  • Summary logged in Google Sheets (weekly tab)
  • Enables long-term pricing decisions

================================ DESIGN PHILOSOPHY

  • Data first, opinions later
  • Automation over manual review
  • Executive-friendly output
  • No dashboards needed to understand results
  • Clear actions, not raw numbers

================================ FUTURE EXTENSIONS (OPTIONAL)

  • Add more competitors
  • Add alerting for extreme price gaps
  • Integrate margin data
  • Slack / WhatsApp notifications
  • Predictive pricing with historical trends

================================ RESULT

A reliable, scalable, and decision-focused pricing intelligence system that:

  • Runs daily without supervision
  • Thinks weekly like a strategist
  • Turns scraped prices into business actions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages