Skip to main content

Creating Custom Steps in Torq: Automate Anything

Learn how to create your own new דteps to automate any process.

Updated yesterday

Torq offers hundreds of integrations and steps out of the box, providing extensive functionality. Occasionally, you might need to expand step capabilities or address specific needs. In these cases, create custom steps to ensure your Workflows have the precise functionality you require.

There are several ways to create and save a custom step for future use in your workspace. Some methods let you save an HTTP request step directly, while others use Step Builder. For a hands-on walkthrough, see the Custom and HTTP Steps course in the Torq Academy.

When importing or exporting Workflows between workspaces, any custom steps (or integrations) within the Workflow will also be imported/exported.

Create an HTTP request step

Create your own step by adding an HTTP request step and configuring the API call. You can configure the request directly in the step, or click the wand icon to open the Step Builder and save it as a reusable custom step.

  1. Navigate to the Workflows page and open or create a new Workflow.

  2. In the Builderbox, search for "Send an HTTP Request, then add the step to the canvas.

  3. Configure the step:

    • Enter an AI Prompt: In the Generate HTTP Request with AI input field, enter a natural-language description of the desired action, then click the AI complete icon.

    • Alternatively, click the wand icon to open the Step Builder.

  4. Save the work you do in the Step Builder. If you close it without saving, all work on the custom step will be lost.

The step is now available for the workspace under the Custom tab in the Builderbox.

Optional parameters

After adding the step to your Workflow, access additional execution settings by clicking the Settings icon in the step configuration panel's Parameters section. Some of the notable available options include:

  • Timeout: End the step automatically after a specified period of inactivity. This prevents the step from executing indefinitely.

  • Skip SSL verification: SSL verification is the process of confirming a website's certificate, ensuring secure, encrypted communication between the client and server.

  • Ignore redirects: If the call requires more than 3 redirects, they will be ignored.

  • HTTP proxy: An intermediary server that forwards requests to servers. This enhances security and privacy.

Convert a public step to HTTP mode

HTTP-based integration steps can be switched to HTTP mode to modify the underlying API request. HTTP mode exposes additional HTTP request options. Since integration steps are usually a subset of the vendor's API calls' input parameters, HTTP mode can configure the step as a raw HTTP request and leverage the full functionality of the underlying API.

The changes to the API request will only apply to this step in the Workflow you are building.

  1. Click the two arrows icon in the Step Parameters section to convert the step to HTTP mode. Click Convert to confirm the switch. After you switch to HTTP mode, you cannot switch back to Basic mode.

  2. Modify the request options as needed.

Converting to HTTP mode is irreversible for this step instance. The step retains its current configuration (URL, headers, parameters), but the simplified Basic mode interface is no longer available. To keep the original step intact, consider creating a custom step from it (see Create a custom step from a public step below).

Example: HTTP Mode for Dropbox step

The only parameter the Get member list Dropbox step has is the integration.

  1. Click the two arrows icon to convert the step to HTTP mode. The API call is now editable.

  2. Modify the request to suit your needs. For example, provide a different access token than the one used by the integration. The out-of-the-box step can only use the access token provided by its input parameter, the Dropbox integration.

Create a custom step from a public step

Create a custom step from a public step instead of converting it to HTTP mode. The custom step will then be available for future use in the workspace under the Custom tab in the Builderbox.

  1. Find the step you want to customize and add it to your Workflow.

  2. Click the wand icon in the step configuration window. Follow the Step Builder instructions and save your work. If you close the wizard without saving, all work on the custom step will be lost.

Create a step from a cURL command

Create an HTTP request step by pasting an API call in the form of a cURL command (for example, from vendor documentation) into the Designer.

  1. Copy the cURL command that executes the API call you want to run in Torq.

    curl -X GET "<https://api.shodan.io/shodan/host/8.8.8.8?key={YOUR_API_KEY}>"
  2. Paste it directly onto the desired anchor in the Designer (the same way you would paste a step). A Send an HTTP request step is created based on the cURL command. This can be customized using the wand icon and Step Builder.

Create a step from a nested Workflow

Save nested Workflows as custom steps so other users can easily access, reuse, and benefit from their logic. For more information on nested Workflows, see here.

  1. Drag the Workflow operator onto the Canvas within an existing Workflow. Select the Workflow you would like to save as a custom step. This must be a Workflow you can access within your workspace.

  2. Click the wand icon to create a custom step based on the selected Workflow and follow the Step Builder instructions.

  3. Choose the main vendor (integration) for this nested Workflow. This ensures the custom step appears when you search for that vendor. You can also specify the name of a new vendor.

Create custom steps with the Step Builder

The Step Builder is a wizard accessible by clicking the wand icon in the step you want to customize, or by saving it as a custom step. It contains the following sections, shown in the left-hand menu:

  1. Step details: define the step name, description, vendor, and integration.

  2. HTTP request: Configure the URL, method, authorization, headers, body, and parameters.

  3. (Optional) Output example: Provide a sample JSON response for the step.

Save your work in the Step Builder. If you close the wizard without saving, your work will be lost.

Enter the step details

  1. Name: Enter a meaningful name for the step that reflects what it does.

  2. Description: Enter a brief explanation of the step that expands on the name.

  3. Documentation URL: Enter a link to the vendor's API documentation (if available).

  4. Vendor: Select the vendor for this step. If the vendor doesn't exist, type the new name and click Create <vendor name>.

  5. Integration: Select the integration instance to use by default for this step.

Build the HTTP request

Configure the underlying API call for the step.

  • URL: Enter the base URL for the API call.

  • Method: Select the API method (GET, POST, PATCH, DELETE, etc.).

  • Authorization: Select the authorization method for the API call (e.g., None, Basic (u/p), or Bearer).

  • Headers: Add one or more key-value pairs.

  • (Optional) Content type: Select the content type for the request (for example, application/json; charset=utf-8).

  • (Optional) Body: Enter the request body content (for example, a JSON payload).

  • HTTP optional parameters: An expandable list of optional parameters to add to the step. Click Add next to the parameter you need, then define the field.

You can set any value from the HTTP request as a parameter. When configuring this step, users will see required parameters as fields in the main configuration window, and optional parameters will be accessible by clicking the cogwheel icon.

Create new parameters

Create a new parameter from the marked segments in the URL. Highlight the relevant parameter segment and click Set as parameter.

The parameter is added to the left-hand menu for you to define. The step preview shows the input field for this parameter.

Assign a value to existing parameters

To define a parameter you have added to your step, select it from the list on the left-hand side menu.

Types of parameters

Define your parameter by selecting one of the two primary parameter types: data parameters and integration value parameters.

  • Data parameter: Toggle to Create a parameter.

    This parameter will receive input from the end-user using the step. Edit the name for the step's input field, select the correct type, description, placeholder, and if this is a required field.

  • Integration value parameter: Toggle to Use an integration value.

    Select the value from the dropdown menu. If the step was configured with an Integration (under the Step details section), the user can select a parametrized value that will receive its content from the integration. This will usually be for the URL's account domain identifier or authorization-related values. You can also create custom integrations.

Parameter conditions

This is a regular data parameter for instances where the end-user should fill it out only under certain conditions, such as if another parameter has a specific value or is filled in.

Deselect the Required checkbox to apply conditions to parameters, then add a condition based on the appropriate requirements.

Remove values from parameters

To remove a value from being a parameter option (but not delete the parameter), go to the HTTP section, click on the parameterized value, and click Remove parameter.

If the parameter has no value, a notification appears reminding you to either assign a value or delete it.

Delete parameters

To delete a parameter, go to the parameter configuration and click Delete in the top right corner. When deleting a parameter, each associated value becomes unparameterized, and the input field presented in the step preview is removed.

(Optional) Define an output example

As a best practice, provide a sample JSON response for the step. This allows users to reference the step's output data via autocomplete when building subsequent steps in a Workflow without first executing the step, and helps them understand the output's structure.

  1. Click Output example in the left-hand menu.

  2. (Optional) Enter a Description for the output.

  3. In the Example field, enter or paste a sample JSON response.

Example: Add pagination parameters to a step

Many APIs use query parameters like limit and offset for pagination. This example walks through customizing an existing step to add optional pagination parameters using the step Builder.

Start from an existing step

Rather than building from scratch, you can start from a similar existing step that already has a pre-configured URL, authorization, and base parameters. Add the step to your Workflow, then click the wand icon to open the Step Builder with the existing configuration pre-filled. Update the Name and Description under step details to reflect the new endpoint.

Update the URL and add parameters

  1. In the HTTP request section, update the URL to the target endpoint. For example:

    <https://api.vendor.com/entities/v1?id=abc123&limit=5000&offset=0>
  2. To tokenize the abc123 value as a required parameter, highlight it in the URL. A Set as parameter pop-up appears. Click it. The value is replaced with a colored marker, and the parameter appears in the left-hand menu.

Select the new parameter from the left-hand menu to open the parameter configuration panel. Configure it:

  • Enter a descriptive Name (for example, Host ID).

  • Select the correct Type from the dropdown.

  • (Optional) Enter a Description and Example value.

  • Leave the Required checkbox selected.

Add optional pagination parameters

  1. In the URL, highlight the value 5000 next to limit=. Click Set as parameter in the pop-up.

  2. Select the parameter from the left-hand menu and configure it:

    • Enter Limit as the Name.

    • Select Number as the Type.

    • (Optional) Enter an Example value (for example, 5000).

    • (Optional) Enter a Default value.

    • Deselect the Required checkbox. This marks the parameter as optional.

  3. Repeat for the offset value (0):

    • Highlight 0 next to offset= and click Set as parameter.

    • Enter Offset as the Name, select Number as the Type, and deselect Required.

When an optional parameter has no value, the entire query string segment (for example, &limit=5000) is omitted from the request URL. The base API call executes without the pagination parameters. This allows you to add pagination, filtering, or sorting parameters without affecting the step's default behavior.

Verify the step

  1. Click Test Run in the top right corner. The Execution Log panel opens on the right and displays the results under the Output, Input, and Debug tabs.

  2. Check the Debug tab and confirm that the request URL does not include &limit= or &offset=. Because these parameters are optional and have no default value, they are completely omitted from the request.

Did this answer your question?