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

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

RTILA X PROJECT JSON

    {
  "name": "Scrape_Three_Competitor_Sites",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/trigger-chains/3"
    ]
  },
  "datasets": {
    "site_prices": {
      "item_selector": "css=table.competitor-data tbody tr",
      "properties": [
        {
          "name": "site",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "product_name",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        },
        {
          "name": "price",
          "type": "text",
          "selector": "css=td:nth-child(3)"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=table.site-a-prices"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "site_prices"
      }
    },
    {
      "command": "goto",
      "params": {
        "url": "https://learn.rtila.com/scenarios/trigger-chains/3?site=b"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=table.site-b-prices"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "site_prices"
      }
    },
    {
      "command": "goto",
      "params": {
        "url": "https://learn.rtila.com/scenarios/trigger-chains/3?site=c"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=table.site-c-prices"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "site_prices"
      }
    }
  ]
}
  

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?