This guide teaches how to export the Okta group membership to a CSV file and email the file.
- Okta Workflows
This is the main flow:
This flow has the following steps:
- The Okta – List Group Membership card retrieves all users from the specified group ID.
- 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.
- The Tables – Export to CSV card exports table data into a CSV file.
- The Text – Compose card creates the email message.
- 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:
The flow has the following steps:
- The Helper Flow card defines the input into the helper flow. The main flow passes the User object to the helper flow.
- The Object – Get Multiple card retrieves three fields from the User object.
- The Table – Create Row saves the three fields into a table.
This is how the table looks:
The table has three columns to save user information: First name, Last 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:
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.
