{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "2E493DA1-D43D-4C07-AA1F-99014F4EA2D1",
    "name": "BreachSpider: new device checked against firmware"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -55.032397408207345,
        "y": 5.442764578833696,
        "zoom": 0.86
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a device is added to the asset inventory in Google Sheets, checks it in BreachSpider against the CVEs for its exact firmware version and writes the result back to the row. An unresolved match or a warning is written as Needs review, never as clean. When there are confirmed findings, posts the fix plan to the OT channel in Slack and asks the OT engineer which maintenance window the fix goes in; the answer opens a change request in Freshservice or logs the hold as accepted risk.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a device is added to the asset inventory in Google Sheets, checks it in BreachSpider against the CVEs for its exact firmware version, writes the result back to the row (an unresolved match is marked Needs review, never clean), and when there are confirmed findings asks the OT engineer in Slack which maintenance window the fix goes in, then opens the change request in Freshservice or logs the hold as accepted risk.",
    "elements": [
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Note the hold in the Slack thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 506,
            "y": 640
          }
        },
        "flowElementId": "705203D4-5A4C-4327-86F0-B35CED17303E",
        "groupId": null,
        "id": "3A0CADD4-883D-47DF-92C8-6C763A2F5BF7",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Held as accepted risk by the OT engineer. "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "label",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " keeps "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "confirmed",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " confirmed CVEs for now. BreachSpider's fix stays on the inventory row: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "topFix",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to OT engineer",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DBF64897-20B9-4904-B05B-6A6F7C4B89EE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Hold note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Note the hold in the Slack thread",
        "nextElementIds": [
          "65746158-0BED-4004-ABFB-57A0DF4A3E94"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Flag needs review in Slack Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 528,
            "y": 340
          }
        },
        "flowElementId": "B1B36CFE-F1ED-4D39-B55B-E7E849F29700",
        "groupId": null,
        "id": "48439537-FD87-49FB-AE70-87416943CA90",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "reviewMessage",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Review flag",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Flag needs review in Slack",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the question for the OT engineer Result"
          },
          "position": {
            "x": 902,
            "y": 219
          }
        },
        "flowElementId": "2D7A9FEC-4BD4-47E5-8C11-5E97AF9D3180",
        "groupId": null,
        "id": "21E0591E-88EF-408D-B45C-4CA4D23274B1",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "label",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "label",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "status",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "status",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "resolvedProduct",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "resolvedProduct",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "confidence",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "confidence",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "topFix",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "topFix",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "clearsCves",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "clearsCves",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cveLines",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "cveLines",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "needsReview",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "needsReview",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "reason",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "reason",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const link = d => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${d}`;\nconst clears = Number(clearsCves) || 0;\nconst lines = [\n  `*${label}: ${status}*`,\n  resolvedProduct ? `BreachSpider matched it to ${resolvedProduct}${confidence ? ', ' + confidence : ''}.` : null,\n  topFix ? `Fix plan: ${topFix}${clears ? `, clears ${clears} CVE${clears === 1 ? '' : 's'}` : ''}.` : 'No vendor fix on record yet.',\n  Array.isArray(cveLines) && cveLines.length ? cveLines.map(l => `• ${l}`).join('\\n') : null,\n  needsReview === true && reason ? `Also needs review: ${reason}.` : null,\n  'Upgrading means stopping what this device controls. Which window does the fix go in?',\n].filter(Boolean);\nreturn {\n  text: `${label}: ${status}. Which window does the fix go in?`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n').slice(0, 2900) } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Next planned stop' }, url: link('planned_stop') },\n      { type: 'button', text: { type: 'plain_text', text: 'Next shutdown' }, url: link('shutdown') },\n      { type: 'button', style: 'danger', text: { type: 'plain_text', text: 'Hold as accepted risk' }, url: link('hold') },\n    ] },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Question card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the question for the OT engineer",
        "nextElementIds": [
          "DBF64897-20B9-4904-B05B-6A6F7C4B89EE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 110,
            "y": 219
          }
        },
        "flowElementId": "3098899F-6836-4535-B857-6050103F0DF3",
        "groupId": null,
        "id": "A3B5BADF-5386-4903-80A1-B1447C34E151",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "OT decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the OT engineer's answer",
        "nextElementIds": [
          "A0822110-BF86-4E08-A099-2D6BEFAA3F36"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the OT engineer Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 548,
            "y": 210
          }
        },
        "flowElementId": "F3631572-4BB2-4F7B-90B8-D0C2295545C3",
        "groupId": null,
        "id": "DBF64897-20B9-4904-B05B-6A6F7C4B89EE",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "21E0591E-88EF-408D-B45C-4CA4D23274B1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "21E0591E-88EF-408D-B45C-4CA4D23274B1"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question to OT engineer",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the OT engineer",
        "nextElementIds": [
          "A3B5BADF-5386-4903-80A1-B1447C34E151"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates existing data in Google Sheets for AI agents to modify records, correct information, or maintain data accuracy in automated workflows. Perfect for updating user profiles, adjusting scores, or maintaining dynamic data that changes over time.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the result to the sheet Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "legacyElementId": "JS###v1###GoogleSheets###updateRow",
          "methodName": "updateRow",
          "position": {
            "x": 1361,
            "y": 40
          }
        },
        "flowElementId": "0B316E60-F4F1-4A32-A794-5581D3840F25",
        "groupId": null,
        "id": "5486FEA6-D553-4FB3-BE69-22D7D3E9BA29",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New device",
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowData",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "rowData",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Write the result to the sheet', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Row update",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Write the result to the sheet",
        "nextElementIds": [
          "603424CA-8C60-45C5-ADF9-B7C147B9CB01"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1387,
            "y": 219
          }
        },
        "flowElementId": "EE6B9CC3-7F99-465C-AF0F-CEB2925DDD04",
        "groupId": null,
        "id": "603424CA-8C60-45C5-ADF9-B7C147B9CB01",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "b83191ca-b93e-4f65-9fa3-bd44bc6d8878",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Reading",
                      "subPathSegments": [
                        {
                          "key": "hasConfirmed",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "b83191ca-b93e-4f65-9fa3-bd44bc6d8878"
            ]
          },
          "elseComponent": {
            "componentId": "0BDEA080-FC11-4DC2-ABDA-BA0E24FB105C",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Confirmed findings",
          "storeResult": false,
          "thenComponent": {
            "componentId": "21E0591E-88EF-408D-B45C-4CA4D23274B1",
            "componentType": "ELEMENT"
          }
        },
        "name": "Confirmed findings?",
        "nextElementIds": [
          "21E0591E-88EF-408D-B45C-4CA4D23274B1",
          "0BDEA080-FC11-4DC2-ABDA-BA0E24FB105C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 963,
            "y": 349
          }
        },
        "flowElementId": "DBC4129A-74AC-427D-8CEC-D98DD272F985",
        "groupId": null,
        "id": "0BDEA080-FC11-4DC2-ABDA-BA0E24FB105C",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "b6046d9d-07fe-4d1b-a599-dfb73fc2a36c",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Reading",
                      "subPathSegments": [
                        {
                          "key": "needsReview",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "b6046d9d-07fe-4d1b-a599-dfb73fc2a36c"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Needs review",
          "storeResult": false,
          "thenComponent": {
            "componentId": "48439537-FD87-49FB-AE70-87416943CA90",
            "componentType": "ELEMENT"
          }
        },
        "name": "Needs review?",
        "nextElementIds": [
          "48439537-FD87-49FB-AE70-87416943CA90"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Monitors Google Sheets for new rows and triggers AI workflows when data is added. Perfect for automated processing of form submissions, real-time data analysis, or immediate response to user input in collaborative spreadsheets. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "legacyElementId": "JS###v1###GoogleSheets###onNewRow",
          "methodName": "onNewRow",
          "position": {
            "x": 132,
            "y": 40
          }
        },
        "flowElementId": "6319A16E-1E77-4D7B-8641-9077E36ED10A",
        "groupId": null,
        "id": "3540C2F4-513A-437D-8F96-3C1EA4AAD008",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'New device in the inventory', Error: Document is required",
            "valid": false
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewRow",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New device",
          "serviceId": "google-sheets",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New device in the inventory",
        "nextElementIds": [
          "BEE24017-AA4A-459D-97A7-77EBF0CF8F5D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 149,
            "y": 519
          }
        },
        "flowElementId": "F9241092-DB54-4C1F-B487-241781E5B7A9",
        "groupId": null,
        "id": "A0822110-BF86-4E08-A099-2D6BEFAA3F36",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "f74fc99f-5f06-4386-b791-d899fd74bcde",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "OT decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "A3B5BADF-5386-4903-80A1-B1447C34E151"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "hold"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "f74fc99f-5f06-4386-b791-d899fd74bcde"
            ]
          },
          "elseComponent": {
            "componentId": "55B224B3-64EE-40CD-9605-2F962A461320",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Hold",
          "storeResult": false,
          "thenComponent": {
            "componentId": "3A0CADD4-883D-47DF-92C8-6C763A2F5BF7",
            "componentType": "ELEMENT"
          }
        },
        "name": "Hold as accepted risk?",
        "nextElementIds": [
          "3A0CADD4-883D-47DF-92C8-6C763A2F5BF7",
          "55B224B3-64EE-40CD-9605-2F962A461320"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new change request in Freshservice, used to plan and track modifications to IT infrastructure or services. Priority, status, change type, risk, and impact are chosen from fixed lists and sent as Freshservice's numeric codes. Planned start/end dates should be ISO 8601 timestamps.",
          "elementId": "EXTENSION:::SHARED:::default:::freshservice:::createChange",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Open the change request in Freshservice Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::freshservice:::createChange",
          "legacyElementId": "JS###v1###FreshserviceService###createChange",
          "methodName": "createChange",
          "position": {
            "x": 893,
            "y": 510
          }
        },
        "flowElementId": "E1CBC8A9-6E75-4B8A-912E-098D67A4300B",
        "groupId": null,
        "id": "E2B40E2C-FCF4-4BFB-AE67-711183FC67EC",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request text",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "55B224B3-64EE-40CD-9605-2F962A461320"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "description",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request text",
                    "subPathSegments": [
                      {
                        "key": "description",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "55B224B3-64EE-40CD-9605-2F962A461320"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "requesterId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "agentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "groupId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "priority",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request text",
                    "subPathSegments": [
                      {
                        "key": "priority",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "55B224B3-64EE-40CD-9605-2F962A461320"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "status",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "2"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "changeType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "2"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "risk",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request text",
                    "subPathSegments": [
                      {
                        "key": "risk",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "55B224B3-64EE-40CD-9605-2F962A461320"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "impact",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "plannedStartDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "plannedEndDate",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "category",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "customFields",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createChange",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Change request",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "freshservice",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Open the change request in Freshservice",
        "nextElementIds": [
          "2D0A925F-41C7-4DE3-9C26-ABE6650EF6E3"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the change request Result"
          },
          "position": {
            "x": 531,
            "y": 519
          }
        },
        "flowElementId": "1165D0F0-59CF-4D60-BDC8-E20E0B86CBC0",
        "groupId": null,
        "id": "55B224B3-64EE-40CD-9605-2F962A461320",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "decision",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "OT decision",
                    "subPathSegments": [
                      {
                        "key": "decision",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A3B5BADF-5386-4903-80A1-B1447C34E151"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "label",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "label",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "status",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "status",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "topFix",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "topFix",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "targetVersion",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "targetVersion",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "clearsCves",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "clearsCves",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "confirmed",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "confirmed",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "kev",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "kev",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cveLines",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "cveLines",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sourceLines",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "sourceLines",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "needsReview",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "needsReview",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "reason",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "reason",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const windows = { planned_stop: 'next planned stop', shutdown: 'next plant shutdown' };\nconst windowLabel = windows[decision] || `window ${decision}`;\nconst esc = t => String(t == null ? '' : t).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\nconst li = arr => (Array.isArray(arr) ? arr : []).map(x => `<li>${esc(x)}</li>`).join('');\nconst clears = Number(clearsCves) || 0;\nconst kevCount = Number(kev) || 0;\nconst confirmedCount = Number(confirmed) || 0;\nconst subject = `Firmware fix: ${label} (${windowLabel})`;\nconst parts = [\n  `<p>Opened from the BreachSpider device check of ${esc(label)}. The OT engineer chose the window in Slack: ${esc(windowLabel)}.</p>`,\n  `<p><b>Finding:</b> ${esc(status)}.</p>`,\n  `<p><b>Fix plan (BreachSpider):</b> ${esc(topFix || 'no vendor fix on record')}${targetVersion ? `, target version ${esc(targetVersion)}` : ''}${clears ? `, clears ${clears} CVE${clears === 1 ? '' : 's'}` : ''}.</p>`,\n  Array.isArray(cveLines) && cveLines.length ? `<p><b>Confirmed CVEs, fix-first:</b></p><ul>${li(cveLines)}</ul>` : '',\n  Array.isArray(sourceLines) && sourceLines.length ? `<p><b>Sources:</b></p><ul>${li(sourceLines)}</ul>` : '',\n  needsReview === true && reason ? `<p><b>Needs review:</b> ${esc(reason)}.</p>` : '',\n];\nreturn {\n  subject,\n  description: parts.filter(Boolean).join('\\n'),\n  windowLabel,\n  priority: kevCount > 0 ? '3' : (confirmedCount > 0 ? '2' : '1'),\n  risk: kevCount > 0 ? '3' : '2',\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Change request text",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the change request",
        "nextElementIds": [
          "E2B40E2C-FCF4-4BFB-AE67-711183FC67EC"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates existing data in Google Sheets for AI agents to modify records, correct information, or maintain data accuracy in automated workflows. Perfect for updating user profiles, adjusting scores, or maintaining dynamic data that changes over time.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Log the accepted risk in the sheet Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "legacyElementId": "JS###v1###GoogleSheets###updateRow",
          "methodName": "updateRow",
          "position": {
            "x": 918,
            "y": 640
          }
        },
        "flowElementId": "E6E9069C-F283-447D-912B-45B27B82773C",
        "groupId": null,
        "id": "65746158-0BED-4004-ABFB-57A0DF4A3E94",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New device",
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowData",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "{\"Decision\": \"Accepted risk, held by the OT engineer "
                  },
                  {
                    "id": "GET_CURRENT_DATE",
                    "label": null,
                    "type": "GET_CURRENT_DATE_TIME",
                    "value": null
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\"}"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": true,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Log the accepted risk in the sheet', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Hold logged",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Log the accepted risk in the sheet",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the change request in Slack Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1333,
            "y": 510
          }
        },
        "flowElementId": "5888EA07-D885-4D43-9DEC-88C776CA8477",
        "groupId": null,
        "id": "2D0A925F-41C7-4DE3-9C26-ABE6650EF6E3",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Change request #"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request",
                    "subPathSegments": [
                      {
                        "key": "change",
                        "optional": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E2B40E2C-FCF4-4BFB-AE67-711183FC67EC"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " opened in Freshservice for "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "label",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request text",
                    "subPathSegments": [
                      {
                        "key": "windowLabel",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "55B224B3-64EE-40CD-9605-2F962A461320"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". Fix: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Reading",
                    "subPathSegments": [
                      {
                        "key": "topFix",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1650483E-5C8F-4898-82BB-CB896106FAE5"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to OT engineer",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DBF64897-20B9-4904-B05B-6A6F7C4B89EE"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Change confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the change request in Slack",
        "nextElementIds": [
          "2B0B450D-2CB9-4FB3-9C2C-C0E701DEB211"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Checks up to 200 devices (25 on a trial key) against the CVEs that affect their exact version, without storing anything. For each device it returns the catalog product it resolved to and how confident that match is, its CVEs ranked fix-first with the source and the fix behind each, the fix groups, the single upgrade that clears them, and a `result_hash` and `status_hash` to send to Check Devices for Changes later. An empty CVE list is never a clean result on its own: read `needs_review`, `resolution.status` and `warnings` (for example NO_CPE_DATA or PRODUCT_UNRESOLVED). Each device's CVE list is paged (250 per page by default): when `cves_page.has_more` is true, run it again with the next CVE Page.",
          "elementId": "EXTENSION:::SHARED:::default:::breachspider:::checkDevices",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check the device in BreachSpider Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::breachspider:::checkDevices",
          "legacyElementId": null,
          "methodName": "checkDevices",
          "position": {
            "x": 503,
            "y": 40
          }
        },
        "flowElementId": "89126F79-A04A-4187-A3E0-D49CE77DA514",
        "groupId": null,
        "id": "BEE24017-AA4A-459D-97A7-77EBF0CF8F5D",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "assets",
              "type": "COMPLEX_LIST",
              "value": [
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "asset_id",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "RESULT",
                            "label": "New device",
                            "subPathSegments": [
                              {
                                "key": "data",
                                "optional": false
                              },
                              {
                                "key": "Asset",
                                "optional": false
                              }
                            ],
                            "type": "TRIGGER_DATA",
                            "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "vendor",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "RESULT",
                            "label": "New device",
                            "subPathSegments": [
                              {
                                "key": "data",
                                "optional": false
                              },
                              {
                                "key": "Vendor",
                                "optional": false
                              }
                            ],
                            "type": "TRIGGER_DATA",
                            "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "product",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "RESULT",
                            "label": "New device",
                            "subPathSegments": [
                              {
                                "key": "data",
                                "optional": false
                              },
                              {
                                "key": "Product",
                                "optional": false
                              }
                            ],
                            "type": "TRIGGER_DATA",
                            "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "version",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "RESULT",
                            "label": "New device",
                            "subPathSegments": [
                              {
                                "key": "data",
                                "optional": false
                              },
                              {
                                "key": "Firmware",
                                "optional": false
                              }
                            ],
                            "type": "TRIGGER_DATA",
                            "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                }
              ]
            },
            {
              "name": "minConfidence",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sort",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "confirmedOnly",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "knownExploitedOnly",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fixAvailableOnly",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "includeCapec",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cvePage",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cvePageSize",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "checkDevices",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Device check",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "breachspider",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Check the device in BreachSpider",
        "nextElementIds": [
          "1650483E-5C8F-4898-82BB-CB896106FAE5"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the result Result"
          },
          "position": {
            "x": 963,
            "y": 49
          }
        },
        "flowElementId": "9AB29501-2B5B-4FF7-B7EA-6F091C8B0382",
        "groupId": null,
        "id": "1650483E-5C8F-4898-82BB-CB896106FAE5",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "result",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Device check",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BEE24017-AA4A-459D-97A7-77EBF0CF8F5D"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "assetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New device",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Asset",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "vendor",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New device",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Vendor",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "product",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New device",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Product",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "version",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New device",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Firmware",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "checkedAt",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "GET_CURRENT_DATE",
                    "label": null,
                    "type": "GET_CURRENT_DATE_TIME",
                    "value": null
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const r = (result && Array.isArray(result.results) && result.results[0]) || null;\nconst s = n => (n === 1 ? '' : 's');\nconst label = `${vendor || '?'} ${product || '?'} (${assetId || 'no asset ID'}), firmware ${version || 'not given'}`;\nif (!r) {\n  const reason = 'BreachSpider returned no result for this device.';\n  return {\n    status: 'Needs review', hasConfirmed: false, needsReview: true, confirmed: 0, total: 0, kev: 0,\n    topFix: '', targetVersion: '', clearsCves: 0, resolvedProduct: '', confidence: '', reason, label, cveLines: [], sourceLines: [],\n    reviewMessage: `*${label} needs review in BreachSpider*\\n${reason}\\nThe inventory row says Needs review, not clean.`,\n    rowData: { Status: 'Needs review', CVEs: '', Confirmed: '', Exploited: '', Fix: '', ResultHash: '', StatusHash: '', StatusFacts: '', Checked: checkedAt },\n  };\n}\nconst warnings = (r.warnings || []).map(w => (typeof w === 'string' ? w : (w && (w.code || w.message)) || JSON.stringify(w)));\nconst resolution = r.resolution || {};\nconst resolved = resolution.status === 'resolved';\nconst needsReview = r.needs_review === true || !resolved || warnings.length > 0;\nconst cves = Array.isArray(r.cves) ? r.cves : [];\nconst total = r.cves_page && typeof r.cves_page.total === 'number' ? r.cves_page.total : cves.length;\nconst confirmedCves = cves.filter(c => c.applicability === 'CONFIRMED_AFFECTED');\nconst confirmed = confirmedCves.length;\nconst kevFromCves = cves.filter(c => c.exploitation && c.exploitation.kev_flagged).length;\nconst kevFromFacts = r.status_facts && Array.isArray(r.status_facts.known_exploited) ? r.status_facts.known_exploited.length : 0;\nconst kev = Math.max(kevFromCves, kevFromFacts);\nconst plan = r.fix_plan || {};\nconst allFix = plan.to_clear_all_fixable || null;\nconst kevFix = plan.to_clear_known_exploited || null;\nconst firstGroup = Array.isArray(r.fix_groups) && r.fix_groups[0] ? r.fix_groups[0] : null;\nconst topFix = (allFix && allFix.fix) || (kevFix && kevFix.fix) || (firstGroup && firstGroup.fix) || '';\nconst clearsCves = allFix && allFix.clears ? (allFix.clears.cves || 0) : (firstGroup && firstGroup.counts ? (firstGroup.counts.total || 0) : 0);\nconst targetVersion = allFix && allFix.target ? (allFix.target.version || '') : '';\nconst resolvedProduct = resolution.product && resolution.product.name\n  ? `${resolution.vendor && resolution.vendor.name ? resolution.vendor.name + ' ' : ''}${resolution.product.name}`\n  : '';\nconst confidence = resolution.confidence_band\n  ? `${String(resolution.confidence_band).toLowerCase()} confidence${typeof resolution.confidence === 'number' ? ' (' + resolution.confidence + ')' : ''}`\n  : '';\nconst reasons = [];\nif (!resolved) reasons.push(`BreachSpider could not resolve the product (${resolution.status || 'no status'})`);\nif (r.needs_review === true && resolved) reasons.push('BreachSpider flagged the match for review');\nif (warnings.length) reasons.push(`warnings: ${warnings.join(', ')}`);\nconst candidates = Array.isArray(r.candidates)\n  ? r.candidates.map(c => (c && (c.name || (c.product && c.product.name))) || '').filter(Boolean)\n  : [];\nif (candidates.length) reasons.push(`possible products: ${candidates.slice(0, 5).join(', ')}`);\nconst reason = reasons.join('; ');\nconst hasConfirmed = confirmed > 0;\nlet status;\nif (hasConfirmed) status = `${confirmed} confirmed CVE${s(confirmed)}${kev ? `, ${kev} known-exploited` : ''}${needsReview ? ', needs review' : ''}`;\nelse if (needsReview) status = 'Needs review';\nelse if (total > 0) status = `${total} product-level CVE${s(total)}, none confirmed for ${version || 'this version'}`;\nelse status = `No CVEs matched firmware ${version || 'given'}`;\nconst score = c => (c.scoring && c.scoring.cvss && typeof c.scoring.cvss.score === 'number' ? c.scoring.cvss.score : '?');\nconst rank = c => (typeof c.priority_rank === 'number' ? c.priority_rank : 999);\nconst topCves = confirmedCves.slice().sort((a, b) => rank(a) - rank(b)).slice(0, 5);\nconst cveLines = topCves.map(c => `${c.cve_id}: rank ${rank(c) === 999 ? '?' : rank(c)}, CVSS ${score(c)}${c.exploitation && c.exploitation.kev_flagged ? ', known-exploited' : ''}${c.priority_reason ? '. ' + c.priority_reason : ''}`);\nconst sourceLines = [];\nfor (const c of topCves) {\n  const refs = c.references || {};\n  const url = (refs.cisa_ics_advisories && refs.cisa_ics_advisories[0] && refs.cisa_ics_advisories[0].url)\n    || (refs.vendor_advisories && refs.vendor_advisories[0] && refs.vendor_advisories[0].url)\n    || refs.breachspider_url || refs.nvd_url;\n  if (url) sourceLines.push(`${c.cve_id}: ${url}`);\n  if (c.fix && c.fix.document) sourceLines.push(`${c.cve_id} fix: ${c.fix.document}${c.fix.source ? ' (' + c.fix.source + ')' : ''}`);\n}\nconst reviewMessage = `*${label} needs review in BreachSpider*\\n${reason || 'The match could not be confirmed.'}${resolvedProduct ? `\\nClosest match: ${resolvedProduct}${confidence ? ', ' + confidence : ''}.` : ''}\\nThe inventory row says Needs review, not clean.`;\nreturn {\n  status, hasConfirmed, needsReview, confirmed, total, kev, topFix, targetVersion, clearsCves, resolvedProduct, confidence, reason, label, cveLines, sourceLines, reviewMessage,\n  rowData: {\n    Status: status, CVEs: total, Confirmed: confirmed, Exploited: kev, Fix: topFix,\n    ResultHash: r.result_hash || '', StatusHash: r.status_hash || '',\n    StatusFacts: r.status_facts ? JSON.stringify(r.status_facts) : '', Checked: checkedAt,\n  },\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Read the result",
        "nextElementIds": [
          "5486FEA6-D553-4FB3-BE69-22D7D3E9BA29"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates existing data in Google Sheets for AI agents to modify records, correct information, or maintain data accuracy in automated workflows. Perfect for updating user profiles, adjusting scores, or maintaining dynamic data that changes over time.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Log the change request in the sheet Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::updateRow",
          "legacyElementId": "JS###v1###GoogleSheets###updateRow",
          "methodName": "updateRow",
          "position": {
            "x": 1334,
            "y": 810
          }
        },
        "flowElementId": "50CA1FA0-B086-4D57-A2A8-03918B4C7628",
        "groupId": null,
        "id": "2B0B450D-2CB9-4FB3-9C2C-C0E701DEB211",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowNumber",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New device",
                    "subPathSegments": [
                      {
                        "key": "rowNumber",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "3540C2F4-513A-437D-8F96-3C1EA4AAD008"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "rowData",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "{\"Decision\": \"Freshservice change #"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request",
                    "subPathSegments": [
                      {
                        "key": "change",
                        "optional": false
                      },
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "E2B40E2C-FCF4-4BFB-AE67-711183FC67EC"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ", "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Change request text",
                    "subPathSegments": [
                      {
                        "key": "windowLabel",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "55B224B3-64EE-40CD-9605-2F962A461320"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\"}"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": true,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Log the change request in the sheet', Error: Document is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Change logged",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Log the change request in the sheet",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "3540C2F4-513A-437D-8F96-3C1EA4AAD008",
    "groups": [],
    "id": "F98EB5F0-2063-4EB2-8511-527BD02DD9C5",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
      "executionStaticData": [
        {
          "description": "The URL of the block Wait for the OT engineer's answer (open the block in the editor and copy its callback URL). The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-12-02T08:43:57.725Z"
}
