Trigger Connector
Overview
Section titled “Overview”The Trigger connector implements conditional logic using MXL (Meddle Expression Language).
Connector Type: MeddleTrigger
Direct Dispatch Mode
Section titled “Direct Dispatch Mode”Send custom payload when condition is true:
{ "type": "MeddleTrigger", "config": { "mode": "DirectDispatch", "condition": "temperature > 80 || pressure > 10", "payload": { "alert_type": "critical", "severity": "high", "message": "Threshold exceeded" } }}When condition is true, outputs the custom payload.
Passthrough Mode
Section titled “Passthrough Mode”Pass original data only when condition is true:
{ "type": "MeddleTrigger", "config": { "mode": "Passthrough", "condition": "temperature > 25 && status == \"active\"" }}When condition is true, passes the original payload through.
MXL Expressions
Section titled “MXL Expressions”Comparison Operators
Section titled “Comparison Operators”>Greater than<Less than>=Greater than or equal<=Less than or equal==Equal!=Not equal
Logical Operators
Section titled “Logical Operators”&&AND||OR
Examples
Section titled “Examples”temperature > 80pressure < 10temperature > 80 && pressure < 10humidity > 60 || temperature > 25status == "active"count != 0temperature >= 20 && temperature <= 30Use Cases
Section titled “Use Cases”- Alert on threshold violations
- Filter data based on conditions
- Route data conditionally
- Implement business logic
Example: Temperature Alert
Section titled “Example: Temperature Alert”{ "type": "MeddleTrigger", "config": { "mode": "DirectDispatch", "condition": "temperature > 80", "payload": { "alert": "high_temperature", "severity": "warning" } }}Best Practices
Section titled “Best Practices”- Use Passthrough for filtering
- Use DirectDispatch for alerts and notifications
- Combine multiple conditions with
&&and|| - Test conditions with various input values
Related Connectors
Section titled “Related Connectors”- Alert - Send notifications
- Filter - Simple key filtering
- MXL Reference - Complete MXL documentation