Skip to main content

trigger-chains Scenario 4 — Scrape Social Posts → AI Sentiment → Database → Alert

Written by RTILA X Engineering Team

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

What You'll Learn

Handle errors across trigger chains

Real-World Use Case

Ensuring data integrity in multi-step pipelines

LIVE DEMO

Sentiment Analysis Pipeline

Positive: 3

Negative: 2

Neutral: 1

EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Scrape_Social_Posts",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/trigger-chains/4"
    ]
  },
  "datasets": {
    "social_posts": {
      "item_selector": "css=.sentiment-post",
      "properties": [
        {
          "name": "post_text",
          "type": "text",
          "selector": "css=.post-text"
        },
        {
          "name": "sentiment",
          "type": "attribute",
          "selector": "css=.sentiment-label",
          "attribute": "data-sentiment"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=.sentiment-post"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "social_posts"
      }
    }
  ]
}
  

Trigger Chain Configuration

  • ai_completion — classifies each post as positive, negative, or neutral.
  • database_insert — saves the classified posts to a database.
  • alert — sends an alert when negative posts are detected.

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.

AI sentiment analysis transforms raw social text into structured categories. A trigger chain can store the analysis and notify teams when negative sentiment appears.

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?