Skip to main content
All CollectionsBuild Automations
Automate With AI: Simplify Workflow Creation
Automate With AI: Simplify Workflow Creation

Use AI to generate automated workflows, build logic based on your given prompt, and ease the creation process with AI automated solutions.

Updated over a month ago

Generate a Torq workflow using AI: prompt the AI with specific instructions, and it will create a workflow based on the prompt.

  1. Click the Generate with AI button at the top of the workflows page, or click Create Workflow > Generate with AI to open the AI wizard.

  2. Enter your desired prompt, being as specific as possible. See the tips below for optimal prompting.

  3. Click Generate to preview the workflow.

    1. Optionally, if the presented workflow is not as desired, adjust the prompt and click Generate again to regenerate the workflow.

    2. Note that you need to edit the entire prompt and resubmit it. Writing a single line such as "Good, just add a Wait operator" is not an option. Your prompt history is not saved.

  4. If the steps meet your requirements, click Create Workflow.

  5. The wizard will ask you to select your desired integrations and fill in any necessary parameters. If you do not know exactly which parameters or integrations you wish to use, you can leave some blank in this first step.

  6. Click Next, and the workflow will be added to your workspace.

  7. You should be immediately directed to the new workflow.

    1. An annotation will be at the top, containing the final prompt and reminding you that the workflow was created with AI.

  8. Review each step and its parameters carefully, ensuring the proper integrations, parameters, messages, etc., were used before test running or publishing the workflow.

The AI workflow builder is skilled at building out workflow logic, but make sure you carefully review each step and parameter.

Tips

  • The more specific you are about which operators, steps, and integrations should be used, the more accurate the workflow will be. For example, instead of writing "Send a message to the admin email," specify "Send a Slack message to admin@torq.io"

  • Writing the workflow prompt in a structured or numbered list is helpful.

  • If you wish to use an integration that does not yet exist in your workspace, you can create a new integration during the wizard stage without leaving the workflows page.

  • Workflows using Slack blocks, Teams forms, and other steps that require JSON objects can be generated easily. When requesting the use of one of these steps, there is no need to be overly specific about the block's appearance.

  • Steps that require specific syntaxes, such as JQ, Python, and other code-based steps, can all be utilized in workflow generation.

  • Steps using CLI tools and AWS steps can all be used.

  • All Cases steps can be utilized so long as the prompting user has the appropriate permissions within the workspace.

  • If you want to use the Exit operator, it is recommended that you specify it as such and specify what the output parameters should be.

  • You can generate workflows using the following triggers: Scheduled, Integration, and On Demand.

  • Workflow generation should take between 10 and 30 seconds, depending on the complexity of the prompt.

  • See here for a comprehensive list of potential limitations.

If you do not see the Generate with AI feature, it may be because your organization opted out of Torq AI features. Please contact Torq support if you have not opted out and still do not see the feature.

Example Prompts

Get a domain as a parameter. Get domain info with VirusTotal. Extract all IP addresses from the information. Classify every IP as malicious or not using VirusTotal. Send every malicious IP to the #malicious-ips Slack channel

  • This prompt specifies which integration to use for both the IP classification and the messaging, raising the likelihood that the proper integrations will be used.

  • The sentences in this prompt are kept short and to the point, with no unnecessary adjectives or commas.

When triggered by Okta, do the following:\n1. Enrich the data (with 'location' and 'risk' fields) of the IP address from the event with Recorded Future \n2. If risk score greater than 3, open a new Jira Ticket \n3. Otherwise send a Microsoft Teams message to channel id \"1234\"

  • This prompt is formatted in a list (\n1., \n2., etc.), ensuring it is simpler for both AI and the user.

  • This prompt can be made even more specific if there is a certain team member you would like the Jira ticket assigned to by adding a line such as: \n2.5. Assign the Jira ticket to x@domain.com

Trigger from a Microsoft Defender alert and look for all IP addresses related to the trigger. For each IP address, do the following: \n1. Create a Torq case with the IP address as the Case name \n2. Get the IP address information from VirusTotal \n3. If the malicious score is higher than 5, add a 'Dangerous' tag to the Torq case. Otherwise, add a 'No threat found' comment to the case

  • This prompt will likely generate a loop, even if the prompt did not specifically say "use a loop" due to the phrasing of "For each IP address do the following"

Did this answer your question?