Welcome to another Okta Workflows Tips post. Read all previous tips.
In this post:
- Set table column field type correctly for time-based use cases
- Get notified when a user signs-in outside a participating country
- Automatically backup a flow or a folder to GitHub or Google Drive
Set table column field type correctly for time-based use cases
⭐️ This tip is from Ajay Seetharam, Cloud Enterprise Architect at Okta.
In many time-based use cases there is a need to execute a workflow based on a schedule and then retrieve the rows that have a timestamp before the current date-time. For the search rows condition to work correctly the column field type has to be set to Date.
So an entry in such a table would be populated as shown in the example below:
The table is used in a flow with a date comparison to retrieve all rows prior to the current date-time
This picks out the correct row:
Unexpected rows would be returned from the Table – Search Rows card if the column type is set to the default text.
Get notified when a user signs-in outside a participating country
⭐️ This tip is from Ashwin Ramnarayanan, Solutions Engineer at Okta.
Get a notification when a user signs-in into your organization from outside a participating country. Keep a list from which countries users are allowed to sign-in. When a sign-in occurs from a country not on the list, you will be notified. This flow uses Okta – User Sign In Attempt card. This event has information from where geography the sign-in happened.
The flow works like this:
- User attempts to sign-in (User Sign In Attempt) event
- Retrieve geographical information and whether the attempt was successful (Object – Get Multiple)
- Search a table to see if the sign-in country matches one of the allowed countries from the list (Tables – Search Rows)
- If a country was found (Branching -Continue If) and a sign-in was successful (Branching -Continue If), create a message (Text – Compose)
- The message can be sent via email, as a Slack message, or SMS
Automatically backup a flow or a folder to GitHub or Google Drive
Use Flow – Export Flow card and Folders – Export Folders card to save and back a flow or a folder to GitHub or Google Drive.
Example of a flow that saves backups another flow to Google Drive:
You can schedule to run this flow periodically (automatically) or run it manually by clicking Test button.
That’s all for now. Let me know if you have any tips you would like to share.
🍉 Try this step-by-step getting started tutorial: Build Your First Automation With Okta Workflows: Notify When User Is Suspended.