<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 Export Group Membership to a CSV File and Email the File in Workflows
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

This guide teaches how to export the Okta group membership to a CSV file and email the file.

Applies To
  • Okta Workflows
Solution

This is the main flow:

The main flow 

This flow has the following steps:

  1. The Okta – List Group Membership card retrieves all users from the specified group ID.
  2. The List – For Each card processes each user from the list. It uses a helper flow to save user information into a table. See the helper flow and table below.
  3. The Tables – Export to CSV card exports table data into a CSV file.
  4. The Text – Compose card creates the email message.
  5. The Gmail – Send Email with Attachment sends a message with the CSV file attached.


Helper flow and table

This is the helper flow to save user information into the table:
Helper Flow 


The flow has the following steps:

  1. The Helper Flow card defines the input into the helper flow. The main flow passes the User object to the helper flow.
  2. The Object – Get Multiple card retrieves three fields from the User object.
  3. The Table – Create Row saves the three fields into a table.


This is how the table looks:
Table 

The table has three columns to save user information: First nameLast name, and email.

 

Clearing the table

If the flow is run multiple times, user information will be appended to previous user information in the Workflows table. To start with a blank table before each run, add the Clear - Table card at the beginning:
Table – Clear card 

 

Running the flow

The last step is to determine how to run this flow. For this example, a good option is to use the Scheduled Flow card.
 

Related References

Loading
How to Export Group Membership to a CSV File and Email the File in Workflows