Search Okta System Log and Email the Results in Okta Workflows

In this guide:

  1. Okta Workflows guides
  2. Email System Log search results
  3. Related Okta Workflows guides
  4. Okta Workflows resources

Okta Workflows guides

Okta Workflows guides are questions and answers from the community office hours, the #okta-workflows channel on MacAdmins Slack, and other places. Read all the other guides.

How do you search the Okta System Log, export the result to a CSV file, and email it in Okta Workflows?

This guide will teach you to search the Okta System Log, export the results to a CSV file, and email it in Okta Workflows.

Email System Log search results

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.

The flow has the following steps.

Get the current time

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

Search since date

You want to 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.

Clear the table

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

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.

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.

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.

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:

The flow has the following steps.

Search record

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

Extract fields from the record

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

Save into a table

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

Okta Workflows resources

📺 Learn from Okta Workflows videos.

❓Ask questions during Okta Workflows community office hours.

🛟 Ask questions on the Okta Workflows community forum.

🙋🏻‍♀️ Join the #okta-workflows channel on the MacAdmins Slack to get help from the community.

Leave a comment