Snippets

Snippets are groups of steps that can be published and managed from a central location. Easily scale automation across your SOC by using your published snippets as steps within and across workflows. Access your snippets on the snippets tab within the "Workflows" section of InsightConnect. View, build, modify, publish, and configure snippets here.

The snippets page allows you to view your snippets with the following statuses:

  • Published - the snippet can be selected as a snippet step in a workflow.
  • Unpublished - the snippet is in development and cannot be used in a workflow.

Snippet Actions

From the Snippets page, you can perform actions on individual snippets by clicking the ellipsis at the end of each snippet card. Here, you have the options to edit the snippet in the Builder or delete the snippet. For snippets that have a Published status, you can additionally view the published snippet in the builder without editing or discarding any unpublished changes that have been made to the snippet.

Published Snippets with Unpublished Changes

Once a published snippet has been edited, it creates an unpublished version of your snippet. In the Snippet Builder and on the Snippet Control Panel, you can switch between viewing the published snippet and the unpublished changes. This allows you to keep track of the changes made and refer back to the published version of the snippet. You can either publish the changes - this will replace the currently active snippet with the changes you made, or you can leave the Snippet Builder page with unpublished changes, and come back to continue working on it at a later date. Once you are ready to publish the changes, you can do it either from the Snippet Builder or from the Snippet Control Panel. When you publish changes to a snippet that is currently used in one or more workflows, you will be prompted to review those changes before proceeding, as this action could result in errors in the linked workflows.

Snippet Builder

To build a new workflow click Add Snippet from the snippets page. This will open the Snippet Builder and immediately prompt you to enter snippet details. To configure input and output variables for your snippet, click Configure from the upper right of the Snippet Builder. If you need to edit an existing snippet, open the Snippet Builder by clicking the ellipsis on a snippet card, then Edit in Builder.

Snippet Configuration

Snippet input variables represent the data you pass into your snippet. Snippet output variables represent any results from your snippet that you wish to access later when using in a workflow. We recommend defining snippet input before you build your snippet, and defining snippet output once you have finished building your snippet.

Input

The inputs you add when creating a snippet will display when configuring and using the snippet step in a workflow. You should start by defining any required data. This information can then be referenced in steps as you build your snippet. For example, if your snippet requires a URL, start by defining an input of type “string” titled “URL.” To add snippet input:

  1. Select “Add Input”.
  2. Provide a name for the input.
  3. Select a data type from the dropdown. Supported data types: array, boolean, bytes, date, float, integer, number, object and string.
  4. Define a default value. You can continue with the predefined value or add your own custom value. When you add a snippet step to a workflow, you will be prompted to define a value for each input. You can choose a value from your workflow or skip this step. If you do not define a value the workflow will use the default value.
  5. Configure any additional input variables as needed.

Output

Outputs allow the entire snippet to be treated as a single step within your workflow. You should configure outputs for any results from your snippet that you wish to access later when using in a workflow. To add snippet output:

  1. Select “Add Output”.
  2. Provide a name for the output.
  3. Select a data type from the dropdown. Supported data types: array, boolean, bytes, date, float, integer, number, object and string.
  4. Provide an output value. Click the [+] when adding an output value to view the variable picker. This will show all available output variables from each step within your snippet. If you have not finished building your snippet you can click save and add values later. You will not be able to publish your snippet if an output has an undefined value.
  5. Configure any additional output variables as needed.

Watch this video to learn how to build, configure and publish a simple ticketing snippet in InsightConnect.

Use a Snippet Step in a Workflow

Snippets can be added to a workflow as a single step. Use the “snippet” step type within a workflow to select from your published snippets. To configure a snippet step:

  1. Provide a name for the snippet step. (Note: the snippet step name is distinct from the snippet name.)
  2. Select a snippet from the dropdown list. You must create a snippet beforehand as snippets cannot be created or edited from within a workflow. Snippets must be published before they can be used in a workflow. If you have created a snippet and cannot see it in the list, view the snippet and ensure that it has been published.
  3. Define input values. A snippet may contain 0 or more input fields, depending on how it is configured. You cannot add or remove snippet inputs from within a workflow. Open the snippet to edit the configuration. For each input field, choose a value from your workflow or skip this step. If you do not define a value the workflow will use the default value from the snippet configuration.
  4. View configured outputs for the snippet. Snippet outputs may be used as inputs for subsequent steps in your workflow. You cannot add or remove snippet outputs from within a workflow. Open the snippet to edit the configuration.

Preloaded Snippet

You can import an existing enrichment snippet from the banner on the Snippets page: Enrich Domain with WHOIS. Follow the tutorial in product to learn how to publish this snippet for use in your workflows.