Workflows Template: Importing Users from Google Sheets

Workflows templates are out-of-the-box flows and automations that you can add and start using right away. Each template provides a specific and real world solution.

In this blog post you will learn about the Importing Users from Google Sheets template.

Why it’s important

There are often disconnected user populations like contractors, or certain offices that need to be imported into Okta. A CSV or flat file is the easiest way to create those users in Okta. This flow will import user information from a Google Sheets document and create new users in an Okta organization.

Template overview

This flow reads all user information from a specified Google sheet. Then it iterates over every row in a sheet and creates a new user in an Okta organization. The flow can be configured to run on schedule. For example, you can configure the flow to run every Monday at 6 AM PT.

The template has two flows:

  • Import Users – Parent Flow (type: schedule)
  • Import Users – Child Flow (type: helper)

Template flow steps

Note: I removed a number of Notes cards from the flow(s) so all all cards can fit into a screenshot.

The first flow is Import Users – Parent Flow. It reads the user information from a Google sheet and calls a helper flow to create new users.

Import users flow

The flow has the following steps:

  1. The first card, Okta – Scheduled Flow specifies how the flow is invoked. Click the clock-icon in the lower right corner to configure when to run the flow. The template default schedule is set to run at 6 AM PT on Monday:

  2. The next card, Google Sheets – Read All Rows reads all user information from a specified Google Sheets document and puts it in a list. The Google Sheets needs to have the following format and column names:

  3. The next card, List – For Each, will iterate over each row in a list and will pass the row data to be processed by a helper flow (Import Users – Child Flow)

The second flow is Import Users – Child Flow.

Create new user flow

The flow has the following steps.

  1. The first On Demand – Child Flow card is called once for each row in a Google sheet
  2. The row data is passed to Object – Get Multiple card in JSON format and this card picks several values from a JSON object at once. The values it picks are Columns.0-userName, Columns.1-firstName, Columns.2-lastName, and Columns.3-email. The JSON looks like this:

  3. Once the values are picked, they are sent to Okta – Create User card which creates a new user in an Okta organization

Flow chart for the two flows looks like this:

Flow chart overview

Template setup

How to add and setup the template:

  1. In Workflows console click Templates
  2. In the search field start typing create and then select Importing Users from Google Sheets template
  3. Click Add template button
  4. In Import Users – Parent Flow flow set a connection and schedule
    1. Google Sheets – Read All Rows card. Check that sheets format is exactly as shown above
    2. If needed, update flow schedule in Okta – Scheduled Flow card
  5. In Import Users – Child Flow flow set a connection
    1. Okta – Create User card
  6. Turn on both flows

šŸŽ Looking for more out-of-the-box automation solutions? Check out all the availableĀ templates.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.