On Demand Flow
📖 Definition
The On Demand Flow trigger allows users to manually start a flow by clicking a Run button. Unlike automated triggers that respond to events or schedules, this trigger provides full control over when a flow should begin, making it ideal for ad hoc, user-driven, or testing scenarios.
Key capabilities include:
- Manual flow initiation through the Zenphi interface
- Captures essential metadata such as the start time and initiator details
- Useful for flows that require human review or decision-making before execution
- Supports Workspace users only as initiators, ensuring controlled and auditable access
This trigger is especially useful when actions should only occur upon explicit user confirmation, providing flexibility and precision in flow management.
🎯 Example Use Cases
1. Manual Approval ProcessStart a flow on demand to review and approve documents, ensuring actions only proceed after human verification.
2. Ad Hoc Data ExportRun a flow manually to export reports or data snapshots whenever needed, without waiting for a scheduled trigger.
3. Incident ResponseTrigger a flow to initiate troubleshooting steps or notifications immediately when an issue is detected by a user.
4. Conditional Run: Role-Based AccessUse Conditional Run to restrict flow execution only to initiators with specific roles or email addresses, enhancing security and compliance.
5. Conditional Run: Time-Sensitive ActionsConfigure conditions so the flow runs only if started during business hours or within a specified date range, ensuring actions occur at appropriate times.
6. Testing and DebuggingManually start flows to test new processes or changes before deploying automated triggers in production.
⚙️ Configuration
The configuration for the On Demand Flow trigger is straightforward and divided into two main sections: Settings and Conditional Run.
Settings
No setup is required in this section. The trigger is ready to use as soon as you add it to your flow — just save and run whenever you want.
Conditional Run
The Conditional Run feature for the On Demand Flow trigger allows you to define specific conditions that must be met before the flow proceeds — even after a user clicks the Run button. If the trigger is manually activated but the conditions are not met, the flow will be skipped and no further steps will be executed.
This adds an additional layer of control and ensures that flows only run under approved or valid circumstances, even when launched by a user.
How Conditional Run Works
When “Conditional Run” is enabled, you can configure one or more rules using AND / OR logic. Each condition is made up of four components:
1. Condition Type
- When: The flow will run only if this condition is true.
- Except When: The flow will not run if this condition is true.
This lets you define both inclusive and exclusive scenarios.
2. Value to Evaluate
This is the item you want to apply the condition to. You can choose from:
-
Trigger Outputs – data generated when the user clicks the Run button. For this trigger, the available outputs include:
- Start Time
- Initiator Email Address
- Initiator Full Name
-
Vaults – secure, static values such as API keys, secret tokens, or organizational parameters.
Vaults are managed from your workspace under Settings → Vaults.Vault values are encrypted and cannot be viewed or modified inside the flow — they are only used securely during runtime.
3. Operator
This determines how the system compares the values. Supported operators include:
- Equals / Not Equals
- Greater Than / Greater Than or Equal
- Less Than / Less Than or Equal
- Between
- Is Null / Is Not Null
Choose the operator that best fits the logic you're trying to implement.
4. Comparison Value
This is the value you want to compare against. It can be:
- Another Trigger Output
- A Vault value
- A static (manual) entry such as a number, text string, or date
🧠 Example Conditions for On Demand Trigger
-
Run the flow only when the Initiator Email equals
[email protected]
-
Skip the flow except when Start Time is between business hours
-
Run the flow only when Initiator Full Name is not null
-
Combine rules like:
- Initiator Email =
[email protected]
AND - Vault Role =
Manager
- Initiator Email =
This feature gives you precise control over who can start a flow and under what conditions, even though the flow is started manually. It's particularly useful for enforcing security rules, limiting access, or ensuring flows run at the right time.
📤 Outputs
When the On Demand Flow trigger runs, it generates important information about the flow execution and the user who started it. These outputs are accessible throughout the flow and can also be referenced in the Conditional Run section to control whether the flow should proceed.
1. Start TimeThe exact date and time when the flow was manually started. This timestamp can be used for logging, reporting, or making decisions later in the flow based on when the flow began.
**2. Initiator (User Details)**Details about the workspace user who triggered the flow manually, including:
- Email Address: The email of the user who started the flow, useful for tracking, notifications, or permission checks.
- Full Name: The full name of the user, helpful for personalized messages or audit trails.
Updated 1 day ago