Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Monitoring, Ops & Incidents

Monitoring, Ops & Incidents

Classify FRA track defects and gate tag-outs with OpenAI, Slack, Google Drive

Runs daily to classify track defects by FRA severity, compute speed restrictions, and hold high-severity segments for supervisor approval before tag-out.

What it does

📘 WORKFLOW DETAILS Short-Line Railroad FRA Track Defect Severity Router & Tag-Out Approval Gate Value: turns a daily track-inspection pull into an FRA-Part-213-style severity classification, a real speed-restriction/remedial-timeframe computation, and — for the segments that matter most — a supervisor approval gate before any segment is actually tagged out of service. Who it's for: short-line and regional railroad track-maintenance departments who run daily or periodic FRA Class-of-Track inspections and need defect severity triaged consistently, with a human always in the loop before the most severe (Class 5) calls take effect. How it works: 1. Schedule Trigger polls daily for segments due inspection. 2. Fetch Segments Due & Inspector Notes pulls each due segment's inspector notes as its own item. 3. Classify Defect Severity (Text Classifier, own Chat Model) reads the inspector's free-text notes and routes each segment into one of 4 categories: No Defect, Class 1-2 Minor, Class 3-4 Serious, Class 5 Immediate Halt. 4. Each category's own Set node stamps a defect_category field (Text Classifier itself never writes one — see the standing rule), then all 4 converge into Compute FRA Speed Restriction & Remedial Timeframe (Code), which computes a real speed restriction (mph) and remedial deadline off the track class + category. 5. Requires Immediate Tag-Out? branches: anything short of Class 5 is shaped straight to filing. A Class 5 call instead triggers Request Supervisor Tag-Out Approval — a genuine Slack send-and-wait gate. 6. Route Approval Response (3-way Switch) reads the supervisor's reply and finalizes as approved-as-recommended, approved-with-edit (supervisor's own text becomes the final action), or rejected (sent back for a field re-check). 7. Every path — non-urgent and all three approval outcomes — converges on Archive Defect Tag-Out Record, then Notify Track Supervisor & Dispatch. Node summary: Schedule Trigger → Set (normalize) → HTTP Request (segments due) → Text Classifier+Chat Model (severity) → Set×4 (category tag) → Code (speed/remedial calc) → If (tag-out gate) → Slack send-and-wait (approval) → Switch (3-way response routing) → Set×3 (finalize outcome) / Set (non-urgent shape) → Google Drive (archive) → Slack (notify). Input: the daily segments-due API response, one item per segment with inspector_defect_notes and track_class. Output: a Drive-

The steps

  1. Poll Segments Due for Inspection
  2. Normalize Poll Window
  3. Fetch Segments Due & Inspector Notes
  4. Classifier Model
  5. Classify Defect Severity
  6. Tag No Defect
  7. Tag Minor
  8. Tag Serious
  9. Tag Immediate Halt
  10. Compute FRA Speed Restriction & Remedial Timeframe
  11. Requires Immediate Tag-Out?
  12. Shape Non-Urgent Record
  13. Request Supervisor Tag-Out Approval
  14. Route Approval Response

19 steps in total.

Similar automations