Create a custom step
  • 31 Jan 2023
  • 3 Minutes to read
  • Dark

Create a custom step

  • Dark

Article Summary

Torq has hundreds of vendors and steps out of the box, but sometimes it's useful to create a custom step from scratch yourself for testing purposes or to work with a service that does not have a public API. For these cases, you can quickly create custom steps. There are several ways to create a custom step:

Create an HTTP request step

  1. Go to the Workflows page and either open an existing workflow or create a new workflow.
  2. In the Steps Library search for Send an HTTP Request and drag the step onto the designer.
  3. Configure the HTTP request. The mandatory parameters are displayed in the configuration panel. To access additional (optional) parameters, click the gear icon.

4. Rename the step to describe what the HTTP request is doing. For example,Pull in data from Github.

5. A custom icon will be added automatically if Torq can find an available HQ one. Otherwise, you can add a custom icon, click the three-dot button on the top right of the step configuration window, and select Edit YAML. This will help everyone easily distinguish it from other HTTP steps, and if you save it as a custom step, you'll be able to identify it by the icon.

6. Locate the "icon" key and for the value add the URL of the icon image. 

lf3zun8zywfu1n438aw80xk7pzp4389xlkt5tu6ko994q1jtp0g1zlzu6m71oyua 7. To save this as a custom step so you can easily reuse it later, click the three-dot button on the top right of the step configuration window and select Save as Custom Step.


8. To use this step later, you can select it from the Custom Steps section in the Steps Library.

Convert a step to HTTP mode

HTTP mode exposes additional HTTP request options for an integration step. Since integration steps are usually a subset of the integration's API calls' input parameters, Torq gives you the ability to open an integration step in HTTP mode to configure the step as a raw HTTP request. This enables you to use the full functionality of the underlying API request.

Example: Get member list Dropbox step

The only parameter the Get member list Dropbox step has is the integration.
Click Switch to HTTP mode

Click the two arrows icon to convert the step to HTTP mode. Now you can edit the API call to suit your needs.

Edit the api call

For example, you can provide a different access token than the one used by the integration. The out-of-the-box step can use only the access token provided by its only input parameter - the Dropbox integration.

Use a custom access token

Create a step from a cURL command

Create an HTTP request step by pasting (similar to copy-paste) an API call in the form of a cURL command (for example, from vendor documentation) in the designer.

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

curl -X GET "{YOUR_API_KEY}"

2. In the designer, paste it onto the desired anchor (the same way you would paste a step).

3. An HTTP request step is created based on the cURL command.


Create a step from a nested workflow

Save nested workflows as custom steps to allow other users to easily access, reuse, and benefit from their complex logic. For more information on nested workflows, see here.

  1. Within an existing workflow, drag the Workflow operator onto the designer. 0tsfas28imo5siap5e8v3rjsb7oeig9itx8b5749eytpzic14k2m8rh0arv7i17w
  2.  Select the workflow you would like to save as a custom step. Note: this must be a workflow you can access within your tenant. nwji5cs2lll25dw7h6mo00g2pa7pgy2mva1kabvv98dtec7yzhy6isai5nvbsn68
  3.  Click on the wand icon to create a custom step based on the selected workflow.noieja5ibhun222cms02ojpa53zuowqgpaeofo3uqtgljnawlnwghzqa6954oup7
  4.  Give the step a unique and relevant name. 
    1.  Choose the main vendor for this nested workflow - this will ensure the custom step appears when you search for that vendor. 
    2. You can also specify the name of an entirely new vendor, along with a URL for a new vendor. q3eyue3flouq4x09kvx57sr54gnk08o7btx13yhr40i5spiw2b0992dei1t2e05v
  5. Click Create. The new step will now be available in the Custom Steps section in the steps library. 



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.