The External API feature lets you move data into a workflow or push data out of a workflow via a REST API call.
The external system endpoints can be public API endpoints, customer management systems, or serverless application instances.

The main characteristics of this feature are:

Ability to pass data in a JSON format to a 3rd party REST API endpoint.

Ability to receive a JSON response back, map it to output tables and pass downstream to other workflow activities.

In Cflow you can call the external API in any of the following ways :

  • When a Form is Submitted and a rule is satisfied
  • When a new Form loads
  • When a value is entered or selected in a field

Follow the steps given below to configure the rule to call the External API:

  • Go to Admin -> Select a workflow.
  • Click on the Rules icon.
  • Click on Add Rule to specify the rule and add new action Call External API. When the specified rule is satisfied it calls the external API. Example: Employee No is equal to 1001.
  • Enter the URL.
  • Map the Output key and Output field to display the data in the field values.

The below screenshot illustrates the condition specified in rules to call the external API:

API rule
API details

Fill the Employee No field value as 1001 and submit the request. This will automatically call the External API and the value in the Username is filled.

form API

Follow the below steps to trigger the External API on Form load:

This will trigger the external API when the form is loading and the values are filled in the output field.

  • Go to Admin -> Select a workflow.
  • Click on External API.
  • Turn on the toggle Trigger on Form load.

The below screenshot illustrates the configuration in Trigger on Form load.

Form Load API

Follow the below steps to trigger the API with a field value:

  • Go to Admin -> Select a workflow.
  • Click on External API.
  • Turn off the toggle Trigger on Form load and select the field from the dropdown in API Trigger.

For Example: Select the Employee No field in the API trigger. When the form is initiated it will display the output only when the Employee No value is filled.

The below screenshot illustrates the configuration in API Trigger with a field value: