Build a Custom API Action card

This is an Early Access feature for existing Workflows users. To enable it, use the Early Access Feature Manager as described in Manage Early Access and Beta features.

A Custom API Action (CAPIA) is an action card available on a connector that allows the end user to make an authenticated HTTP request to the service in question. The base url is hard coded into the connector, so users only need to add the relative url for the endpoint. They then manually create the required objects for header, query, and/or request body if necessary. The CAPIA then returns data from the service as three outputs: Status Code, Headers, and Body.

  1. Create a new flow under the Flows tab by clicking + New Flow in the upper right corner of the page.

  2. At the far left of the page, click on the Action button.

  3. Click the Save button in the toolbar and name the flow Custom API Action.

  4. In the flow description field, type Make an authenticated HTTP request to the {your service} API, check the Save all data that passes through the Flow box, and click Save.

  5. Click on the Add Options button on the Connector Action card.

  6. Click the Add Field button and add a field with the label Request Type and a type of Dropdown: Static Values.

  7. Click the Add Option button to add a row for each request type the user can choose for your API: GET, PATCH, POST, PUT, DELETE. You’ll need to populate both the Option and Value fields with the same text. You don't need to select a Default.

  8. Make sure the field is marked as Required and click Save.

  9. Click on the Add Inputs button on the Connector Action card.

  10. Click the Add Field button and add the following fields with data types and click Save.

  • Relative URL (Text) Required

  • Query (Object)

  • Headers (Object)

  • Body (Object)

  1. Add a Flow Control Call Flow card as the first card in the flow.

  2. Click on the Choose Flow button.

  3. Select the httpHelper flow created previously. The card will automatically populate with the inputs defined in the httpHelper flow.

  4. Drag the Relative URL output from the Connector Action card into the relative_url input on the Call Flow card.

  5. Drag the Request Type output from the Connector Action card into the request_method input on the Call Flow card.

  6. Drag the Query output from the Connector Action card into the query input on the Call Flow card.

  7. Drag the Headers output from the Connector Action card into the headers input on the Call Flow card.

  8. Drag the Body output from the Connector Action card into the body input on the Call Flow card.

  9. For the outputs on the Flow Control Call Flow card, you’ll need to define the same keys as on the httpHelper flow’s outputs:

  • status_code (Number)

  • headers (Object)

  • body (Object)

  1. Click the Add Outputs button on the Return Outputs card.

  2. Click the Add Field button to add the following three new fields with data types and click Save.

  • Status Code (Number)

  • Headers (Object)

  • Body (Object)

  1. Drag the outputs from the Call Flow card to the corresponding inputs on the Return Outputs card.

  2. Drag the auth object from the Connector Authping card to the Connection input field of the Call Flow card.

  3. Save and test your flow by manually adding a request_method, relative url, and any other data to the test dialog.