OBLYTECH Logo
OBLYTECH Logo

Workflow Studio Flow Triggers: Types, Run Rules and Setup

A Workflow Studio flow trigger is the event that starts a flow and supplies its starting data. Pick a trigger type from record, scheduled, REST API, application, inbound email, or external event (webhook) triggers, then narrow it with start conditions and session settings. Choose by the event that starts the work, since each later step reads its data.

Why the trigger shapes the flow

The actions, flow logic and subflows after a trigger read from the record or payload it provides. When a caller must pass different values on each run, use a subflow, which accepts variable input; a trigger does not.

Put conditions inside the trigger where you can. Starting a flow when its condition holds uses fewer resources than starting it, pausing it at a Wait for condition step, and resuming it later.

Record triggers and run rules

Record triggers start a flow when a record is created, updated, or either created or updated. Updated and Created or updated also require a run rule.

Run rule What it does
For each unique change Runs for each unique update to a non-system field, even while the flow is already running
Once Runs one time for the life of the record
Only if not currently running Runs for each unique change when no run is in progress on that record
For every update Runs on each update, regardless of runs already in progress

Uniqueness is judged against each record’s change history. If an incident’s State moves from In Progress to On Hold, the flow can run. If State then returns to In Progress, that change does not start the flow again.

Two hazards follow. A flow set to For each unique change can recurse in non-interactive sessions when it changes its own trigger record. A flow with approval actions should normally run its trigger once; to request approval again, use Go back to flow logic. Record triggers also ignore records changed by update sets or XML imports, and Service Catalog tables no longer appear as record trigger tables. When two flows share a table, give each one unique conditions, since identical filters leave the run order undefined.

Scheduled, REST API and external triggers

Scheduled triggers start a flow at a set time or at a repeating interval, through the choices Daily, Weekly, Monthly, Run Once, and Repeat. They use the instance time zone. Because flows are processed asynchronously, a run may start a little after its exact time when the queue is busy.

The REST API asynchronous trigger starts a flow from an inbound API call or webhook without custom code. It requires an Integration Hub Enterprise subscription.

External triggers respond to events in third-party applications such as Jira, GitHub, Docusign eSignature, and Microsoft Azure DevOps Boards. Creating an external event source needs the External Trigger Builder plugin installed on the instance. In the Parser section, you paste the payload JSON from the third-party application, and Visualize objects turns it into data pills for conditions.

Application triggers

Trigger Starts when Points that affect the build
Service Catalog A request for one catalog item is submitted The requested item becomes the trigger record. Catalog variables cannot appear in the condition, so read them in the flow body
SLA Task A task matches an SLA definition condition SLA Task triggers start a flow from an SLA Definition record. Add SLA Percentage Timer actions to say what the flow does when the attached task reaches set percentages of completion.
Kafka Message A message arrives on a Kafka topic Messages arrive with headers, a payload and a key. Messages with the same key are processed in order. This trigger requires a Stream Connect subscription and the Stream Connect Installer plugin.
MetricBase A MetricBase trigger condition is met Requires the MetricBase application
Proactive Analytics A KPI score or threshold is met Requires a Performance Analytics subscription that includes Proactive Analytics

For a Service Catalog flow, create the catalog item and, if the flow uses stages, clear its Workflow and Execution Plan fields. Build and activate the flow, then select it in the Flow field on the catalog item.

Inbound email triggers

An inbound email trigger starts a flow when the instance receives an email. Triggers take priority over inbound email actions, so an email reaches an action after the triggers have passed it on. Triggers also give more control, through the Move Email Attachments to Record, Associate Record to Email and Look up email attachments actions. Email conditions draw on the Email table, so Receive type set to Reply catches replies to a notification.

By default, one flow processes an inbound email. To let several flows process it, set the system property glide.hub.flow.inbound_email_trigger.show_advanced to true. Order and Stop processing then appear on each trigger; a lower Order value gives higher priority. This adds maintenance effort and can reduce performance, so enable it when a sequence is genuinely needed.

An inbound email flow runs as the sender. An unrecognized sender runs as the Guest user. Set Run as to the user who initiates the session, and for elevated work, call a subflow that runs with the required roles.

Choosing a trigger type

If the flow should start when… Choose
A record is created or updated Record trigger
A set time or interval arrives Scheduled trigger
Your own system sends an API call or webhook REST API asynchronous trigger
A supported third-party application sends an event External event (webhook) trigger
A specific catalog item is requested Service Catalog trigger
A task reaches an SLA condition SLA Task trigger
An email arrives at the instance Inbound email trigger
A message is published to a Kafka topic Kafka Message trigger

Saving and reusing a trigger

Saved flow triggers let many flows share one definition. A change to the saved trigger applies to each flow that uses it. Flow authors can be allowed to view its conditions, or to add their own, and their additions do not change the saved trigger. From the Yokohama release onward, saved flow triggers support only record-based triggers, so check your release before planning a saved scheduled or external trigger.

To detach a trigger from a flow, open Workflow Studio, select Triggers, then the trigger. Open More Actions, select Associated objects, choose the flow, and use the Detach saved trigger icon. Confirm, then save the flow. Detaching copies the start conditions into the flow, so do this before you change those conditions or delete the trigger.

Advanced options

Advanced options control when and where a flow runs. The session setting offers Only Run for Non-Interactive Session, Only Run for User Interactive Session, or Run for Both Interactive and Non-Interactive Sessions. The user setting can exclude listed users, restrict the flow to listed users, or run for any user. The table setting chooses between Run only on current table and Run on current and extended tables.

Run flow in background is the default and runs asynchronously. Run flow in foreground runs in the current session, which suits a case where the next task must open straight after the previous one closes. A foreground flow can hold the session thread, so avoid it when the flow includes non-interruptible actions such as run script.

Data a trigger supplies

Record triggers supply the record and its table sys_id, plus Run Start Date/Time in the local time zone and Run Start Time UTC as a string. Updated and Created or updated triggers add a Changed Fields array, which needs For Each logic. Service Catalog triggers supply the requested item record. SLA Task triggers supply the task SLA record. Inbound email triggers supply the email record, body text, subject, sender User record and From address.

Setup checklist

  1. Confirm the role. Service Catalog, SLA Task and inbound email triggers need flow_designer or admin. Saved triggers also accept trigger_designer.
  2. Create the flow and set Run as to suit the trigger.
  3. Add the trigger, then set its type, table or schedule, run rule and conditions.
  4. Set the advanced options for session, user, table and placement.
  5. Add actions and subflows, reading catalog variables in the body.
  6. Test the flow, confirm the triggering users can see the data in the conditions, then activate it.

Frequently asked questions

Can one trigger serve several flows?

Yes. Many flows can select one saved flow trigger, and a change to it applies to each of them.

Why did my flow not run when the record returned to an earlier state?

Under For each unique change, the system checks each change against the record’s history. A move from In Progress to On Hold can run the flow, but a later move back to In Progress does not.

Can a Service Catalog trigger use catalog variables in its condition?

No. Read the variables in the flow body with the Get Catalog Variables action.

Can more than one flow process the same inbound email?

Not by default. Set the glide.hub.flow.inbound_email_trigger.show_advanced property to true, then give each flow an Order value and a Stop processing choice.

What happens when an email comes from an unrecognized sender?

The flow runs as the Guest user. Set Run as to the user who initiates the session, and call a subflow with the required roles if elevated privileges are needed.