Understanding Okta Workflows Connectors

This blog post will teach you about Okta Workflows connectors:

  • Use a pre-built connector
  • Use the pre-built API Connector
  • Use a connector built with the Connector Builder
  • Which connector option to use
  • Okta Workflows Resources

Use a pre-built connector

When you start building with Okta Workflows, use one of the 60+ pre-built connectors. Pre-built connectors control applications or web services such as Okta, Gmail, Office 365, Slack, Jira, and others.

workflows_connectors_list-1.png (902×1078)

Okta Workflows connectors.

Every connector has actions.

The following is a partial list of actions available from the Okta connector:

workflows_okta_connector_actions.png (902×1078)

Okta connector actions.

These actions are available from the Google Drive connector:

workflows_googledrive_connector_actions.png (898×1078)

Partial list of Google Drive connector actions.

Okta Workflows actions are API endpoints behind the scenes.

Configure a connection

You must create a connection to authenticate with that application or service before calling actions. The authentication method depends on the connector. Authentication types include API keys, Basic Auth, OAuth, or custom.

You can create and save multiple connections for a connector. One connection could be to a test and another to the production environments.

The Connections page lists the connections you configured:

workflows_conections_page.png (2272×934)

Okta Workflows connections (partial list).

Call an action

Add an action app card on a flow to call an action from a connector.

For example, the following image shows calling the Read User action from the Okta connector.

workflows_okta_read_user_action-1.png (1068×1104)

The Okta – Read User action.

Behind the scenes, the action calls the Get User Okta API when testing the flow:

workflows_okta_read_user_test.png (586×1162)

Running a flow with the Okta – Read User card.

An action exposes input fields corresponding to API request parameters and output fields corresponding to API request response.

Using connector actions is more straightforward than setting up a manual API call. You configure a connection, and the card prompts you to enter the required inputs to run the action.

Call a custom action

Okta Workflows has a pre-built Shopify connector. The Shopify connector has the following actions:

workflows_shopify_connector_actions.png (896×1076)

Shopify connector actions.

The image below shows using the Shopify – Create Customer action from the connector:

workflows_shopfiy_connector_create_customer.png (512×1268)

Shopify – Create Customer action.

Let’s say you want to list all the customers in Shopify.

You won’t see a List All Customers action if you look at the action list. But you will see retrieves a list of customers API end point in the Shopify developer documentation.

How do you call this endpoint from an Okta Workflows flow?

Every connector has the Custom API Action action that allows to call any API endpoint on the connector.

workflows_shopify_connector_capia.png (902×1078)

Custom API Action action.

The screenshot below shows Shopify’s Custom API Action card. The card reuses Shopify’s connection information and allows to enter the API’s relative URL, query, and headers parameters.

workflows_shopify_connector_capia2-1.png (516×1272)

Custom API Action card.

Use the Custom API Action in the following use cases:

  • You need to call an API endpoint that is unavailable on the pre-built connector.
  •  An action is available on the pre-built connector but doesn’t expose all the request parameters.

The screenshot below shows using the Custom API Action card to list all customers in Shopify:

workflows_shopify_connector_capia_allcustomers2.png (514×1078)

The Shopify Custom API Action card.

You can set the Query and Headers fields if the API requires them.

Testing the flow with the Custom API Action card lists all Shopify customers:

workflows_shopify_connector_capia_allcustomers.png (536×1224)

Testing the Shopify Custom API Action card.

So far, you have learned about the pre-built connectors. You can use the available actions or the custom API actions.

In the following section, you will learn how to call an API that doesn’t have a pre-built connector in Okta Workflows.

Use the pre-built API Connector

You want to use ShipEngine API to validate addresses. ShipEngine doesn’t have a pre-built connector in Okta Workflows. You can use the API Connector connector to call ShipEngine API or any other API that doesn’t have a pre-built connector in Okta Workflows.

workflows_shipengine_api_connector-1.png (882×1066)

Selecting the API Connector.

In the screenshot below, you will see the HTTP methods when you select the API Connector option:

workflows_apiconnector_actions.png (896×1080)

API Connector actions.

The ShipEngine Validate an Address API uses a POST. Choose the Post action:

workflows_apiconnector_post.png (516×1222)

The API Connector – Post card.

You must provide the URLQueryHeaders, and Body fields for the API request. You also need to configure authentication for the request.

workflows_apiconnector_flow1c.png (2480×1072)

Validate address with ShipEngine API.

To configure the API Connector – Post card:

  • Set the URL field to https://api.shipengine.com/v1/addresses/validate.
  • The ShipEngine service uses an API key for authentication. The Compose card creates the API key string and passes it to the Headers field.
  • The Compose card creates the address to validate and passes it to the Body field.

Running the flow to validate an address:

workflows_apiconnector_flow1_test.png (1658×1166)

Validate address with ShipEngine API flow execution.

Reuse connection information

If you use an API often, you can move the authentication information into a connection and reuse it.

workflows_apiconnector_shipengine_connection2.png (1250×1256)

ShipEngine connection.

With the API authentication saved into a connection, you can reuse the connection when you call the ShipEngine API:

workflows_apiconnector_flow2a.png (1638×1084)

Calling ShipEngine API.

You learned how to call an API using the pre-built API Connector. The following section will teach you how to build a connector with the Connector Builder tool.

Use a connector built with the Connector Builder

If you want your API to have a pre-built connector, you must to use the Okta Workflows Connector Builder to build a connector for the API. You will see the connector listed when you add an app action.

workflows_connectors_list-1.png (902×1078)

Okta Workflows connectors.

The Connector Builder is a no-code development tool for creating connectors on the Okta Workflows platform. The Connector Builder uses Okta Workflows (flows, action and function cards) to build a connector.

workflows_apiconnector_launch.png (410×340)

Launch the Connector Builder.

You like the ShipEngine API. You want an Okta Workflows builder to open the connector list and see an icon and a connector for ShipEngine. To see a connector for ShipEngine API you build the connector in the Connector Builder.

The Connector Builder has several views.

The Overview tab has general information about the connector.

workflows_apiconnector_overview.png (2720×1490)

Connector overview.

The Flows tab lists flows that make up the connector.

  • The httpHelper flow manages authentication.
  • The _authping flow checks connection health.
  • The Validate flow creates the connector’s Validate action.
  • The Custom API Action flow creates the connector's Custom API Action action.
  •  

workflows_apiconnector_flows.png (2720×1158)

Connector’s flows.

The following flow shows the Validate action implementation:

workflows_apiconnector_flows_validate.png (2276×1368)

Connector’s Validate action.

The Test Connections tab holds connection information for testing the connector.

The Deployment tab allows to deploy the connector. There are two deployment options.

  • Private deployment – the connector is available only in your Okta organization.
  • Public deployment – the connector is available to all organizations and all Okta Workflows builders. You must submit the connector to Okta for review for public deployment.

workflows_apiconnector_deployment.png (2726×1358)

Connector’s deployment.

You can select the connector (PostOffice) from the connector list:

workflows_apiconnector_postoffice.png (898×1078)

Connector listed in the connector list.

Use the Post Office – Validate action to validate an address:

workflows_apiconnector_postoffice_flow.png (2030×996)

Validate an address with the PostOffice connector.

Running the flow:

workflows_apiconnector_postoffice_flow_test2.png (1702×1252)

Validating an address.

Which connector option to use

You learned about three ways to call APIs in Okta Workflows:

  1. Use the pre-built connectors.
    • When a connector doesn’t support a specific API endpoint, use the custom API action to call any API on the connector.
  2. Use the API Connector card.
    • Move the authentication information into a connection to reuse.
  3. Use the Connector Builder to build a connector for an API.

Use the pre-built connectors and the API Connector card the most. The pre-built connectors and the API Connector card offer a lightweight solution for API calls to services. 

Use the Connector Builder to create a pre-built connector experience for the automation builder. A pre-built connector helps team members unfamiliar with working with APIs.

Read When to Use Connector Builder and when to Use the API Connector to learn more.

Okta Workflows resources

📖 Connector Builder documentation.

📺 Building a Custom Connector in Okta Workflows, a Video Series.

🍫 Get help from Workflows specialists during weekly community office hours.

🛟 Get help from support: discuss a Workflows topic or ask a question.

🙋🏻‍♀️ Get help from the community: join the #okta-workflows channel on MacAdmins Slack.

Tags

Workflows