Skip to main content
Snippets are reusable blocks of instructions that can be embedded in multiple runbooks. Create them once, then insert them wherever the same procedure should appear.

What are Snippets?

Snippets are instruction fragments you can include in any runbook. They’re perfect for procedures that appear in multiple contexts: When you insert a snippet into a runbook, Duckie keeps it as a snippet embed so you can recognize and manage the shared procedure.

Why Use Snippets?

Consistency

The same procedure is executed the same way everywhere.

Efficiency

Write once, use in many runbooks.

Maintenance

Keep common instructions in one place instead of rewriting them in every runbook.

Organization

Keep runbooks focused on their specific purpose.

Creating Snippets

1

Navigate to Snippets

Go to Build → Snippets in your dashboard.
2

Click Create Snippet

Click Create Snippet to open the editor.
3

Name Your Snippet

Use a clear, action-oriented name:
  • Good: “Verify Customer Identity”, “Process Refund”
  • Avoid: “Snippet 1”, “Identity”
4

Write Instructions

Write the reusable instructions. These can include:
  • Steps
  • Conditional logic
  • Tool references
5

Save

Click Save to save your snippet.

Example Snippets

Verify Customer Identity

Check Subscription Status

Standard Closing

Using Snippets in Runbooks

Insert snippets from the runbook editor:
The inserted snippet appears as an embedded block in the runbook editor:

Managing Snippets

Viewing Usage

Each snippet shows which runbooks use it:

Editing Snippets

When you edit a snippet from the Snippets page:
  1. Changes save immediately
  2. New runbook inserts use the updated snippet content
  3. Existing runbook embeds keep the content already saved in that runbook
Be careful when editing an embedded snippet from inside a runbook. Saving it back to the source snippet can update other runbooks that reference the same snippet.

Deleting Snippets

Before deleting:
  1. Check which runbooks use the snippet
  2. Remove or replace the snippet references
  3. Then delete the snippet

Best Practices

When to Create a Snippet

Create a snippet when:
  • The same instructions appear in 2+ runbooks
  • The procedure needs to be consistent everywhere
  • You want to update the procedure in one place

Snippet Scope

Keep snippets focused:
  • Good: “Verify Customer Identity” — one clear purpose
  • Avoid: “Handle Customer” — too broad

Naming

Use action-oriented names that describe what the snippet does:
  • “Verify Customer Identity”
  • “Check Order Status”
  • “Process Refund Request”
  • “Standard Closing”

Documentation

Add comments in your snippet explaining:
  • When to use it
  • What it accomplishes
  • Any prerequisites

Next Steps

Create Runbooks

Build runbooks using snippets

Tools

Reference tools in snippets