Update or Insert a Record in a Table in Okta Workflows (Upsert example)

In this guide:

  1. Okta Workflows guides
  2. Update or insert a table record (upsert example)
  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 to update or insert a record in a table in Okta Workflows?

This guide will teach you to update or insert a record in a table in Okta Workflows. In database terminology, an update and insert operation is an upsert.

Update or insert a table record (upsert example)

There is a table with department information. Each record has an ID, name, and number of employees.

Department table.

You want to update a record if a record already exists in a table or insert a new record if the record doesn’t exist in a table. In database terminology, an update and insert operation is an upsert.

The following flow does an update if a record exists or inserts a new record if the record doesn’t exist.

Update or insert a record into a table.

When the flow has the following inputs (in the Assign card), it finds a matching record and updates it. The flow runs the If condition and the Update Row card.

Update a record in a table.

This is the table after the flow updates the Marketing record:

Table after update.

When the flow has the following inputs (in the Assign card), the flow doesn’t find an existing record and inserts a new record. The flow runs the Else condition and the Create Row card.

Insert a record into a table.

This is the table after the flow inserts the Security record:

Table after insert.

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