Jump to a Section
  • Introduction

    This tutorial demonstrates how to build a Flow that imports users from a flat file like an Excel Online Spreadsheet or a Google Sheet. If you have used the Okta CSV Directory Integration before, this Flow can automate that process. Unlike previous tutorials that are triggered by an event, this Flow is built on a scheduled, recurring basis.

    There are five tasks in this tutorial:

    • Build the parent Flow
    • Build the child Flow
    • Connect the Flows
    • Designate the objects to import
    • Run and test the Flow (note that you can test a Flow or individual card at any time)

    Prerequisites:

    • Create a Google Sheet or an Excel Online spreadsheet with at least two users to import. Name the columns firstname, lastname, userName, and email.
    • Connect your Okta application.
    • Connect the app you used to create the Google or Excel sheet.
  • Build the parent Flow

    1. In Admin Console, go to Workflow > Workflows Console.
    2. In Workflows console, click New Flow. Or, if you have a folder where you want to store this Flow, open it and click Create a Flow Now.
    3. Name your Flow Import Users - Parent Flow.
    4. Click Add New Event, and then select Schedule from the Okta Apps menu.
    5. In Flow Schedule, set a weekly frequency.
    6. In the second card, click App Actions, and then select the app you used to create the CSV file (Google Sheets or Excel).
    7. In the Actions menu, select Read All Rows.
    8. In the Read All Rows card, select your spreadsheet and the worksheet number where your users are stored, and then click Done.
    9. Verify that your four CSV file column names are selected, and then click Done.
    10. Click Add Another > Function > List > For Each.
    11. Drag and drop the Rows field in the Read All Rows card to the list field in the For Each card.
  • Build the child Flow

    1. In the For Each card, click Choose Flow.
    2. In the folder window, click New Flow.
    3. Enter the name Import Users - Child Flow.
    4. Click Add New Event, and then select Child Flow from the Okta Apps menu.
    5. In the Inputs to this Flow field, enter Rows. This will map the Rows field from your parent flow to your child flow.
    6. Save the child Flow and all of its data. If you get an error, verify that the child Flow is configured correctly, and then try again.
  • Connect the Flows

    1. Return to the parent flow, and in the For Each card, click Choose Flow.
    2. Select Import Users - Child Flow.
    3. In the Rows drop-down menu, select Item.
    4. Save the parent Flow and all of its data. Note that you cannot save a parent Flow that contains a child Flow unless unless that child Flow is active.
    5. Toggle the Flow is OFF switch to ON.
  • Designate objects to import

    1. In the child flow, click Function > Object > Get Multiple.
    2. Drag and drop the Rows field in the Child Flow card to the object field in the Get Multiple card.
    3. In the Get Multiple output field, enter the following values. Note the syntax matches your API details in the tested flow.
      • Columns.0-firstname
      • Columns.1-lastname
      • Columns.2-userName
      • Columns.3-email
    4. Click Add Another > App Action. Select Okta. If you’re prompted to choose a connection, follow the steps and click Done.
    5. In the Okta menu of actions, select Create User.
    6. In the Option drop-down menu, select without Credentials, and then click Done.
    7. Verify the fields you want to see in your user profile, and then click Done.
    8. Drag and drop the column names from your Get Multiple card to the appropriate Profile fields in the Create User card. Note that userName maps to Login.
    9. Save the flow and all of its data. Don’t activate the Flow yet.
  • Run and test the Flow

    1. Return to the parent flow, and then click the Test Flow icon.
    2. In Flow History, verify that your parent Flow completed successfully.
    3. In Flow History, verify that your child Flow completed successfully.
    4. In Admin Console, go to Directory > People, and search for the users in your spreadsheet.
  • Video Walkthrough