Okta Workflows How-To: Six ways to trigger a flow

About the Author

Max Katz

Staff Developer Advocate, Okta Workflows

Max Katz is a Staff Developer Advocate for Okta Workflows. Max loves the no-code automation space and creating educational content. Before Okta, Max led the North America Developer Advocacy team at IBM. Before IBM, Max led developer advocacy for a cloud-based mobile app platform, Appery, helping it grow from zero to over 400,000 developers. Max regularly writes on his http://maxkatz.net blog. 

01 November 2022 Time to read: ~

A professionally dressed man is seated in a contemporary office space, working on a laptop

Okta Workflows is a no-code platform for automating identity processes. 

This blog post is based on a question asked during office hours or the #okta-workflows channel in MacAdmins Slack: How do you trigger a flow?

Getting started

There are six ways to trigger a flow. They are

  1. Schedule (flow runs periodically)
  2. Event (flow is called when a particular event is fired)
  3. Manual (clicking the Test button)
  4. API endpoint (another system invokes a flow via an API endpoint)
  5. Helper flow (flow calling another flow)
  6. Delegated flow (let someone else in your organization invoke it)

1. Schedule

A flow can be scheduled to run periodically. For example, you can schedule a flow to run every hour, every day, or once a week (there are other options also).

To schedule a flow, add the Schedule event:

Grid of application icons showing Slack and Smartsheet alongside Okta Workflows triggers: Schedule, Helper Flow, API Endpoint, and Delegated Flow. Events to trigger a flow

To configure the schedule, click the 🕔 at the bottom of the card:

Okta Workflows interface connecting a Scheduled Flow trigger card through a Text Compose card to a Slack Send Message to Channel card, with an orange arrow highlighting the schedule icon. A flow that runs on schedule

Options to configure when to run a flow:

Flow Schedule dialog in Okta Workflows configured to run daily at 8:00 AM America/Los_Angeles timezone. Flow schedule options

2. Event

Another way to trigger a flow is when a specific event occurs in an organization. For example, this flow will run when a user is added to a group:

Okta Workflows interface connecting a User Added to Group event trigger through a Text Compose card to a Slack Send Message to Channel card. Trigger a flow when a user is added to a group

Every connector supports different events:

Okta event search interface displaying a list of available triggers including Access Certification Decision Submitted, API Token Created, and Application events. Events available from the Okta connector

3. Manual

If you have a flow that needs to run manually, infrequently, or just once, use the Test button to trigger a flow. Even though it says Test, it’s a perfectly fine way to run a flow.

Okta Workflows interface connecting Date Now, Text Compose, and Slack Send Message to Channel cards, with an orange arrow pointing to the Test button. Running a flow via the Test button

When manually running a flow, you don’t need to have an event card set (1st card).

4. API endpoint

It is possible to trigger a flow from an external system via an API endpoint. For example, an event occurs in an external system, which calls an API endpoint that triggers a flow.

To trigger a flow via an API endpoint, use the API Endpoint event card:

Okta Workflows interface connecting an API Endpoint trigger card through a Text Compose card to a Slack Send Message to Channel card. Triggered a flow via an API endpoint

The API endpoint information is available by clicking the </> icon at the bottom of the card.

API Endpoint Settings modal in Okta Workflows showing Invoke URL, Resume URL, Alias, Client Token, and Security Level set to Expose as Webhook. API endpoint settings

To test an API endpoint, use a service such as Postman.

5. Helper flow

A helper flow is a flow called from another flow. A helper flow is usually used when there is a list of objects (users, groups, etc.), and you need to iterate over each item in a list to perform an action.

In this example, a flow named Check last login will be called for each user found via List Users with Search card:

Okta Workflows main flow interface showing Scheduled Flow, Clear Table, List Users with Search streaming to a helper flow, and Text Compose cards. Calling a helper flow

Helper flow is called for each item in a list:

Okta Workflows Helper Flow interface titled "Check last login" showing date, math, conditional branch, and table row creation cards. Helper flow

A flow becomes a helper flow when using On Demand – Helper Flow event card:

Grid of application icons showing Slack and Smartsheet alongside Okta Workflows triggers: Schedule, Helper Flow, API Endpoint, and Delegated Flow. Flow trigger event cards

Flow chart view of the main flow and helper flow:

Flowchart showing a main Scheduled Flow triggering a secondary Helper Flow with date, math, logic, and table actions. Main flow and helper flow

6. Delegated flow

Delegated Flow is when you delegate to another user to run a flow. That person might not be an administrator, but needs to be able to trigger a particular flow.

To make a delegated flow, add a Delegated Flow event card:

Note: as of this writing, Delegated Flow is an Early Access feature.

Grid of application icons showing Slack and Smartsheet alongside Okta Workflows triggers: Schedule, Helper Flow, API Endpoint, and Delegated Flow. Delegated flow event card

A delegated flow event card can define one or more inputs. In the screenshot below, the flow has two inputs: Name and ID.

Okta Workflows interface showing a Delegated Flow trigger mapped through a Text Compose card to a Slack Send Message to Channel card. Delegated flow

Flow execution is delegated to another user within an organization. In the screenshot below, the user stella.green can run this flow:

Okta admin dashboard Delegated flows page listing a flow named "Delegated Flow" and a Run button, with an orange arrow highlighting the logged-in user context in the top right. A flow delegated to a user to run

When Stella invokes the flow, Stella will need to enter flow inputs:

Run Delegated Flow dialog in Okta Admin Console with input fields for Name and ID, and a blue Run button. Delegated flow inputs

Looking at the flow history after Stella triggered the flow:

Okta Workflows interface showing test execution results for a Delegated Flow trigger, Text Compose card, and Slack Send Message to Channel card. Delegated flow history

In this How-To Guide, you learned six different ways to trigger flow.

Get your Workflows questions answered

Do you have a question about Okta Workflows? Not sure how to build a flow? Join the weekly community office hours to get help. 

About the Author

Max Katz

Staff Developer Advocate, Okta Workflows

Max Katz is a Staff Developer Advocate for Okta Workflows. Max loves the no-code automation space and creating educational content. Before Okta, Max led the North America Developer Advocacy team at IBM. Before IBM, Max led developer advocacy for a cloud-based mobile app platform, Appery, helping it grow from zero to over 400,000 developers. Max regularly writes on his http://maxkatz.net blog. 

Continue your Identity journey