Data Formatter Tasks

Last Updated: October 26, 2026

The data formatter task, as a Jinja code editor, provide a dedicated space for data extraction, manipulation, organization, and testing. They typically serve as holders of preparatory data for subsequent workflows, and are commonly referenced by command, conditional, or other data formatter tasks.

An image of the data formatter task node.

Examples

Example 1 - Date-Time Parsing and Splitting

Tip: you can also generate this playbook with AI. See Generating with AI.

  1. Build and test the following playbook using the Get Current UTC Time command, ensuring that all tasks auto-run.

    df-ex1-01-playbook.png
  2. Click on the Frame 3.png icon of the command task.

    Playbook Task Details of the Get Current Date and Time command task


  3. Navigate to the Return Data tab, then note the date time format.

    Return Data tab showing the date and time
  4. Insert the following Jinja code into the data formatter task editor.

    Date: {{ PlaybookData | jsonpath('$.["Get Current Date and Time"].returnData') | split(' ') | first }}
    
    Time: {{ 
        PlaybookData | jsonpath('$.["Get Current Date and Time"].returnData') | split(' ') | last 
        }}
    

    See jsonpath, split, and first.

    Data formatter editor with the Jinja code

    See FAQ 1 for guidance on accessing output data from an upstream command.

  5. Re-test the playbook.

    Playbook after the re-test
  6. Click on the Frame 3.png icon of the data formatter task, then navigate to the Return Data tab to verify that the data has been formatted.

    df-ex1-06-formatted.png
Example 2 - Branch-Specific Data Preparation
  1. Build the following playbook, ensuring that all tasks auto-run:

    df-ex2-01-playbook.png
  2. Configure Unwind Task with the following JSON Data parameter:

    JSON
    [
      { "demoKeyA1": "valueA1", "demoKeyA2": "valueA2" },
      { "demoKeyB1": "valueB1", "demoKeyB2": "valueB2" },
      { "demoKeyC1": "valueC1", "demoKeyC2": "valueC2" }
    ]
    

    Unwind Task with the JSON Data parameter
  3. Configure Workflow Separator with the following conditional logic:

    {% set data = PlaybookData | jsonpath('$.["Unwind Task"].contextData.data') %}
    
    {% if data | contains_key('demoKeyA1') or data | contains_key('demoKeyA2') %}
        Workflow A
    {% elif data | contains_key('demoKeyB1') or data | contains_key('demoKeyB2') %}
        Workflow B
    {% elif data | contains_key('demoKeyC1') or data | contains_key('demoKeyC2') %}
        Workflow C
    {% else %}
        Next
    {% endif %}
    

    See jsonpath, and contains_key.

    df-ex2-03-separator.png
  4. Configure all data formatters with the following Jinja code:

    {{ PlaybookData | jsonpath('$.["Unwind Task"].contextData.data') }}
    

    Data formatter with the Jinja code
  5. Test run the playbook.

    df-ex2-05-test-run.png
  6. Open the Playbook Task Details popover for each of the data formatters.

    Playbook Task Details of Prepare Workflow A
  7. Verify that the data has been successfully separated and prepared for each corresponding downstream workflow.

    Return Data of Prepare Workflow A, B and C
Example 3 - Event Context Extraction
  1. Build the following playbook, ensuring that all tasks auto-run:

    df-ex3-01-playbook.png
  2. Configure Demo Event with the following JSON data:

    JSON
    {
      "eventId": "edr-98765",
      "user": {
        "email": "analyst@securitylab.io",
        "username": "analyst",
        "role": "security_engineer"
      },
      "eventTime": "2025-11-05T14:22:33Z",
      "severity": "high",
      "alertType": "suspicious_login",
      "host": {
        "hostname": "WIN-10LAB01",
        "ip": "10.0.1.15"
      }
    }
    

    Demo Event data formatter with the event JSON
  3. Configure Get User Email with the following Jinja logic:

    {
      "userEmail": {{ PlaybookData | jsonpath('$.["Demo Event"].returnData.user.email') | tojson }}
    }
    

    Get User Email Jinja logic
  4. Configure Get Event Time with the following Jinja logic:

    {
      "eventTime": {{ PlaybookData | jsonpath('$.["Demo Event"].returnData.eventTime') | tojson }}
    }
    

    Get Event Time Jinja logic
  5. Configure Get Severity with the following Jinja logic:

    {
      "severity": {{ PlaybookData | jsonpath('$.["Demo Event"].returnData.severity') | tojson }}
    }
    

    See jsonpath.

    Get Severity Jinja logic
  6. Test run the playbook.

    Test run of the event context playbook
  7. Open the Playbook Task Details popover for each of the "Get" data formatters.

    Playbook Task Details of Get User Email
  8. Verify that the data has been successfully extracted and ready for each corresponding downstream workflow.

    Return Data of Get User Email, Get Event Time and Get Severity

FAQs

How can a data formatter access the output data of an upstream command?

Commonly used output data fields:

Output Data Fields

Object Reference Key

Raw Data

rawData

Context Data

contextData

Return Data

returnData

Result

result

Reference structure:

{{ PlaybookData | jsonpath('$.["<Task Name>"].<Parent Key>.<Child Key>') }}
  • PlaybookData: The root object containing all task data within the playbook execution.

  • jsonpath(): A Jinja filter that extracts data using a JSONPath expression.

  • <Task Name>: The exact name of the upstream task being referenced (case-sensitive).

  • <Parent Key>: An object (e.g., returnData) that holds one or more key-value pairs, where each value can be a primitive, an array or another object.

  • <Child Key>: A subordinate key within the parent object that provides access to a specific data element or deeper nested structure.

READER NOTE

The Format Builder and Data Source features can help speed up the construction of the reference structure.

Format Builder window

Add Data Source window