Fortinet white logo
Fortinet white logo

User Guide

Playbook Designer

Playbook Designer

The Playbook Designer is a visual canvas that allows you to design and edit your playbooks. To open a playbook in the designer, click the playbook.

Playbook Designer Main Menu (Upper Right)

The Playbook Designer Main Menu provides the following options:

  • Edit Primary Details: Click to modify any of the following:

    Field

    Description

    Name Update the playbook name.
    Description Enter/change the playbook description information.
    Tags Add tag(s)
    Playbook State Active or Inactive
    Logging Level Minimal or Verbose
    Execution Priority Low, Normal, or High

    When done, click Update & Close, to save, or Cancel to void changes.

  • Save as Draft: Save a draft version of the playbook without publishing.

  • Publish: Click to save and publish the playbook, making the current version available in the system.

  • More Options: Click to access the following options:

    Option

    Description

    Save Version

    Save the current version of a playbook while it is being created or updated. This allows you to revert to a specific version later by choosing the View Saved Versions option. After clicking Save Version, in the Note field, it is recommended that you enter some kind of identifier that allows you to distinguish this playbook version from any other that have been saved or that you plan to create. When done, click Save.

    Note: A maximum of 10 versions can be saved. If this limit is exceeded, older versions (beginning with the first version) will be overwritten.

    View Saved Versions Click to view all saved versions of your playbook. You can click a specific version to access it. Next, confirm by clicking Yes, Confirm.
    Delete Playbook Click to delete the playbook. After clicking, click Yes, Confirm to confirm the delete action.
    Execution History View the Execution Logs for previous executions of the playbook.

Playbook Designer Canvas Actions

Within the Playbook Designer canvas, you can use the following features:

Pan and Zoom: Navigate large playbooks by performing a click-drag within the miniature playbook pane, and/or use the horizontal Zoom bar to adjust the main view.

Undo and Redo: The Undo and Redo functions allow you to reverse or restore a change respectively.

Align Horizontal and Align Vertical: Align a playbook's elements horizontally or vertically by clicking on the appropriate icon.

Zoom To Fit: Click to resize the playbook to fit in the browser window.

More Options: Contains the following additional options:

  • Jinja Playground: Apply a Jinja template/expression to a JSON input and then render the output. You can check the validity of the Jinja and the output before adding the Jinja to the Playbook.

    The Jinja Playground consists of the following areas:

    • Jinja Expression: Define dynamic values within curly brackets or click More Options to open the Input/Output dialog to access variables, inputs, or step results.

    • Test Data: Provide JSON inputs in "Key":"Value" pairs. Syntax errors will be indicated by a "Bad String" prompt. You can define nested key-value pairs.

      After entering the Jinja expression and JSON, click Execute to view the result in the Test Output window. If the result is an object, it will be displayed in the object format instead of a text area.

      The Code drop-down in the JSON area includes options to:

      • Format JSON Data: Formats data with proper indentation and breaks.

      • Compact JSON Data: Compacts data to remove unnecessary whitespaces.

      • Sort Contents: Sorts contents based on fields in the ascending or descending order.

      • Repair JSON: Fixes common issues such as incorrect escape characters, quotes, removing comments, etc.

      • Undo: Reverts the last action.

      • Redo: Redoes the last action.

    • Input Parameters: Define input variables to receive data from "Reference Playbook" steps. Use vars.input.param to access these within the playbook. Click Add New / Add Another to add a new input variable and then click Save to save the parameter.

  • Run Playbook: Trigger the playbook directly from the designer in 'Verbose' mode for testing and debugging. This eliminates the need to navigate between the designer and other modules. For details, see Playbook Debugging - Triggering and Testing Playbooks from Designer.

Playbook Debugging - Triggering and Testing Playbooks from Designer

You can trigger playbooks directly from the Playbook Designer, in the 'Verbose' mode, simplifying the process of testing and debugging while building. This allows developers to edit and run the playbook without needing to navigate to the module, select a record, choose the playbook, trigger it, and then return to the designer for further changes.

Caution: Triggering a playbook from the designer starts the execution of the playbook, which can result in changes to your data. Therefore, it is important to review the playbook thoroughly before execution to avoid unintended modifications or data loss.

To trigger the playbook in the Playbook Designer, click Run Playbook and then specify the following:

  1. Select the reference data source:

    • Select data from a previous execution: If you have run the playbook earlier in the 'Verbose' mode, you can choose this option. From the drop-down list, choose a previous playbook run to use its environment to trigger the playbook.

    • Provide custom JSON as Input: Provide record data as input using vars.input.record or provide custom JSON to trigger the playbook.

  2. Select the Use Step Mock Output option to execute the playbook with the mock output data that has been added in the steps.

    Only steps such as create record, ingest bulk feed, reference playbook, etc, where 'Mock Output' can be enabled at the step level are supported for enabling mock output at the playbook level. Steps like manual task, wait, approval, and so forth do not support mock output.

  3. Click Trigger Playbook to run the playbook and review the corresponding Executed Playbook Logs for detailed output.

For details about Playbook Steps, which are the building blocks of a playbook, see Playbook Steps.

Playbook Designer

Playbook Designer

The Playbook Designer is a visual canvas that allows you to design and edit your playbooks. To open a playbook in the designer, click the playbook.

Playbook Designer Main Menu (Upper Right)

The Playbook Designer Main Menu provides the following options:

  • Edit Primary Details: Click to modify any of the following:

    Field

    Description

    Name Update the playbook name.
    Description Enter/change the playbook description information.
    Tags Add tag(s)
    Playbook State Active or Inactive
    Logging Level Minimal or Verbose
    Execution Priority Low, Normal, or High

    When done, click Update & Close, to save, or Cancel to void changes.

  • Save as Draft: Save a draft version of the playbook without publishing.

  • Publish: Click to save and publish the playbook, making the current version available in the system.

  • More Options: Click to access the following options:

    Option

    Description

    Save Version

    Save the current version of a playbook while it is being created or updated. This allows you to revert to a specific version later by choosing the View Saved Versions option. After clicking Save Version, in the Note field, it is recommended that you enter some kind of identifier that allows you to distinguish this playbook version from any other that have been saved or that you plan to create. When done, click Save.

    Note: A maximum of 10 versions can be saved. If this limit is exceeded, older versions (beginning with the first version) will be overwritten.

    View Saved Versions Click to view all saved versions of your playbook. You can click a specific version to access it. Next, confirm by clicking Yes, Confirm.
    Delete Playbook Click to delete the playbook. After clicking, click Yes, Confirm to confirm the delete action.
    Execution History View the Execution Logs for previous executions of the playbook.

Playbook Designer Canvas Actions

Within the Playbook Designer canvas, you can use the following features:

Pan and Zoom: Navigate large playbooks by performing a click-drag within the miniature playbook pane, and/or use the horizontal Zoom bar to adjust the main view.

Undo and Redo: The Undo and Redo functions allow you to reverse or restore a change respectively.

Align Horizontal and Align Vertical: Align a playbook's elements horizontally or vertically by clicking on the appropriate icon.

Zoom To Fit: Click to resize the playbook to fit in the browser window.

More Options: Contains the following additional options:

  • Jinja Playground: Apply a Jinja template/expression to a JSON input and then render the output. You can check the validity of the Jinja and the output before adding the Jinja to the Playbook.

    The Jinja Playground consists of the following areas:

    • Jinja Expression: Define dynamic values within curly brackets or click More Options to open the Input/Output dialog to access variables, inputs, or step results.

    • Test Data: Provide JSON inputs in "Key":"Value" pairs. Syntax errors will be indicated by a "Bad String" prompt. You can define nested key-value pairs.

      After entering the Jinja expression and JSON, click Execute to view the result in the Test Output window. If the result is an object, it will be displayed in the object format instead of a text area.

      The Code drop-down in the JSON area includes options to:

      • Format JSON Data: Formats data with proper indentation and breaks.

      • Compact JSON Data: Compacts data to remove unnecessary whitespaces.

      • Sort Contents: Sorts contents based on fields in the ascending or descending order.

      • Repair JSON: Fixes common issues such as incorrect escape characters, quotes, removing comments, etc.

      • Undo: Reverts the last action.

      • Redo: Redoes the last action.

    • Input Parameters: Define input variables to receive data from "Reference Playbook" steps. Use vars.input.param to access these within the playbook. Click Add New / Add Another to add a new input variable and then click Save to save the parameter.

  • Run Playbook: Trigger the playbook directly from the designer in 'Verbose' mode for testing and debugging. This eliminates the need to navigate between the designer and other modules. For details, see Playbook Debugging - Triggering and Testing Playbooks from Designer.

Playbook Debugging - Triggering and Testing Playbooks from Designer

You can trigger playbooks directly from the Playbook Designer, in the 'Verbose' mode, simplifying the process of testing and debugging while building. This allows developers to edit and run the playbook without needing to navigate to the module, select a record, choose the playbook, trigger it, and then return to the designer for further changes.

Caution: Triggering a playbook from the designer starts the execution of the playbook, which can result in changes to your data. Therefore, it is important to review the playbook thoroughly before execution to avoid unintended modifications or data loss.

To trigger the playbook in the Playbook Designer, click Run Playbook and then specify the following:

  1. Select the reference data source:

    • Select data from a previous execution: If you have run the playbook earlier in the 'Verbose' mode, you can choose this option. From the drop-down list, choose a previous playbook run to use its environment to trigger the playbook.

    • Provide custom JSON as Input: Provide record data as input using vars.input.record or provide custom JSON to trigger the playbook.

  2. Select the Use Step Mock Output option to execute the playbook with the mock output data that has been added in the steps.

    Only steps such as create record, ingest bulk feed, reference playbook, etc, where 'Mock Output' can be enabled at the step level are supported for enabling mock output at the playbook level. Steps like manual task, wait, approval, and so forth do not support mock output.

  3. Click Trigger Playbook to run the playbook and review the corresponding Executed Playbook Logs for detailed output.

For details about Playbook Steps, which are the building blocks of a playbook, see Playbook Steps.