Create Snippets

Learn how to create and manage snippets.

Cutover Documentation Team avatar
Written by Cutover Documentation Team
Updated over a week ago

Snippets are a predefined set of tasks that can be easily imported into runbooks — with snippets, you can easily create quick fixes for unexpected problems that arise in your runbook. In other instances, you may be simply looking to supplement your original set of tasks with additional snippets depending on your needs. This article will cover snippet functionality, how to create snippets, and the snippet task type.


Overview


The snippets you create and their purpose depends on your needs and the overall goal of your runbooks.

This flexibility allows you to create customized solutions for a wide variety of uses and create opportunities for improvement to ensure your runbook executes as planned. You may also think of snippets as a way of creating a library of short processes and actions that can be added to tasks based on any unexpected situation.

For example, in the event a test fails within a runbook, snippets can be used to deploy and execute a fix for the failed test.

Create a snippet


Snippets are created on the workspace level and can be managed within a workspace and any runbook the snippet is in.

Things to note:

  • Snippets can be created and maintained by workspace runbook creators.

  • Up to 100 tasks can be added to a snippet.

  • Snippets can be added to paused non-dynamic runbooks.

  • Runbook-level custom fields are not available for snippets.

  • While snippets don't have their own streams, when imported into a runbook, the snippet will be added to the stream of its predecessor or the task it is linked to.

Important: Runbook admins can add approved snippets with at least one task into runbooks.

To create a snippet, click the Snippets tab in your workspace. Next, click the + Create Snippet button on the upper right-hand corner of the screen.

Next, title your snippet and click + Create.

Once your snippet has been created, you can add up to 100 tasks. When adding tasks, you can title your tasks, select a task type, add a description, and more. Adding details for snippets follows the same process for creating tasks. Read more details about tasks.

Your snippet will need to be approved in order for it to become available for use in your runbook. To approve your snippet, click the Snippet Details icon in the upper right-hand corner of the screen:

Next, click Approval Settings > Approved. Optionally in some cases, you can mark the snippet as Rejected or leave it in draft mode. Snippets that are marked as draft or rejected will not be available for use in a runbook.

Once the snippet has been created and approved by the workspace runbook creator, runbook admins are able to add the approved snippet to any number of runbooks.

Note: When a snippet is imported to a runbook, task assignments will be copied over. If a snippet admin is not a member of any team, they will not be copied.

Any changes that need to be made to your snippet title or status can be made in the Snippet Details menu. Additionally, once snippets have been imported into a runbook, you are able to edit the tasks from the snippet as you would any other task in a runbook.

Create a snippet from multiple selected tasks


Runbook admins have the ability to create new snippets by selecting up to 100 tasks in an existing runbook. This means that multiple tasks can be selected at any time and added as a snippet.

To create a snippet from multiple selected tasks, navigate to the runbook of your choice and follow the steps below:

  1. Select tasks (up to 100) that you would like to include in your snippet.

  2. Click the Create as Snippet icon.

  3. Enter a title for your snippet.

  4. Click Add.

Once your snippet has been created successfully, a green success message will appear to confirm.

Things to note

  • This functionality is unavailable to admins with the folder runbook creator role.

  • Some tasks may be copied in separate sequences if there is no predecessor-successor relationship between them.

  • Currently, users, teams, task assignments, and comms task recipients will not be copied when the snippet is created.

Use a snippet task type


Provided you are a Runbook Admin and your runbook is dynamic, you can use a snippet task type to prompt a task executor to add a snippet at a certain point during a run.

To set up a snippet task type, create your task, click on it to edit it, and select Snippet from the Task Type list.

Click Snippet in the Task Type drop-down menu. You will be prompted to start typing to find the snippet or snippets you’d like to attach to your task. If no snippets are attached, then all of your workspace's approved snippets will be displayed for selection in the task as a default.

Next, click Save at the top of the task editing panel.

When the executor starts the task, the Start task modal will ask them to select a snippet and to click Continue. Alternatively, they can proceed without making any selection at all.

The selected snippet's tasks will be added to the runbook for execution.

Import snippets into a runbook


To import your snippet to a runbook, simply click the More options icon on the task you want your snippet to be the successor of:

Click Add a Snippet.

In the Choose a Snippet modal, select a snippet to add to your runbook:

Add a snippet in sequence or in parallel


You can choose whether the snippet will be added in sequence or in parallel to the other tasks in the runbook.

When adding a snippet in sequence, snippet tasks are added between the original task and its successor. In the below example, task #4 from snippet one is added in sequence after task #1.

When snippets are added in parallel, the snippet tasks are added in parallel (or next to) the original task's successor. In the below example, tasks #5-10 from snippet two are added in parallel after task #2 — notice tasks #5-10 are "next to" task #3.

Once you have selected the insertion type, then click + Add.

Note: When snippets are imported sequentially, the snippets will inherit the dependencies of the original task.

Did this answer your question?