<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
Search Okta System Log and Email the Results in Workflows
Okta Classic Engine
Okta Identity Engine
Workflows

Overview

This article explains how to search the Okta System Log, export the results to a CSV file, and email it to Okta Workflows.

Applies To

  • Okta Workflows
  • Okta Classic Engine
  • Okta Identity Engine

Solution

The automation has several steps:

  1. Search the Okta System Log.
  2. Save the result into a table.
  3. Export the table data to a CSV file.
  4. Send an email with the CSV file.

 

Search log flow


Email System Log search results.

 

The flow has the following steps:

  1. Get the current time

The Date & Time—Now card returns the current date and time.

  1. Search since date

Search the Okta System Log since a specific date in the past. The Subtract card subtracts days from the current time. The flow above searches 30 days since today.

  1. Clear the table

The Tables—Clear Table card clears the table before saving the search results to a table.

  1. Search the System Log

The Okta—Search Systems Logs card searches the Okta System Log using a custom query. The Search the System Log in Okta Workflows guide shows how to set up the search query.

  1. Pass the list to a helper flow

The List—For Each card passes the result list to a helper flow. The helper flow extracts data from each record and saves the data into a table.

  1. Export to CSV

The Tables—Export to CSV card exports the table data to a CSV file after the helper flow saves every record into a table.

  1. Send email

The Gmail—Send Email with Attachment card sends an email with the CSV file.

 

Search log helper flow

This is the helper flow:


Save search record data into a table.

 

The flow has the following steps:

  1. Search record

The Helper Flow card passes each search record (the Record field) to the flow.

  1. Extract fields from the record

The Object—Get Multiple card extracts the fields to save.

  1. Save into a table

The Tables—Create Row card saves search record information into a table.

 

 

 

 

Loading
Search Okta System Log and Email the Results in Workflows