<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Write Output From the List Users Card to a CSV File in Workflows
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

This article describes how to write output from the List Users card to a CSV file in Workflows.

Applies To
  • Okta Workflows
Solution

Run a search with Okta – List Users with Filter card (or using any other search/filter card), and would like to save the result into a CSV file. This article explains how to do that.

The workflow has the following steps:

  1. Find users.
  2. Save to the table.
  3. Export the table to a CSV file.

This is the main flow:

Workflows

  • Okta – List Users with Filter card finds the users to save to a CSV file.
  • List – For Each card goes over each user and saves the user to a table using a helper flow (see below). The entire User record is passed to the helper flow.
  • Tables – Export to CSV card saves data from a table into a CSV file. Specify the CSV file name and optionally specify which columns to export. In this example, the columns Name and Email are exported.

The table has two (custom) columns: Name and Email:

Table


This is the helper flow that saves each user found into a table:

Workflows

The flow has these steps:

  • Helper Flow card receives the User record.
  • Get Multiple card retrieves First NameLast Name, and Email fields from a user.
  • Concatenate card creates a Full name from the First Name and Last Name fields.
  • The last, Table – Create Row card, saves each user's information into a table.

Learn: How to Setup a Workflows Helper Flow (With For-Each and Streaming Cards)

When the main flow is run, the table is populated with user data:

Table

Looking at the main flow history, the Tables – Export to CSV card returns a file that can be downloaded:

Workflows

Opening User_data.csv file in Numbers:

CSV File

 

Related References

Loading
How to Write Output From the List Users Card to a CSV File in Workflows