Skip to main content

trigger-chains Scenario 2 — Scrape Jobs → Transform → PostgreSQL → Email

Written by RTILA X Engineering Team

Beginner ~4 min

What You'll Learn

Create a simple two-step trigger chain

Real-World Use Case

Saving scraped data and sending via email

LIVE DEMO

Database Insert Pipeline

TitleCompanySalary
Senior Frontend Engineer BrightPixel Labs $120,000 - $155,000
Full Stack Developer CodeCraft $110,000 - $140,000
Backend Engineer (Go) ScaleWorks $130,000 - $160,000
DevOps Engineer CloudNest $125,000 - $150,000
Mobile Developer (Flutter) AppWise $105,000 - $135,000
QA Automation Engineer TestBridge $95,000 - $120,000

6 records ready for PostgreSQL insert

EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Scrape_Jobs_For_DB",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/trigger-chains/2"
    ]
  },
  "datasets": {
    "jobs": {
      "item_selector": "css=table.job-data tbody tr",
      "properties": [
        {
          "name": "title",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "company",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        },
        {
          "name": "salary",
          "type": "text",
          "selector": "css=td:nth-child(3)"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=table.job-data"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "jobs"
      }
    }
  ]
}
  

Trigger Chain Configuration

  • transform — normalizes salary strings and prepared columns.
  • postgresql — inserts the transformed rows into a database table.
  • send_email — sends a summary email after the database write.

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.

Database insertion patterns often rely on a transform step before the final insert. The trigger chain handles the transformation and sends an email when the operation completes.

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 1 RTILA X command and is referenced in 1 learning article.

Continue Learning

Was this helpful?