Skip to main content

trigger-chains Scenario 3 — Scrape 3 Competitor Sites → Merge → Compare → Report → Webhook

Written by RTILA X Engineering Team

Intermediate ~6 min
Prerequisites: trigger-chains/1 trigger-chains/2

What You'll Learn

Pass data between triggers

Real-World Use Case

Enriching data with external APIs

LIVE DEMO

Three-Site Price Scrape

Extract all three competitor price tables and the cheapest-price comparison.

Multi-Site Price Comparison

Site A
ProductPrice
Site B
ProductPrice
Site C
ProductPrice
Cheapest Price Comparison
ProductSiteCheapest Price
Wireless Noise-Cancelling Headphones site-c.example.com $239.99
4K Ultra HD Monitor site-b.example.com $405.99
Mechanical Gaming Keyboard site-b.example.com $129.00
Portable SSD 1TB site-c.example.com $97.99
Yoga Mat Premium site-b.example.com $39.99
EXPECTED OUTPUT

Cheapest Price Comparison

productName site price
Wireless Noise-Cancelling Headphones site-c.example.com 239.99
4K Ultra HD Monitor site-b.example.com 405.99
Mechanical Gaming Keyboard site-b.example.com 129
Portable SSD 1TB site-c.example.com 97.99
Yoga Mat Premium site-b.example.com 39.99
RTILA X PROJECT JSON

RTILA X Automation Project

scrape-three-competitor-sites.json
{
  "name": "Scrape_Three_Competitor_Sites",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/trigger-chains/3"
    ]
  },
  "datasets": {
    "site_a_prices": {
      "item_selector": "css=table.site-a-prices tbody tr",
      "properties": [
        {
          "name": "product_name",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "price",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        }
      ]
    },
    "site_b_prices": {
      "item_selector": "css=table.site-b-prices tbody tr",
      "properties": [
        {
          "name": "product_name",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "price",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        }
      ]
    },
    "site_c_prices": {
      "item_selector": "css=table.site-c-prices tbody tr",
      "properties": [
        {
          "name": "product_name",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "price",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        }
      ]
    },
    "comparison": {
      "item_selector": "css=table.comparison-result tbody tr",
      "properties": [
        {
          "name": "product_name",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "site",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        },
        {
          "name": "cheapest_price",
          "type": "text",
          "selector": "css=td:nth-child(3)"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "extract_data",
      "params": {
        "dataset": "site_a_prices"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "site_b_prices"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "site_c_prices"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "comparison"
      }
    }
  ]
}

Trigger Chain Configuration

  • merge — combines the three extracted datasets into one.
  • compare — selects the lowest price for each product.
  • report — generates a comparison report.
  • generic_webhook — posts the report to an external webhook.

Trigger chains are configured in the RTILA X UI, not via project JSON. The AI assistant can discuss them but cannot generate trigger chain configurations.

Multi-site price comparison is a classic post-processing use case. A trigger chain merges datasets, identifies the best offers, creates a report, and sends the report to an external service.

Did you complete this scenario?

Ready to run this automation?

Copy the project JSON above, open RTILA X, create a new project, and paste it.

This scenario covers 2 RTILA X commands and is referenced in 2 learning articles.

Continue Learning

Was this helpful?