In this guide:
- Okta Workflows guides
- Email System Log search results
- Related Okta Workflows guides
- 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:
- Search the Okta System Log.
- Save the result into a table.
- Export the table data to a CSV file.
- Send an email with the CSV file.
Search log flow

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.
Related Okta Workflows guides
- Save Deactivated Users, Export as CSV, and Email in Okta Workflows.
- How to Export Group Membership to a CSV File and Email the File in Okta Workflows.
- How to Suspend Multiple Users from a CSV File in Okta Workflows.
- How to Write Output From the List Users Card to a CSV File.
- How to Send HTML Email with Gmail and Office 365 Email in Workflows.
- How to Send an Email With an Attachment from Workflows.
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