Button Triggers
Manual workflow triggers activated by user interaction for on-demand automation.
Button Triggers: Manual Workflow Control
Button Triggers provide manual, on-demand workflow execution through user interaction. Unlike automated triggers that fire based on conditions or schedules, Button Triggers give you direct control over when specific automation sequences run.
Info: This is a Trigger node type that can be used to trigger workflows based on user interaction. When clicked or activated, the Button Trigger executes all of its child executor nodes.
Overview
Button Triggers are the simplest yet most versatile triggers in the Krill Platform. They enable operators to manually initiate workflows, test automation sequences, or perform one-time operations with a single click or tap from the Krill App interface.
Key Features
- Instant Execution: Trigger workflows immediately on user action
- Visual Interface: Interactive buttons in the Krill App UI
- Remote Control: Trigger workflows from any connected client
- Test Mode: Perfect for testing and debugging automation sequences
- Emergency Actions: Quick access to critical operations
- No Configuration Required: Works immediately after creation
How It Works
Button Triggers operate with minimal complexity:
- User Interaction: User clicks or taps the Button Trigger node in the UI
- State Change: Button transitions to EXECUTED state
- Child Execution: All child executor nodes are immediately triggered
- Workflow Runs: Connected automation sequence performs its operations
- Completion: Workflow completes and button is ready for next activation
Use Cases
- Manual Data Collection: Trigger one-time sensor readings on demand
- System Testing: Test automation sequences during development
- Emergency Controls: Quickly activate safety systems or shutdown procedures
- One-Time Operations: Perform occasional maintenance tasks
- User-Initiated Actions: Allow operators to start processes when needed
- Debug Workflows: Step through automation sequences for troubleshooting
- Demonstration Mode: Showcase automation capabilities to visitors
Example Workflows
Manual Sensor Reading:
- Trigger: Button
- Executor: Lambda (read sensor via serial device)
- Executor: Calculation (convert units)
- Target: Update DataPoint
Emergency Stop:
- Trigger: Button
- Executor: Logic Gate (disable multiple systems)
- Output: Set all safety pins to OFF
- Executor: OutgoingWebHook (send alert notification)
System Health Check:
- Trigger: Button
- Executor: Compute (check all sensor values)
- Executor: Calculation (aggregate status)
- Executor: OutgoingWebHook (send status report)
Manual Backup:
- Trigger: Button
- Executor: Lambda (export data)
- Executor: OutgoingWebHook (upload to cloud storage)
Integration Patterns
Button Triggers work well with:
- Executors: Directly control calculations, computations, and webhooks
- Logic Gates: Enable conditional manual operations
- Lambda Scripts: Trigger custom Python automation
- Data Points: Manually update or log data values
- Pins: Manual control of GPIO pins for testing
Best Practices
- Clear Naming: Give buttons descriptive names that indicate their function
- Safety Confirmations: For critical operations, consider using two-step processes
- Testing: Use buttons during development to test workflow components
- Documentation: Document what each button trigger does for operators
- Color Coding: Use visual cues to distinguish different button types
- Emergency Access: Keep emergency buttons easily accessible
Comparison with Other Triggers
| Trigger Type | Activation | Use Case |
|---|---|---|
| Button | Manual user action | On-demand operations |
| Cron Timer | Schedule-based | Recurring tasks |
| Threshold | Value-based | Automatic responses |
| IncomingWebHook | External API call | Integration with other systems |
Visual Feedback
When a Button Trigger executes, the Krill App provides visual feedback showing the node’s execution state, making it clear when the workflow is running and when it has completed.
Button Triggers are essential for providing manual control and testing capabilities in automated systems, ensuring operators can intervene when needed and developers can validate workflows during development.