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 Creates a Report with Google Sheets template.
Why it’s important
Many organizations have custom, org-specific needs to report on particular lifecycle events and share that data with others in the organization. Okta’s System Log is powerful but limited to Okta admins, and also does not allow for scheduled reports. This workflow demonstrates building a custom report in Google Sheets using a user suspended event (any other event can be used). And then sharing that report with stakeholders when the event occurs.
The flow from this template will run any time a user is suspended (Okta – User Suspended card). The flow then gathers information about the user suspended and creates a new row in Google Sheets with that information. An email is then created with information about the user and link to Google Sheets and sent to stakeholders.
The template has:
- 1 flow:
- Suspended Users Google Sheets Report
Template flow steps
Let’s see how Suspended Users Google Sheets Report flow works.
Note: I removed a number of Notes cards from the flow so all all cards can fit into a screenshot.
Flowchart view of the flow:
The flow has the following steps:
- When a user is suspended, the Okta – User Suspended event is fired
- From the event the flow gets information about the user and creates a new Google Sheets row (Google Sheets – Create Row)
- Text – Compose creates a subject for email
- Google Sheets – Read Worksheet Info card outputs the spreadsheet URL (to be included in the email)
- The next Text – Compose card creates the email message
- The Gmail – Send Email sends card the email
How to add and setup the template:
- In Workflows console click Templates
- In the search field start typing create and then select Creates a Report with Google Sheets template
- Click Add template button
- In Suspended Users Google Sheets Report flow set a connection for
- Okta – User Suspended card
- Google Sheets – Create Row card
- Google Sheets – Read Worksheet Info card
- Gmail – Send Email card
In Google Sheets spreadsheet the column names need to match the names in the flow:
🎁 Looking for more out-of-the-box automation solutions? Check out all the available templates.