- 12 Feb 2024
- 6 Minutes to read
- DarkLight
Steps
- Updated on 12 Feb 2024
- 6 Minutes to read
- DarkLight
Steps are the building blocks used to create workflows. Each step automates a specific action, and these actions are then put together and executed in a logical order. The steps library provides access to a wide selection of pre-configured steps, and you can also easily create your own custom steps. Torq continuously enhances its capabilities by updating the existing steps and introducing new ones.
Drag a step onto the designer to incorporate it into the workflow. Required input parameters are displayed in the step Properties tab, and you can add optional parameters by clicking the cogwheel icon.
If the warning sign at the top right corner is visible, it indicates one or both of the following scenarios. Click the icon for details:
- At least one step in the workflow has an empty required input parameter.
- At least one step in the workflow has an update available.
In this article
More information on steps
Create a custom step
Use files in a workflow
Set HTTP request steps to retry on failure
Get the response of an HTTP request as a file
Fail an HTTP request step on error response
How to use the Create an integration step
Steps library overview
These are the types of steps you can use to create your workflows.
Public
These steps are preconfigured API requests to external services with out-of-the-box integration. They come preconfigured to automate essential actions with third-party services using the main input parameters.
HTTP mode
HTTP-based steps can be switched to HTTP mode to modify the underlying API request.
HTTP Requests
Use the Send an HTTP request step to create custom requests to external services, which you can then save as custom steps for easy reuse.
Cases
In the Cases tab, you'll find the steps to automate Torq case management flows.
Utilities
Utility steps help manipulate or transform data in a workflow. In the library, they are organized into distinct categories, such as Array Utils, Date and Time Utils, Extraction Utils, String Utils, and many more.
Custom
Create, save, and modify your own steps and share them throughout your workspace. These could include modified public steps, HTTP requests, cURL commands, and more.
Nested-workflow-based
Including one of these steps is equivalent to incorporating a nested workflow that executes several steps rather than a single action. Torq offers several such steps in the library (the nested workflow the step is based on will be imported to your workspace). You can also create custom steps from your workspace workflows to make them easily accessible in the steps library.
Execution options
Execution options are optional properties that you can enable for a step.
Runner
The step runner executes steps using the specified arguments and environment variables, leveraging Kubernetes or Docker to schedule the execution and retrieve the output. If no runner is set, steps are executed on Torq's secure hosted step runner service in the cloud. Steps that use cloud-to-cloud communication and leverage public cloud APIs can be executed on this runner. Steps that require access to components hosted in private VPCs or data centers will require deploying a self-hosted step runner in these environments.
Ignore failure
By default, if a step fails, the workflow execution stops, and its status is set to fail. Select Yes for the workflow execution to continue even if the step fails.
Retry after
Select the After step failure option to automatically retry the step execution in case of failure, following the specified delay and number of attempts. By default, if a step fails, it will not be rerun.
Discard data
When set to Yes, the step input and output are discarded after the workflow execution completes, and they won't be accessible in the step's execution log. Any files generated by the step are also discarded. This option is useful, for instance, when dealing with sensitive data in a step.
Return the response as a file
Set this toggle to Yes to get the response of a step as a file instead of directly to context. This can be useful when handling binary content, such as an image or an executable, or a large amount of data that exceeds the step output size limit. The step output will be a JSON object that contains information about the response file and the file URL. See here for more information. When this toggle is set to Yes, the Shareable Link toggle will appear.
Shareable link
The Shareable Link toggle is only visible when the Return Response As File toggle is set to Yes.
By default, links to files generated as step outputs are restricted to Torq, ensuring privacy and preventing sharing with third-party vendors. These links can only be utilized within Torq steps. Set the Shareable Link toggle to Yes to get a link that can be shared and will be accessible to third parties for a limited time. See here for more information.
Step status codes
When a step is executed, Torq returns a status code to indicate the success or failure of the operation. If the step returns an error, the reason and a suggested solution are provided. The table below explains the meaning of each status code. In addition, if the step executed an HTTP request, the HTTP status code can also be observed.
Step status code | Status | Description | HTTP status code |
---|---|---|---|
1 | OK | The step was executed successfully. | 2xx |
2 | InvalidArgument | One or more input parameters contain an invalid value. | - |
3 | DeadlineExceeded | The step's operation timed out. | 408 |
4 | NotFound | The requested resource or entity was not found. | 404 |
5 | AlreadyExists | The resource or entity you tried to create already exists. | - |
6 | PermissionDenied | Insufficient permissions to perform this step's operation. | 403 |
7 | Aborted | The step execution was aborted (not failed). | - |
8 | OutOfRange | The step's operation is trying to be performed on data outside of the available range. For example, accessing an index item that doesn't exist. | - |
9 | Internal | An internal system error caused the step to fail. | 500 |
10 | Unavailable | The step's service is currently unavailable. You can try to execute the step again. | - |
11 | Unauthenticated | Invalid authentication credentials | 401 |
12 | On hold | Generally seen for steps waiting for user input, for example, Ask a question. | - |
View step execution history
All step executions, whether standalone or as part of a workflow, are recorded in the execution log, which you can access by selecting the step and going to the Execution Log tab.
Both successful and failed step executions are logged, and in the case of failure, the step status code offers insights into the cause. Each log entry includes information such as the execution ID, the entity that executed the step (workflow or user), the execution time and duration, and the step input and output JSON objects, along with execution debug details.
Disable steps
Disabling a step keeps it in the workflow but excludes it from being executed as part of the workflow execution. To disable a step, select it in the designer and click the Disable icon in the menu above it. Keep in mind that steps that rely on the disabled step output will require input adjustments to execute successfully.