The Error automation via integrator.io APIs template that is available in the Celigo marketplace has the following two flows:
- A flow to auto-resolve errors
- A flow to auto-retry errors
These sample flows help to automate your error management using integrator.io error APIs.
You can use this template to automatically resolve or retry errors that do not require any user intervention, that is you don't have to edit or correct any data. In such cases, you can configure the template and run the flows to automate error management of errors, let's say, based on a specific error message or error code.
Contents
- Scenarios for using the template
- Installing the template
- Understanding the template flows
- A. Configuring and running the Auto-retry flow
- B. Configuring and running the Auto-resolve flow
Scenarios for using the template
Flows | Scenarios |
---|---|
Auto-resolve flow |
Consider a flow that
|
Auto-retry flow |
Consider a flow that
|
Installing the template
-
In the left navigation pane, click Marketplace. And, under By type, select either All or Templates.
-
In the Search box, type "Error automation" to find the "Error automation via integrator.io APIs" template quickly.
-
Click Preview and review the Readme and Components.
-
Click Install now. The installation consists of two steps.
-
In step 1 – Connect to integrator.io via "Full access" scope API token - Error API, click Configure.
-
In What would you like to do?, select Set up a new connection. (If you have an existing connection, use the existing connection.)
-
In Name, use the default name or enter a new name. The default name is "Connect to integrator.io via "Full access" scope API token - Error API".
-
In Base URI, enter
https://api.integrator.io
. -
In Media type, the default value is JSON.
-
In Token, enter a token.
Tip
If you have the required permissions, click Create new token and create a token with full access permissions. For more information, see Managing API tokens.
→ , then click -
In Send token via, select HTTP header.
-
In Header name, enter
Authorization
if it's not provided by default. -
In Header scheme, select Bearer.
-
Click Save & close.
-
-
In step 2 – Copy resources now from template zip, click .
The template is successfully installed with the flows.
Understanding the template flows
The two flows, Error Mgmt 2.0 - Auto-retry and Error Mgmt 2.0 - Auto-resolve, in the template have an export and an import step that are explained below.
Flow names | Flow steps | Step descriptions |
---|---|---|
Error mgmt 2.0 - auto-resolve |
Both flows have the following steps:
|
You must configure the export and import steps before you run any flow. |
Error mgmt 2.0 - auto-retry |
Since the Error mgmt 2.0 - auto-retry flow might be more commonly used, let's start with configuring a few essential settings in the export and import steps of the Auto-retry flow and running it.
A. Configuring and running the Auto-retry flow
Step 1: Configuring the export to get flow errors
-
Click the export step, Get open errors for a given flow step, to edit the settings. The general and export settings have default values that you can leave as is.
Note
The export step gets errors from a flow based on the Handlebars expression in the Relative URI. For example,
/v1/flows/{{settings.export.Flow_id}}/{{settings.export.Step_id}}/errors?occurredAt_gte={{{encodeURI lastExportDateTime}}}
-
Under Custom settings, replace values based on your requirements.
-
in Flow id, replace the default value with the flow ID from where you want to get errors and automatically retry them.
-
In Step id, replace the default value with the export ID or the flow step from where you want to get errors and automatically retry them.
Tip
You can find the IDs from the URL. For example,
https://integrator.io/integrations/64e3•••eca6d•••ddda7e28d/flowBuilder/64e3•••3b••e641c70d93a32/edit/exports/64e3•••2be8e090••••f947c
-
In Error Message, preview the errors and replace the value based on what type of errors you want to move to the next step to retry. Or, leave the field blank and enter the Error Code below only.
-
In Error Code, preview the errors and replace the value based on what type of errors you want to move to the next step to retry.
Tip
You can use the Error Message and Error Code settings to decide and pass select errors to the next step for automatic retry. However, if you don't provide the values here, you can use the hook script to filter the errors and automatically retry select errors.
-
-
Click Preview here (or in the Script hook) to view the errors that are passed to the import step. Here, you should see the errors from a flow step.
-
Click
.
(Optional) Editing the script to filter or preview errors
-
Click the hook icon () next to the export to filter errors and then auto-retry them.
The template includes a script to filter errors via API. The script has preSavePage
and ErrorsShouldBeReprocessed
functions that you can edit as required so that only errors that meet specific conditions are passed to the import step. (If you've already provided the error message or error code in your export settings earlier, then you don't need to edit the script but you can click Preview and view the errors that are passed to the next step to be retried.)
Step 2: Configuring the import to auto-retry flow errors
-
Click the import step, Auto retry errors that satisfy conditions, to edit the settings. The general and export settings have default values that you can leave as is.
Note
The import step posts errors back to the same flow step after retrying them by calling the
retry
integrator.io API endpoint based on the Handlebar expression in the Relative URI. For example,/v1/flows/{{settings.import.Flow_id}}/{{settings.import.Step_id}}/retry
-
Under Custom settings, replace values based on your requirements.
-
in Flow id, replace the default value with the flow ID where you want to auto-retry and post errors.
-
In Step id, replace the default value with the export ID or the flow step where you want to post auto-retry and post errors.
Tip
You can find the IDs from the URL. For example,
https://integrator.io/integrations/64e3•••eca6d•••ddda7e28d/flowBuilder/64e3•••3b••e641c70d93a32/edit/exports/64e3•••2be8e090••••f947c.
-
-
Click
.
After configuring the export and import steps, click the
button and run () the auto-retry flow. Then, go to the specific flow step and view the error count in Flow builder to check if the error count is less than it was earlier. Consider tweaking your configuration if required.B. Configuring and running the Auto-resolve flow
The steps to configure the auto-resolve flow are the same as mentioned above in the auto-retry flow. See the above section. In this flow, the only difference is that in the import step, the integrator.io resolve API endpoint is called instead of the integrator.io retry API endpoint. The Handlebars expression in the Relative URI setting of the import step will be, for example,
/v1/flows/{{settings.import.Flow_id}}/{{settings.import.Step_id}}/resolve
Configure your flows and try the Error automation via integrator.io APIs template to manage your open errors.
Comments
Article is closed for comments.