Build a webhook event flow

Okta Workflows allows you to build event cards that support a webhook framework. This provides a near-real-time response to events occurring on a remote system. Building a webhook event depends on the features offered by the remote service API, and the goal of the event card.

You can use webhook event flows to build cards for your connector that trigger based on events such as user creation, file deletion, or reports of suspicious activity.

For more information on how webhooks work, see Webhook event cards.

Before you begin

  • You must be a super admin with access to Okta Workflows.

  • If you haven't already created a connector, follow these steps to create one:

    • From the Okta Workflows Console, click the App switcher icon and then the link for the Connector Builder console.

    • In Connector Builder, click the + icon to create a connector. Give your new connector a unique name and a useful description.

  • Ensure that the connector has the basic foundation and authentication elements provided through the tasks in the Get started quickly with the basics section.

Start this task

  1. Click your new connector to open it in the main panel.

  2. On the Flows tab, create a flow by clicking + New Flow.

  3. Click Add event and from the Events choices, select Webhook Event.

  4. Click Add Options to add any options you want to declare for the Webhook Event card.

  5. Click Configure in the Webhook Registration section to open the webhook registration dialog.

  6. In the Registration dialog, click Choose Flow to select registration and deregistration helper flows for the webhook event. If no helper flows exist, you can click Create new flow.

    • Registration Flow

      When your user turns on a flow that contains your deployed webhook event card, the registration helper flow is triggered.

      The registration flow registers the unique Event URL in the external service for your user's flow, so that the service knows where to send the webhook payload.

      The Event URL is an auto-generated URL. This gets created when the user turns on their flow that contains this webhook event.

      After selecting a registration helper flow you can map input fields to pass into it using the option fields present on your webhook event card. This enables you to use the same registration helper flow for multiple webhook event cards by passing in a different option from each webhook card.

      The registration helper flow includes a return card with an object field called Registration Data. This object is used to store any reference needed when the Deregistration Flow runs.

      See Register a webhook event.

    • Deregistration Flow

      Similar to the registration flow, when your user turns off a flow that contains the deployed webhook event card, the deregistration helper flow is triggered.

      Any information defined from the registration flow using the Registration Data output is available as input for the Deregistration Flow event card.

      After selecting a deregistration helper flow, you can map input fields to pass into it using the option fields on your webhook event card. Similar to a registration helper flow, this enables you to use the same deregistration helper flow for multiple webhook event cards.

      The deregistration helper flow doesn't include a return card.

      See Deregister a webhook event.

    • Click Apply to confirm your registration and deregistration helper flows and their input mappings. Click the garbage pail icon if you need to remove a selected registration or deregistration helper flow.

    For webhook event cards, the registration or deregistration flow must complete within 60 seconds or your user's flow won't turn on.

  7. Click Add Outputs to configure the Return Outputs card for the webhook event flow.

  8. In the Options dialog you can specify any outputs you want the webhook to return. Click Add group to create an output group.

    1. Activate Enable Run mode if the webhook payload returns a list of records and you want to specify the execution mode for any flows that use this webhook event card. See Enable run mode for webhooks.

    2. In the Static Output Group pane, provide a Group Name for this set of outputs. For each field that you want returned as output, provide a Label and select a Field Type and a Data Type from the dropdown menus. The preview card shows you how the return card appears.

    3. Click Add group to add another output groups.

      If the Enable Run mode option is active, the event card can only return one output group.

  9. Click Apply to save the changes to your Return Outputs card.

  10. Click the Save button in the toolbar and name the flow.

Next steps

Known issues and limitations for webhook event flows

Test your flows

Deploy your connector