diff --git a/Meraki/CheckAvailableFirmwareForNetwork__definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF/definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.json b/Meraki/CheckAvailableFirmwareForNetwork__definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF/definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.json index e2ae2b6..447b066 100644 --- a/Meraki/CheckAvailableFirmwareForNetwork__definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF/definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.json +++ b/Meraki/CheckAvailableFirmwareForNetwork__definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF/definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.json @@ -6,6 +6,38 @@ "type": "generic.workflow", "base_type": "workflow", "variables": [ + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Result", + "type": "datatype.string", + "description": "Comprehensive summary report containing current firmware versions and available upgrades for all device types (Appliance, Switch, Wireless) in a human-readable format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Appliance Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Security Appliances (MX): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02PYYLS61FZLF0ryAp4sqcDyP4E8mhuheHl", + "object_type": "variable_workflow" + }, { "schema_id": "datatype.string", "properties": { @@ -13,6 +45,7 @@ "scope": "output", "name": "Output - Appliance - Available Firmware Versions", "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Security Appliances (MX) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", "is_required": false, "display_on_wizard": false, "is_invisible": false, @@ -21,19 +54,36 @@ "unique_name": "variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q", "object_type": "variable_workflow" }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Wireless Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Wireless Access Points (MR): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M3N4E7F0NST1AHjKl5MoQpR3UvW4xY5zA", + "object_type": "variable_workflow" + }, { "schema_id": "datatype.string", "properties": { "value": "", "scope": "output", - "name": "Output - Result", + "name": "Output - Wireless - Available Firmware Versions", "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Wireless Access Points (MR) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", "is_required": false, "display_on_wizard": false, "is_invisible": false, - "variable_string_format": "text" + "variable_string_format": "json" }, - "unique_name": "variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR", + "unique_name": "variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz", "object_type": "variable_workflow" }, { @@ -41,14 +91,15 @@ "properties": { "value": "", "scope": "output", - "name": "Ouput - Wireless - Available Firmware Versions", + "name": "Output - Switch - Available Firmware Versions", "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Switches (MS) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "json" }, - "unique_name": "variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz", + "unique_name": "variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf", "object_type": "variable_workflow" }, { @@ -56,14 +107,15 @@ "properties": { "value": "", "scope": "output", - "name": "Ouput - Switch - Current Version", + "name": "Error Message", "type": "datatype.string", + "description": "Detailed error information when workflow fails. Empty for successful executions, contains specific error details for troubleshooting failures.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ", + "unique_name": "variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl", "object_type": "variable_workflow" }, { @@ -73,6 +125,7 @@ "scope": "input", "name": "Input - Network Name", "type": "datatype.string", + "description": "The name of the Meraki network to check for firmware updates. Must be an exact match for an existing network within the specified organization.", "is_required": true, "display_on_wizard": false, "is_invisible": false, @@ -86,14 +139,15 @@ "properties": { "value": "", "scope": "output", - "name": "Output - Wireless - Current Version", + "name": "Output - Appliance - Current Version", "type": "datatype.string", + "description": "The current firmware version running on Meraki Security Appliances (MX) in the network, displayed as 'ShortName (ID: VersionID)' format.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ", + "unique_name": "variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY", "object_type": "variable_workflow" }, { @@ -103,6 +157,7 @@ "scope": "local", "name": "Organization ID", "type": "datatype.string", + "description": "Internal variable to store the resolved Meraki organization ID, determined from either the organization name lookup or direct ID input.", "is_required": false, "display_on_wizard": false, "is_invisible": false, @@ -111,6 +166,54 @@ "unique_name": "variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2", "object_type": "variable_workflow" }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Wireless - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Wireless Access Points (MR) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Switch - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Switches (MS) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.integer", + "properties": { + "value": 0, + "scope": "output", + "name": "Status Code", + "type": "datatype.integer", + "description": "HTTP status code or workflow completion status. Returns 200 for success, 4xx/5xx for various error conditions.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG", + "object_type": "variable_workflow" + }, { "schema_id": "datatype.string", "properties": { @@ -128,18 +231,19 @@ "object_type": "variable_workflow" }, { - "schema_id": "datatype.string", + "schema_id": "datatype.boolean", "properties": { - "value": "", + "value": false, "scope": "output", - "name": "Ouput - Switch - Available Firmware Versions", - "type": "datatype.string", + "name": "Switch Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Switches (MS): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", "is_required": false, "display_on_wizard": false, "is_invisible": false, - "variable_string_format": "json" + "variable_string_format": "" }, - "unique_name": "variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf", + "unique_name": "variable_workflow_02M3N3D6E9MRS0zGiJk4LnOpQ2TuV3wX4yZ", "object_type": "variable_workflow" }, { @@ -147,14 +251,15 @@ "properties": { "value": "", "scope": "output", - "name": "Output - Appliance - Current Version", + "name": "Status Message", "type": "datatype.string", + "description": "Brief status description of workflow execution result. 'Success' for successful completion or error summary for failures.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY", + "unique_name": "variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7", "object_type": "variable_workflow" } ], @@ -166,7 +271,7 @@ "type": [] }, "delete_workflow_instance": false, - "description": "This workflow allows users to check for available firmware updates for their network devices. It provides information about the current firmware running and available firmware you can upgrade. \nThe workflow currently provides firmware guidance for Appliance, Switch, Wireless devices in the network. ", + "description": "Checks available firmware updates for Meraki network devices including Security Appliances (MX), Switches (MS), and Wireless Access Points (MR). Accepts organization name or ID, locates the specified network, and returns current firmware versions along with available upgrades for each device type in both individual outputs and a consolidated summary format.", "display_name": "Check Available Firmware for Network", "runtime_user": { "target_default": true @@ -186,7 +291,7 @@ "base_type": "activity", "properties": { "continue_on_failure": false, - "description": "Identify the Organization either by Name or ID.", + "description": "Handles input flexibility by accepting either organization name or ID. Uses conditional logic to determine input type and set the organization ID for subsequent steps.", "display_as_suggestion": false, "display_name": "Find Organization by ID or Name", "skip_execution": false @@ -195,14 +300,14 @@ "actions": [ { "unique_name": "definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg", - "name": "Get Organization By Name", - "title": "Get Organization By Name", + "name": "Get Organization By Name or ID", + "title": "Get Organization By Name or ID", "type": "workflow.sub_workflow", "base_type": "subworkflow", "properties": { - "continue_on_failure": false, - "description": "Lookup the Organization for the input Name.", - "display_name": "Get Organization By Name", + "continue_on_failure": true, + "description": "Lookup the Organization by Name or ID", + "display_name": "Get Organization By Name or ID", "input": { "variable_workflow_02M605GTHU5L72i8goD4nuYixYOvQEFV7rN": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw$", "variable_workflow_02M605GTI1LUG737lDLyzxnE9jwENJNQ08W": false @@ -216,20 +321,21 @@ "use_workflow_target": true }, "workflow_id": "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", - "workflow_name": "Meraki - Get Organization By Name" + "workflow_name": "Meraki - Get Organization By Name or ID" }, "object_type": "definition_activity" }, { "unique_name": "definition_activity_02M6GWLTHB0QQ2tHfY1ZO36K4S9uzgqt7gD", "name": "Condition Block", - "title": "Was Input Org Name?", + "title": "Was the Request Successful?", "type": "logic.if_else", "base_type": "activity", "properties": { "conditions": [], "continue_on_failure": false, - "display_name": "Was Input Org Name?", + "description": "Routes logic based on lookup success to set organization ID from either lookup result or original input.", + "display_name": "Was the Request Successful?", "skip_execution": false }, "object_type": "definition_activity", @@ -247,6 +353,7 @@ "right_operand": 200 }, "continue_on_failure": false, + "description": "HTTP 200 indicates successful name lookup - use returned organization ID.", "display_name": "Yes, Set ID from Get", "skip_execution": false }, @@ -260,6 +367,7 @@ "base_type": "activity", "properties": { "continue_on_failure": false, + "description": "Use organization ID from lookup result.", "display_name": "Set Local Org ID", "skip_execution": false, "variables_to_update": [ @@ -276,7 +384,7 @@ { "unique_name": "definition_activity_02M6H2KH6P4Q56cig9mkjsWMHaANAfb03Z8", "name": "Condition Branch", - "title": "No, Set ID from Input", + "title": "No, Org Match", "type": "logic.condition_block", "base_type": "activity", "properties": { @@ -286,27 +394,25 @@ "right_operand": 200 }, "continue_on_failure": false, - "display_name": "No, Set ID from Input", + "description": "Non-200 response indicates input was likely already an organization ID - use original input.", + "display_name": "No, Org Match", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02M6H2LYL9JDM1hNqkdynS5BTrc5sKm6G8G", - "name": "Set Variables", - "title": "Set Local Org ID", - "type": "core.set_multiple_variables", + "unique_name": "definition_activity_02Q1UNZE489PT5GCm8gQpGtyfoTzenSEocF", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", "base_type": "activity", "properties": { + "completion_type": "failed-completed", "continue_on_failure": false, - "display_name": "Set Local Org ID", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.local.variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2$", - "variable_value_new": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw$" - } - ] + "description": "Completed action", + "display_name": "Completed", + "result_message": "No Organization Match.", + "skip_execution": false }, "object_type": "definition_activity" } @@ -324,7 +430,7 @@ "base_type": "activity", "properties": { "continue_on_failure": false, - "description": "Lookup the Network for the Name provide in the input.", + "description": "Locates the target network within the organization using the provided network name.", "display_as_suggestion": false, "display_name": "Find Network By Name", "skip_execution": false @@ -338,7 +444,8 @@ "type": "workflow.sub_workflow", "base_type": "subworkflow", "properties": { - "continue_on_failure": false, + "continue_on_failure": true, + "description": "Finds network by name within the organization and returns network ID for firmware queries.", "display_name": "Get Network By Name", "input": { "variable_workflow_02LCRACABYWD40LVa27k00YndGuostARjdp": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.local.variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2$", @@ -357,224 +464,543 @@ "workflow_name": "Meraki - Get Network By Name" }, "object_type": "definition_activity" - } - ] - }, - { - "unique_name": "definition_activity_02PEOH4UMTQ7T1GVwglfqrY6D6A5FZRlOop", - "name": "Group", - "title": "Find Firmware for Network", - "type": "logic.group", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "description": "Lookup Firmware versions for the input Network. Format the output in a human presentable output.", - "display_as_suggestion": false, - "display_name": "Find Firmware for Network", - "skip_execution": false - }, - "object_type": "definition_activity", - "actions": [ - { - "unique_name": "definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt", - "name": "Get Network Firmware Upgrades", - "title": "Get Network Firmware Upgrades", - "type": "workflow.atomic_workflow", - "base_type": "subworkflow", - "properties": { - "continue_on_failure": false, - "display_name": "Get Network Firmware Upgrades", - "input": { - "variable_workflow_02LV1H3CNM5T45adfzDFwEeMjrKbmdHd58D": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$" - }, - "runtime_user": { - "target_default": true - }, - "skip_execution": false, - "target": { - "target_type": "meraki.endpoint", - "use_workflow_target": true - }, - "workflow_id": "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6", - "workflow_name": "Meraki - Get Network Firmware Upgrades" - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p", - "name": "JSONPath Query", - "title": "Parse Output", - "type": "corejava.jsonpathquery", - "base_type": "activity", - "properties": { - "action_timeout": 180, - "continue_on_failure": false, - "display_name": "Parse Output", - "input_json": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNMB7K2eIEUcLniuSFXAmkGIOQJ2$", - "jsonpath_queries": [ - { - "jsonpath_query": ".products.appliance.currentVersion.id", - "jsonpath_query_name": "applianceCurrVersionId", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.appliance.currentVersion.shortName", - "jsonpath_query_name": "applianceCurrVersionShortName", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.appliance", - "jsonpath_query_name": "applianceDetails", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.switch.currentVersion.id", - "jsonpath_query_name": "switchCurrVersionId", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.switch.currentVersion.shortName", - "jsonpath_query_name": "switchCurrVersionShortName", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.switch", - "jsonpath_query_name": "switchDetails", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.wireless.currentVersion.id", - "jsonpath_query_name": "wirelessCurrVersionId", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.wireless.currentVersion.shortName", - "jsonpath_query_name": "wirelessCurrVersionShortName", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - }, - { - "jsonpath_query": ".products.wireless", - "jsonpath_query_name": "wirelessDetails", - "jsonpath_query_type": "string", - "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" - } - ], - "skip_execution": false, - "skip_path": false - }, - "object_type": "definition_activity" }, { - "unique_name": "definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P", - "name": "Execute Python Script", - "title": "Identify Available Versions", - "type": "python3.script", + "unique_name": "definition_activity_02PYK5VPXEWSO5RSV0KinD05aQCclZv5BRH", + "name": "Condition Block", + "title": "Is Network Found?", + "type": "logic.if_else", "base_type": "activity", "properties": { - "action_timeout": 180, + "conditions": [], "continue_on_failure": false, - "description": "This checks if the current version is already the latest. \nThis is done by removing the current version from the list of available versions list. This will leave it as [] or with additional versions.\n", - "display_name": "Identify Available Versions", - "script": "import sys\nimport json\n\n####################\n# This section establishes some inputs and local variables we need for later\n####################\n\n# Note when you have one item as input you need extra comma - its not a mistake\n(mxDetails,msDetails,mrDetails) = sys.argv[1:4]\n\ndef remove_current_version_and_attributes(json_data):\n \"\"\"\n Removes the current version from the list of available versions and\n excludes 'releaseDate' and 'firmware' attributes from the output JSON.\n\n Parameters:\n json_data (str): The JSON data as a string.\n\n Returns:\n str: The updated JSON data as a string.\n \"\"\"\n # Parse the JSON string into a Python dictionary\n data = json.loads(json_data)\n\n # Find the current version ID\n current_version_id = data['currentVersion']['id']\n\n # Original JSON string\n empty_json_string = '{ \"availableVersions\": [] }'\n\n # Remove the current version and filter out specific attributes\n data['availableVersions'] = [\n # iterate over each element in available version and remove extra elements\n {key: version[key] for key in version if key not in ['releaseDate', 'firmware']}\n for version in data['availableVersions']\n if version['id'] != current_version_id\n ]\n\n # remove from final JSON\n del data['currentVersion']\n del data['lastUpgrade']\n del data['nextUpgrade']\n del data['participateInNextBetaRelease']\n\n # Check if 'availableVersions' is an empty list\n if not data['availableVersions']:\n data = \"Running the latest firmware.\"\n else:\n # Keep the original data if not empty\n # Return the updated JSON data as a string\n data = json.dumps(data, indent=4)\n\n \n return data\n\nappliance_available_versions_json = remove_current_version_and_attributes(mxDetails)\nswitch_available_versions_json = remove_current_version_and_attributes(msDetails)\nwireless_available_versions_json = remove_current_version_and_attributes(mrDetails)\n", - "script_arguments": [ - "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceDetails$", - "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchDetails$", - "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessDetails$" - ], - "script_queries": [ - { - "script_query": "appliance_available_versions_json", - "script_query_name": "appliance_available_versions_json", - "script_query_type": "string" - }, - { - "script_query": "switch_available_versions_json", - "script_query_name": "switch_available_versions_json", - "script_query_type": "string" - }, - { - "script_query": "wireless_available_versions_json", - "script_query_name": "wireless_available_versions_json", - "script_query_type": "string" - } - ], + "description": "Validates that the network was successfully found before proceeding with firmware queries.", + "display_name": "Is Network Found?", "skip_execution": false }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02M3KCC16KVL679xGr1IX2USKsfHp7EFzVx", - "name": "Set Variables", - "title": "Set Variables", - "type": "core.set_multiple_variables", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "display_name": "Set Variables", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", - "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionId$)" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$", - "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.appliance_available_versions_json$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", - "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionShortName$ (ID: $activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionId$)" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$", - "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.switch_available_versions_json$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", - "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionId$)" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$", - "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.wireless_available_versions_json$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", - "variable_value_new": "Appliance Current Version:\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$\nAppliance Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$\n----------------------------------------------------------\nSwitch Current Version:\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$\nSwitch Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$\n----------------------------------------------------------\nWireless Current Version:\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$\nWireless Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$\n----------------------------------------------------------" + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYLIFDS10246F4non6pLnBPBeKn6M4Hvs", + "name": "Condition Branch", + "title": "Network Found", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCS9H7YNIYX1GDaReaAe3aek2b4CnpPEW$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Network lookup successful", + "display_name": "Network Found", + "skip_execution": false }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", - "variable_value_new": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PEOH4UMTQ7T1GVwglfqrY6D6A5FZRlOop", + "name": "Group", + "title": "Find Firmware for Network", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Retrieves firmware data, processes to remove current versions from upgrade lists, and formats output for all device types.", + "display_as_suggestion": false, + "display_name": "Find Firmware for Network", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt", + "name": "Get Network Firmware Upgrades", + "title": "Get Network Firmware Upgrades", + "type": "workflow.atomic_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Retrieves raw firmware upgrade data for the network using Meraki atomic.", + "display_name": "Get Network Firmware Upgrades", + "input": { + "variable_workflow_02LV1H3CNM5T45adfzDFwEeMjrKbmdHd58D": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6", + "workflow_name": "Meraki - Get Network Firmware Upgrades" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PYK5VVYSATE4J6abUrIud4Cbm26oCiwHX", + "name": "Condition Block", + "title": "Validate Firmware Data Retrieved", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validates that firmware data was successfully retrieved before proceeding with processing.", + "display_name": "Validate Firmware Data Retrieved", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYLK1OLP6721UsBBwfRaGOF1PjvaI27T9", + "name": "Condition Branch", + "title": "Success", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Firmware data retrieval failed - set error outputs and terminate workflow.", + "display_name": "Success", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p", + "name": "JSONPath Query", + "title": "Parse Output", + "type": "corejava.jsonpathquery", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": true, + "description": "Parses firmware data using JSONPath to extract version details for each device type. Continues on failure to handle missing device types gracefully.", + "display_name": "Parse Output", + "input_json": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNMB7K2eIEUcLniuSFXAmkGIOQJ2$", + "jsonpath_queries": [ + { + "jsonpath_query": ".products.appliance.currentVersion.id", + "jsonpath_query_name": "applianceCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.appliance.currentVersion.shortName", + "jsonpath_query_name": "applianceCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.appliance", + "jsonpath_query_name": "applianceDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch.currentVersion.id", + "jsonpath_query_name": "switchCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch.currentVersion.shortName", + "jsonpath_query_name": "switchCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch", + "jsonpath_query_name": "switchDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless.currentVersion.id", + "jsonpath_query_name": "wirelessCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless.currentVersion.shortName", + "jsonpath_query_name": "wirelessCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless", + "jsonpath_query_name": "wirelessDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + } + ], + "skip_execution": false, + "skip_path": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PYK5W0XEWSO5RSV0KinD05aQCclZv5BRH", + "name": "Condition Block", + "title": "Validate JSONPath Results", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validates JSONPath parsing results and handles any failures by providing default values for missing device types.", + "display_name": "Validate JSONPath Results", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYK5W1JMDSF5ESkvsZQVY94LjCs3jQbHu", + "name": "Condition Branch", + "title": "JSONPath Failed", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.succeeded$", + "operator": "eq", + "right_operand": false + }, + "continue_on_failure": false, + "description": "JSONPath parsing failed - set default empty values for all device types.", + "display_name": "JSONPath Failed", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5W2JACY04QBD6lQGzESHLHYeadvaZe", + "name": "Set Variables", + "title": "Set Default Values", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set default empty values for failed JSONPath parsing.", + "display_name": "Set Default Values", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "variable_value_new": "Network firmware check completed with limited device types available." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Network firmware check completed with limited device types available." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Failed" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q0VAR7Z9KPL1nIoC9KGwuyxoY8x5BFfnt", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Completed action", + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P", + "name": "Execute Python Script", + "title": "Identify Available Versions", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Processes firmware data to remove current versions from available upgrade lists and filter unnecessary attributes.", + "display_name": "Identify Available Versions", + "script": "import sys\nimport json\n\n####################\n# This section establishes some inputs and local variables we need for later\n####################\n\n# Note when you have one item as input you need extra comma - it's not a mistake\n(mxDetails,msDetails,mrDetails) = sys.argv[1:4]\n\ndef remove_current_version_and_attributes(json_data):\n \"\"\"\n Removes the current version from the list of available versions and\n excludes 'releaseDate' and 'firmware' attributes from the output JSON.\n Handles missing/empty device types gracefully.\n\n Parameters:\n json_data (str): The JSON data as a string.\n\n Returns:\n tuple: (updated_json_str, no_available_versions_flag)\n - updated_json_str: The updated JSON data as a string or appropriate message for missing devices\n - no_available_versions_flag: Boolean indicating if current version is the only available version\n \"\"\"\n # Handle null, empty, or invalid inputs\n if not json_data or json_data == 'null' or json_data.strip() == '' or json_data == 'None':\n return \"No devices of this type found in the network.\", False\n \n try:\n # Parse the JSON string into a Python dictionary\n data = json.loads(json_data)\n \n # Handle empty or null parsed data\n if not data or data is None:\n return \"No devices of this type found in the network.\", False\n \n # Check if required keys exist\n if 'currentVersion' not in data or not data['currentVersion']:\n return \"No current version information available for this device type.\", False\n \n if 'id' not in data['currentVersion']:\n return \"Invalid current version data for this device type.\", False\n \n # Find the current version ID\n current_version_id = data['currentVersion']['id']\n \n # Handle missing availableVersions key\n if 'availableVersions' not in data:\n data['availableVersions'] = []\n \n # Check if current version is the only available version\n available_version_ids = [version.get('id') for version in data['availableVersions'] if version.get('id')]\n no_available_versions = len(available_version_ids) == 1 and current_version_id in available_version_ids\n \n # Remove the current version and filter out specific attributes\n data['availableVersions'] = [\n # iterate over each element in available versions and remove extra elements\n {key: version[key] for key in version if key not in ['releaseDate', 'firmware']}\n for version in data['availableVersions']\n if version.get('id') != current_version_id\n ]\n \n # Remove from final JSON (safely handle missing keys)\n data.pop('currentVersion', None)\n data.pop('lastUpgrade', None)\n data.pop('nextUpgrade', None)\n data.pop('isUpgradeAvailable', None)\n data.pop('participateInNextBetaRelease', None)\n \n # Check if 'availableVersions' is an empty list\n if not data['availableVersions']:\n return \"Running the latest firmware.\", no_available_versions\n else:\n # Keep the original data if not empty\n # Return the updated JSON data as a string\n return json.dumps(data, indent=4), no_available_versions\n \n except json.JSONDecodeError:\n return \"Invalid JSON data for this device type.\", False\n except KeyError as e:\n return f\"Missing required data field: {str(e)}\", False\n except Exception as e:\n return f\"Error processing device data: {str(e)}\", False\n\n# Process each device type and capture both JSON and boolean results\napplianceResult, applianceNoVersions = remove_current_version_and_attributes(mxDetails)\nswitchResult, switchNoVersions = remove_current_version_and_attributes(msDetails)\nwirelessResult, wirelessNoVersions = remove_current_version_and_attributes(mrDetails)\n\n# Set the JSON results for backward compatibility\napplianceAvailableVersionsJson = applianceResult\nswitchAvailableVersionsJson = switchResult\nwirelessAvailableVersionsJson = wirelessResult\n\n# Set individual boolean flags for each product type (using positive logic)\n# True = upgrades available, False = no upgrades available\napplianceHasUpgradeAvailable = not applianceNoVersions\nswitchHasUpgradeAvailable = not switchNoVersions\nwirelessHasUpgradeAvailable = not wirelessNoVersions\n", + "script_arguments": [ + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceDetails$", + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchDetails$", + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessDetails$" + ], + "script_queries": [ + { + "script_query": "applianceAvailableVersionsJson", + "script_query_name": "applianceAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "switchAvailableVersionsJson", + "script_query_name": "switchAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "wirelessAvailableVersionsJson", + "script_query_name": "wirelessAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "applianceHasUpgradeAvailable", + "script_query_name": "applianceHasUpgradeAvailable", + "script_query_type": "boolean" + }, + { + "script_query": "switchHasUpgradeAvailable", + "script_query_name": "switchHasUpgradeAvailable", + "script_query_type": "boolean" + }, + { + "script_query": "wirelessHasUpgradeAvailable", + "script_query_name": "wirelessHasUpgradeAvailable", + "script_query_type": "boolean" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M3KCC16KVL679xGr1IX2USKsfHp7EFzVx", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Sets output variables with processed firmware information and summary results.", + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.applianceAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionShortName$ (ID: $activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.switchAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.wirelessAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "variable_value_new": "Appliance Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$\nAppliance Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$\n------------------------------------\nSwitch Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$\nSwitch Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$\n------------------------------------\nWireless Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$\nWireless Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$\n------------------------------------" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 200 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Success" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYYLS61FZLF0ryAp4sqcDyP4E8mhuheHl$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.applianceHasUpgradeAvailable$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3N3D6E9MRS0zGiJk4LnOpQ2TuV3wX4yZ$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.switchHasUpgradeAvailable$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3N4E7F0NST1AHjKl5MoQpR3UvW4xY5zA$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.wirelessHasUpgradeAvailable$" + } + ] + }, + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02PYK5VWKXWO03SwInni34FV61tFGMogA14", + "name": "Condition Branch", + "title": "Firmware Data Failed", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Firmware data retrieval failed - set error outputs and terminate workflow.", + "display_name": "Firmware Data Failed", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5VXKM0224WPCi8cJLvdfvalA1JFJt9", + "name": "Set Variables", + "title": "Set Firmware Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error outputs for firmware data retrieval failure.", + "display_name": "Set Firmware Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Firmware Data Retrieval Failed" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl$", + "variable_value_new": "Failed to retrieve firmware data for network. Error: $activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNMB7K7L2YWKcivCpvRDwhECTDqR$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Failed: Firmware data retrieval error" + } + ] + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02PYK5VQJMDSF5ESkvsZQVY94LjCs3jQbHu", + "name": "Condition Branch", + "title": "Network Not Found", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCS9H7YNIYX1GDaReaAe3aek2b4CnpPEW$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Network lookup failed - set error outputs and terminate workflow.", + "display_name": "Network Not Found", + "skip_execution": false }, - { - "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results_code$", - "variable_value_new": "completed-successfully" - } - ] - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02M5IUAEXDRF634rK6auQF21q7gwlVpMT1B", - "name": "Completed", - "title": "Completed", - "type": "logic.completed", - "base_type": "activity", - "properties": { - "completion_type": "succeeded", - "continue_on_failure": false, - "display_name": "Completed", - "result_message": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", - "skip_execution": false - }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5VRJACY04QBD6lQGzESHLHYeadvaZe", + "name": "Set Variables", + "title": "Set Network Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error outputs for network not found.", + "display_name": "Set Network Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 404 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Network Not Found" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl$", + "variable_value_new": "Network '$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq$' not found in organization. Error details: $activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCSAES32AOH7RGaVHj5aM3SixcS34Qdqc$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Failed: Network not found" + } + ] + }, + "object_type": "definition_activity" + } + ] + } + ] } ] } diff --git a/Meraki/ScheduleFirmwareUpgradeForNetwork__definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M/definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.json b/Meraki/ScheduleFirmwareUpgradeForNetwork__definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M/definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.json index f43fcf2..8618dc4 100644 --- a/Meraki/ScheduleFirmwareUpgradeForNetwork__definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M/definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.json +++ b/Meraki/ScheduleFirmwareUpgradeForNetwork__definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M/definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.json @@ -10,78 +10,95 @@ "schema_id": "datatype.string", "properties": { "value": "", - "scope": "output", - "name": "Output - Result", + "scope": "input", + "name": "Switch Version ID to Upgrade", "type": "datatype.string", - "description": "Raw API response.", + "description": "Specific firmware version ID for Meraki Switch (MS) devices to upgrade to. This must be a valid version ID available for the switches in your network. Use the 'Check Available Firmware for Network' workflow to identify compatible version IDs. Leave empty to use the latest available firmware version. Example: 4758 for MS firmware v15.21.1.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr", + "unique_name": "variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { "value": "", - "scope": "input", - "name": "Input - Network Name", + "scope": "output", + "name": "Result", "type": "datatype.string", - "is_required": true, + "description": "Complete JSON response from the Meraki Dashboard API containing detailed firmware upgrade scheduling results. Includes upgrade confirmation details, scheduled times, affected devices, and any warnings or additional information returned by the API for troubleshooting and audit purposes.", + "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ", + "unique_name": "variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { "value": "", - "scope": "local", - "name": "Local Organization ID", + "scope": "input", + "name": "Wireless Version ID to Upgrade", "type": "datatype.string", + "description": "Specific firmware version ID for Meraki Wireless Access Points (MR) devices to upgrade to. This must be a valid version ID available for the wireless devices in your network. Use the 'Check Available Firmware for Network' workflow to identify compatible version IDs. Leave empty to use the latest available firmware version. Example: 4952 for MR firmware v29.7.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT", + "unique_name": "variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { "value": "", - "scope": "output", - "name": "Output - Status Message", + "scope": "input", + "name": "Appliance Version ID to Upgrade", "type": "datatype.string", - "description": "The HTTP status message of the API response.", + "description": "Specific firmware version ID for Meraki Security Appliance (MX) devices to upgrade to. This must be a valid version ID available for the appliances in your network. Use the 'Check Available Firmware for Network' workflow to identify compatible version IDs. Leave empty to use the latest available firmware version. Example: 4727 for MX firmware v18.107.2.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV", + "unique_name": "variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.integer", + "properties": { + "value": 0, + "scope": "output", + "name": "Status Code", + "type": "datatype.integer", + "description": "HTTP status code indicating the firmware upgrade scheduling operation result. Returns 200 for successful scheduling, 404 for network/organization not found, 400 for invalid parameters, and other standard HTTP codes for various error conditions. Essential for automated workflow decision-making.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { - "value": "2025-04-20 14:30:00", - "scope": "input", - "name": "Input - Upgrade Date Time", + "value": "", + "scope": "local", + "name": "MX ID", "type": "datatype.string", - "description": "The date and time for the next firmware upgrade in the network. The upgrade for network devices is scheduled using the network's timezone to ensure they get the latest updates. If no date-time is given, it will be set to the next 5 minutes. The upgrade can be scheduled up to 1 month from today, and all devices will use the same date and time. \nExample: 2025-05-20 14:30:00\n", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq", + "unique_name": "variable_workflow_02PZZO7WI1FZX3TWhd6HR5Vuhw8CFIEZ4Jq", "object_type": "variable_workflow" }, { @@ -89,76 +106,93 @@ "properties": { "value": "", "scope": "input", - "name": "Input - Switch Version ID to Upgrade", + "name": "Network Name", "type": "datatype.string", - "description": "Provide the Switch Firmware Version ID you want to upgrade to. You can find it by running the 'Check Available Firmware Versions' workflow. For example: 4758.", - "is_required": false, + "description": "The exact name of the Meraki network where firmware upgrades will be scheduled. Must match an existing network within the specified organization. Network names are case-sensitive and must be provided exactly as they appear in the Meraki Dashboard.", + "is_required": true, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N", + "unique_name": "variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ", "object_type": "variable_workflow" }, { - "schema_id": "datatype.string", + "schema_id": "datatype.boolean", "properties": { - "value": "4952", + "value": false, "scope": "input", - "name": "Input - Wireless Version ID to Upgrade", + "name": "Ignore Errors", + "type": "datatype.boolean", + "description": "Controls workflow behavior when encountering API errors or validation failures. When set to false (default), the workflow will terminate on first error with detailed error information. When set to true, the workflow continues processing and provides best-effort results despite errors.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "local", + "name": "MR ID", "type": "datatype.string", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT", + "unique_name": "variable_workflow_02PZZOBV3C7K00njLjGN4Zjj0wjpCW0SGhM", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { - "value": "4727", - "scope": "input", - "name": "Input - Appliance Version ID to Upgrade", + "value": "", + "scope": "output", + "name": "Error Message", "type": "datatype.string", + "description": "Detailed error information when firmware upgrade scheduling fails. Contains specific API error messages, validation failures, or system issues to enable effective troubleshooting. Empty when workflow completes successfully, populated with diagnostic details when errors occur.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp", + "unique_name": "variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { "value": "", - "scope": "output", - "name": "Output - Status Code", + "scope": "local", + "name": "MS ID", "type": "datatype.string", - "description": "The HTTP status code of the API response.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8", + "unique_name": "variable_workflow_02PZZOFQTFANI5LoBVWZnJdR7p6CL07k1i5", "object_type": "variable_workflow" }, { - "schema_id": "datatype.boolean", + "schema_id": "datatype.string", "properties": { - "value": false, + "value": "", "scope": "input", - "name": "Input - Ignore Errors", - "type": "datatype.boolean", + "name": "Upgrade Date Time", + "type": "datatype.string", + "description": "Scheduled date and time for the firmware upgrade in 'YYYY-MM-DD HH:MM:SS' format using the network's timezone. All devices in the network will be upgraded simultaneously at this time. If left empty, the upgrade will be scheduled for 5 minutes from now. Maximum scheduling window is 30 days from current date. Examples: '2025-05-20 14:30:00' for 2:30 PM on May 20th, '2025-12-15 02:00:00' for 2:00 AM maintenance window.", "is_required": false, "display_on_wizard": false, "is_invisible": false, - "variable_string_format": "" + "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo", + "unique_name": "variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq", "object_type": "variable_workflow" }, { @@ -166,9 +200,9 @@ "properties": { "value": "", "scope": "input", - "name": "Input - Organization ID or Name", + "name": "Organization ID or Name", "type": "datatype.string", - "description": "An \"Organization ID\" is a unique identifier assigned to a specific organization. Provide the Organization ID or the Name of the Organization.", + "description": "Meraki organization identifier - provide either the organization name (e.g., 'Acme Corporation') or the organization ID (e.g., '123456'). The workflow automatically detects the input type and resolves to the correct organization ID. Organization names are case-sensitive and must match exactly as they appear in the Meraki Dashboard.", "is_required": true, "display_on_wizard": false, "is_invisible": false, @@ -182,15 +216,31 @@ "properties": { "value": "", "scope": "output", - "name": "Output - Error Message", + "name": "Status Message", "type": "datatype.string", - "description": "The HTTP error message of the API response.", + "description": "Human-readable status message describing the firmware upgrade scheduling operation outcome. Provides clear success confirmation, partial completion details, or failure reasons. Essential for user feedback and workflow orchestration decision-making in automated deployments.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6", + "unique_name": "variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "local", + "name": "Local Organization ID", + "type": "datatype.string", + "description": "Internal variable that stores the resolved Meraki organization ID after processing the input (organization name or ID). This variable ensures consistent organization identification throughout the workflow regardless of input format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT", "object_type": "variable_workflow" } ], @@ -199,7 +249,7 @@ "is_atomic": false }, "delete_workflow_instance": false, - "description": "This workflow allows users to schedule firmware upgrade for one or more networks based on input tags. The workflow first identifies the networks that has the input tags. The workflows queries networks across organization that the user has access.\nThe workflow currently provides firmware upgrade options for Appliance, Switch, Wireless devices in the network.\n\n\n", + "description": "Schedules firmware upgrades for Meraki network devices including Security Appliances (MX), Switches (MS), and Wireless Access Points (MR). Accepts organization name or ID, locates the specified network, and schedules firmware upgrades with specified version IDs and timing. Supports flexible scheduling from immediate (5 minutes) to 30 days in advance using network timezone. \n\nAutomatically compares current firmware versions against target versions and only schedules upgrades when necessary. Multiple executions are safe - devices already running target versions are skipped with clear status reporting.\n\nUse 'Check Available Firmware for Network' workflow first to identify compatible firmware version IDs.", "display_name": "Schedule Firmware Upgrade for Network", "runtime_user": { "target_default": true @@ -211,30 +261,440 @@ }, "object_type": "definition_workflow", "actions": [ + { + "unique_name": "definition_activity_02Q09GI4H5AEJ1GZLwktLEc4zXg9U8t6N6g", + "name": "Group", + "title": "Input Validation", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Validates firmware version ID inputs and provides helpful feedback if all version inputs are empty.", + "display_as_suggestion": false, + "display_name": "Input Validation", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q0Q5CM32I1G4m2nIIaLjqPNXTj1LGemil", + "name": "Parallel Block", + "title": "Run Input Validations in Parallel", + "type": "logic.parallel", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Performs comprehensive input validation using parallel execution for improved performance. Three validation types run simultaneously: version ID input validation, upgrade date/time format validation, and firmware version ID format verification. This parallel approach reduces total validation time while ensuring all inputs meet required standards before proceeding with firmware upgrade operations.", + "display_name": "Run Input Validations in Parallel", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02Q0Q5CNEYPWM7butfY9tlUz1X1EPjzvU8M", + "name": "Parallel Branch", + "title": "Validate Valid Version IDs", + "type": "logic.parallel_block", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Validates that at least one firmware version ID is provided for any device type (appliance, switch, or wireless). This validation runs in parallel with other input checks to improve workflow performance.", + "display_name": "Validate Valid Version IDs", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q09GI5GDZQT4tQjLnzlWHLvTPl3Iah0zE", + "name": "Condition Block", + "title": "Check Input Version IDs", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Check if all firmware version ID inputs are empty and provide guidance if needed", + "display_name": "Check Input Version IDs", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02Q09GI60MO9C5mrQJbgYxl52R7L5MnqDwC", + "name": "Condition Branch", + "title": "All Version IDs Empty", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": { + "left_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", + "operator": "eq", + "right_operand": "" + }, + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", + "operator": "eq", + "right_operand": "" + } + }, + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$", + "operator": "eq", + "right_operand": "" + } + }, + "continue_on_failure": false, + "description": "All firmware version IDs are empty - provide guidance", + "display_name": "All Version IDs Empty", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q09GI6TGJTS3iJW6J3nb6orARHgid3bk1", + "name": "Set Variables", + "title": "Set Input Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Input Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$\nInvalid input: At least one firmware version ID must be provided for Appliance, Switch, or Wireless devices. Use the 'Check Available Firmware for Network' workflow to identify valid version IDs." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$\nInvalid input: At least one firmware version ID must be provided for Appliance, Switch, or Wireless devices. Use the 'Check Available Firmware for Network' workflow to identify valid version IDs." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$\nFirmware upgrade failed - no version IDs specified for any device types" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q09GI7EWL0N3QQUaLxvvxeqyU8vHuYQZE", + "name": "Completed", + "title": "Completed - Input Validation Failed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed - Input Validation Failed", + "result_message": "At least one firmware version ID must be provided", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02Q0Q5COF3PWD0eCXCSs0ZaPtrAwwRyUhwP", + "name": "Parallel Branch", + "title": "Validate Upgrade Date Format", + "type": "logic.parallel_block", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Validates the upgrade date and time format to ensure it follows the required 'YYYY-MM-DD HH:MM:SS' format (e.g., 2025-05-20 14:30:00). Empty values are allowed for immediate upgrades. This validation runs in parallel with other input checks.", + "display_name": "Validate Upgrade Date Format", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr", + "name": "Execute Python Script", + "title": "Validate Date Format", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Validates the upgrade date time format. Accepts empty value or 'YYYY-MM-DD HH:MM:SS' format.", + "display_name": "Validate Date Format", + "script": "import re\nimport sys\nfrom datetime import datetime\n\n# Get the date time input\n(upgrade_datetime,) = sys.argv[1:2]\n\n# Initialize validation result\nvalid_date = True\nerror_message = ''\n\n# Check if date is empty (which is allowed)\nif not upgrade_datetime or upgrade_datetime.strip() == '':\n valid_date = True\n error_message = ''\nelse:\n # Validate the format using regex: YYYY-MM-DD HH:MM:SS\n date_pattern = r'^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$'\n \n if not re.match(date_pattern, upgrade_datetime):\n valid_date = False\n error_message = f'Invalid date format: \"{upgrade_datetime}\". Expected format: YYYY-MM-DD HH:MM:SS (e.g., 2025-05-20 14:30:00)'\n else:\n # Additional validation - try to parse the date to ensure it's a valid date\n try:\n datetime.strptime(upgrade_datetime, '%Y-%m-%d %H:%M:%S')\n valid_date = True\n error_message = ''\n except ValueError:\n valid_date = False\n error_message = f'Invalid date values: \"{upgrade_datetime}\". Please check month, day, hour, minute, and second values are valid.'", + "script_arguments": [ + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$" + ], + "script_queries": [ + { + "script_query": "valid_date", + "script_query_name": "valid_date", + "script_query_type": "boolean" + }, + { + "script_query": "error_message", + "script_query_name": "error_message", + "script_query_type": "string" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPs", + "name": "Condition Block", + "title": "Check Date Validation Result", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Check if date validation failed and exit with error if invalid format", + "display_name": "Check Date Validation Result", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPt", + "name": "Condition Branch", + "title": "Invalid Date Format", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.valid_date$", + "operator": "eq", + "right_operand": false + }, + "continue_on_failure": false, + "description": "Date format validation failed", + "display_name": "Invalid Date Format", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPu", + "name": "Set Variables", + "title": "Set Date Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Date Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$\n$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$\n$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$\nFirmware upgrade failed - invalid date format provided" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPv", + "name": "Completed", + "title": "Completed - Date Validation Failed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed - Date Validation Failed", + "result_message": "$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.error_message$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02Q0Q5QCLEZDU4QFlhPxTAJ5rf0wWKRYajA", + "name": "Parallel Branch", + "title": "Validate Version ID Formats", + "type": "logic.parallel_block", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Validates firmware version IDs for all device types (appliance, switch, wireless) to ensure they are numeric when provided (e.g., 4727, 4952, 4758). Empty values are allowed to skip upgrades for specific device types. This validation runs in parallel with other input checks.", + "display_name": "Validate Version ID Formats", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0", + "name": "Execute Python Script", + "title": "Validate Version ID Formats", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Validates that version IDs are numeric when provided", + "display_name": "Validate Version ID Formats", + "script": "import re\nimport sys\n\n# Get version IDs from command line arguments\n(appliance_version, switch_version, wireless_version) = sys.argv[1:4]\n\n# Initialize validation result\nvalid_versions = True\nerror_messages = []\n\n# Function to validate version ID format\ndef validate_version_id(version_id, device_type):\n if not version_id or version_id.strip() == '':\n return True, '' # Empty is allowed\n \n # Check if it's numeric\n if not version_id.isdigit():\n return False, f'Invalid {device_type} Version ID: \"{version_id}\". Version IDs must be numeric (e.g., 4727, 4952, 4758).'\n \n return True, ''\n\n# Validate each version ID\nvalidations = [\n (appliance_version, 'Appliance'),\n (switch_version, 'Switch'),\n (wireless_version, 'Wireless')\n]\n\nfor version_id, device_type in validations:\n is_valid, error_msg = validate_version_id(version_id, device_type)\n if not is_valid:\n valid_versions = False\n error_messages.append(error_msg)\n\n# Combine error messages\nfinal_error_message = '\\n'.join(error_messages) if error_messages else ''", + "script_arguments": [ + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$" + ], + "script_queries": [ + { + "script_query": "valid_versions", + "script_query_name": "valid_versions", + "script_query_type": "boolean" + }, + { + "script_query": "final_error_message", + "script_query_name": "error_message", + "script_query_type": "string" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q09GICUX7RC67n3s3iWIVdt3O8K9rtGeV", + "name": "Condition Block", + "title": "Check Version ID Validation Result", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Check if version ID validation failed and exit with error if invalid format", + "display_name": "Check Version ID Validation Result", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02Q09GIDGL0HQ3iQ7n8PLqcqi2vLHM94twW", + "name": "Condition Branch", + "title": "Invalid Version ID Format", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.valid_versions$", + "operator": "eq", + "right_operand": false + }, + "continue_on_failure": false, + "description": "Version ID format validation failed", + "display_name": "Invalid Version ID Format", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q09GIEFH9PL30q00BtXBQWqSxVFn9Y7M2", + "name": "Set Variables", + "title": "Set Version ID Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Version ID Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$\n$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$\n$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$\nFirmware upgrade failed - invalid version ID format provided" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q09GIF73GML2p7LQSjAog4iz54ni0nCwq", + "name": "Completed", + "title": "Completed - Version ID Validation Failed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed - Version ID Validation Failed", + "result_message": "$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.error_message$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + } + ] + } + ] + }, { "unique_name": "definition_activity_02M6JZVP05OG65tqeJlav9hEVYcW0OF8qpu", "name": "Group", - "title": "Find Organization and Network", + "title": "Lookup Organization and Network", "type": "logic.group", "base_type": "activity", "properties": { "continue_on_failure": false, - "description": "Lookup the the Organization and the Network within the Organization. ", + "description": "Lookup the Organization and the Network within the Organization. ", "display_as_suggestion": false, - "display_name": "Find Organization and Network", + "display_name": "Lookup Organization and Network", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { "unique_name": "definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA", - "name": "Get Organization By Name", - "title": "Get Organization By Name", + "name": "Get Organization By Name or ID", + "title": "Get Organization By Name or ID", "type": "workflow.sub_workflow", "base_type": "subworkflow", "properties": { "continue_on_failure": true, - "display_name": "Get Organization By Name", + "display_name": "Get Organization By Name or ID", "input": { "variable_workflow_02M605GTHU5L72i8goD4nuYixYOvQEFV7rN": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ$", "variable_workflow_02M605GTI1LUG737lDLyzxnE9jwENJNQ08W": false @@ -248,20 +708,20 @@ "use_workflow_target": true }, "workflow_id": "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", - "workflow_name": "Meraki - Get Organization By Name" + "workflow_name": "Meraki - Get Organization By Name or ID" }, "object_type": "definition_activity" }, { "unique_name": "definition_activity_02M6HPRJG1K7U41B1j5MHl3N7AhJpHF4ul8", "name": "Condition Block", - "title": "Was Input Org Name?", + "title": "Was the Request Successful?", "type": "logic.if_else", "base_type": "activity", "properties": { "conditions": [], "continue_on_failure": false, - "display_name": "Was Input Org Name?", + "display_name": "Was the Request Successful?", "skip_execution": false }, "object_type": "definition_activity", @@ -308,7 +768,7 @@ { "unique_name": "definition_activity_02M6HPRJQWZ2Z5e27Q83OcHNA47AU8yTHof", "name": "Condition Branch", - "title": "No, Set ID from Input", + "title": "No, Org Match", "type": "logic.condition_block", "base_type": "activity", "properties": { @@ -318,27 +778,24 @@ "right_operand": 200 }, "continue_on_failure": false, - "display_name": "No, Set ID from Input", + "display_name": "No, Org Match", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02M6HSB8V83YX5CLExsB7hICBo11No4pZkD", - "name": "Set Variables", - "title": "Set Local Org ID Variable", - "type": "core.set_multiple_variables", + "unique_name": "definition_activity_02Q1V2KM0348261SvnzSSFlzR6FlJ5WY3I2", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", "base_type": "activity", "properties": { + "completion_type": "failed-completed", "continue_on_failure": false, - "display_name": "Set Local Org ID Variable", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ$" - } - ] + "description": "Completed action", + "display_name": "Completed", + "result_message": "No Org Match.", + "skip_execution": false }, "object_type": "definition_activity" } @@ -528,312 +985,1555 @@ ] }, { - "unique_name": "definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0", - "name": "Update Network Firmware Upgrades", - "title": "Update Network Firmware Upgrades", - "type": "workflow.atomic_workflow", - "base_type": "subworkflow", - "properties": { - "continue_on_failure": true, - "description": "Update Network Firmware based on inputs provided.", - "display_name": "Update Network Firmware Upgrades", - "input": { - "variable_workflow_02M3057KLFLIG20p3pF8ezNDO75MHqfMshf": "$activity.definition_activity_02M312TTTNDIE7iqfUDnANBR4WCbYfp3fdy.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$", - "variable_workflow_02M4KERVOSRJQ08qXFbfM4iMYQx2FpdU2Wv": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", - "variable_workflow_02M4KERVP62GU060qFU6m1vvv9OwL3mx2dr": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", - "variable_workflow_02M4KERVPIWKK5qoD0mltZ2vRBwqueLtzx3": false, - "variable_workflow_02M4KERVPWAVA4upg4hyDRhVSQq4gXX6sf2": "", - "variable_workflow_02M4KERVQ9MZF7jg3BdAhGNZFlt3qteptmt": "", - "variable_workflow_02M4KERVQMOMV7BMIPi4zaoJNiqQg4T9JvI": "", - "variable_workflow_02M4KERVQZELU4R7e0vGsxOkGMXFgxCcCQA": false, - "variable_workflow_02M4KERVRC3QE2OLTU4o22QEpid35nqLKxL": "", - "variable_workflow_02M4KERVS2VGZ2aMw0gwig6JJIT24q4KMP3": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", - "variable_workflow_02M4KERVSTNX04vnDZTl0xrUY7LDJa4ZdlN": "", - "variable_workflow_02M4KERVT6GCB3qhldBseHG3T6lt0rMU1Mh": "", - "variable_workflow_02M4KERVTJG3D6z0pR38CYPBhZD7S5rTHeL": "", - "variable_workflow_02M4KERVTXNXE0VtG74iQnLYuk15EOGjdTE": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", - "variable_workflow_02M4KERVUAJ1V1PyguqfdoICjF1BmHR7X2b": false, - "variable_workflow_02M4KERVUNIC90E9ID0hvx5GO21BmmzIs08": false, - "variable_workflow_02M4KERVV09U46NNQXWhuLlgEFsBSliOUNR": false, - "variable_workflow_02M4KERVVD4B80d0TNrHG17Oj0JRKQ0t1rM": "", - "variable_workflow_02M4KERVVPPQ72Beed28WWzCNhfcw121KZh": "", - "variable_workflow_02M4KERVW32IK323MeeO2ZRMVhqupIl3Vnf": "", - "variable_workflow_02M4KERVWFXYU1hDx5aB3T8ThL6zSXFMTT3": false, - "variable_workflow_02M4KERVWSKTJ4T8YMhcQ21to7TnlCqYM3l": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", - "variable_workflow_02M4KERVX5OFW4pJO7lxPaQ7ocZzRKxdKfn": "", - "variable_workflow_02M4KERVXJS3R2hNPsRY66qPvsx8P6I77S3": false, - "variable_workflow_02M4KERVXWWZV3oInj8jFfnitnKrWUaFaX2": false, - "variable_workflow_02M4KERVYC3RT6HIpeFiGsPas45oB0gD48h": false, - "variable_workflow_02M4KERVYPC1E11PVRqaDjAaHJ3TRWznwFf": "", - "variable_workflow_02M4KERVZ2C7F7lU7gVGO8NZOaQjYe95OZW": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$" - }, - "runtime_user": { - "target_default": true - }, - "skip_execution": false, - "target": { - "target_type": "meraki.endpoint", - "use_workflow_target": true - }, - "workflow_id": "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF", - "workflow_name": "Meraki - Update Network Firmware Upgrades" - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02M6LGMTX47U46kBoNBf5Ftup3tj59Fv2y4", - "name": "Condition Block", - "title": "Was the Request Successful?", - "type": "logic.if_else", + "unique_name": "definition_activity_02PYMKA5ZB9KB2fLLZztXyVbFS002iPSWFg", + "name": "Group", + "title": "Check if Upgrade is needed", + "type": "logic.group", "base_type": "activity", "properties": { - "conditions": [], "continue_on_failure": false, - "description": "Evaluate result of the operation and populate final responses.", - "display_name": "Was the Request Successful?", + "description": "Validates current firmware versions against input version IDs to determine if upgrades are needed. Implements idempotency by ensuring devices are only upgraded when input version differs from current version.", + "display_as_suggestion": false, + "display_name": "Check if Upgrade is needed", "skip_execution": false }, "object_type": "definition_activity", - "blocks": [ + "actions": [ { - "unique_name": "definition_activity_02M6LGMTX4ZD53IvNzCWjfCmdXwlkPZIHZy", - "name": "Condition Branch", - "title": "200/Success", - "type": "logic.condition_block", - "base_type": "activity", + "unique_name": "definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd", + "name": "Check Available Firmware for Network", + "title": "Check Available Firmware for Network", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", - "operator": "eq", - "right_operand": 200 + "continue_on_failure": true, + "description": "Checks available firmware updates for Meraki network devices including Security Appliances (MX), Switches (MS), and Wireless Access Points (MR). Accepts organization name or ID, locates the specified network, and returns current firmware versions along with available upgrades for each device type in both individual outputs and a consolidated summary format.", + "display_name": "Check Available Firmware for Network", + "input": { + "variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$", + "variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ$" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true }, + "workflow_id": "definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF", + "workflow_name": "Check Available Firmware for Network" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh", + "name": "Execute Python Script", + "title": "Determine Upgrade Requirements", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, "continue_on_failure": false, - "display_name": "200/Success", + "description": "Compare input version IDs against current versions to determine which device types need upgrades. Sets filtered version IDs for each device type - empty if no upgrade needed, input value if upgrade required. Generates status messages for user feedback.", + "display_name": "Determine Upgrade Requirements", + "script": "import re\nimport sys\n\n# Get inputs from command line arguments\n(appliance_current_version, switch_current_version, wireless_current_version, \n appliance_input_version, switch_input_version, wireless_input_version) = sys.argv[1:7]\n\n# Extract version IDs from formatted strings like 'MX 18.211.5.2 (ID:4625)'\ndef extract_version_id(version_string):\n if not version_string or version_string.strip() == '' or version_string == 'null':\n return ''\n \n # Look for pattern like '(ID:1234)' in the string\n match = re.search(r'\\(ID:([^)]+)\\)', version_string)\n if match:\n return match.group(1)\n return ''\n\n# Extract version names from formatted strings like 'MX 18.211.5.2 (ID:4625)'\ndef extract_version_name(version_string):\n if not version_string or version_string.strip() == '' or version_string == 'null':\n return ''\n \n # Extract everything before ' (ID:' or return the whole string if no ID found\n if ' (ID:' in version_string:\n return version_string.split(' (ID:')[0]\n return version_string\n\n# Extract current version IDs and names from each device type\napplianceCurrentVersionId = extract_version_id(appliance_current_version)\nswitchCurrentVersionId = extract_version_id(switch_current_version)\nwirelessCurrentVersionId = extract_version_id(wireless_current_version)\n\napplianceCurrentVersionName = extract_version_name(appliance_current_version)\nswitchCurrentVersionName = extract_version_name(switch_current_version)\nwirelessCurrentVersionName = extract_version_name(wireless_current_version)\n\n# Initialize status tracking\nstatus_messages = []\n\n# Determine filtered version IDs based on upgrade requirements\n# Set to input value if upgrade needed, empty if not needed or input is empty\nfilteredApplianceVersionId = ''\nfilteredSwitchVersionId = ''\nfilteredWirelessVersionId = ''\n\n# Check appliance upgrade requirement\nif appliance_input_version and appliance_input_version.strip() != '' and appliance_input_version != 'null':\n if appliance_input_version == applianceCurrentVersionId:\n status_messages.append(f'🔵 Appliance (MX): Already running target version (ID: {appliance_input_version}) - upgrade skipped')\n else:\n filteredApplianceVersionId = appliance_input_version\n if applianceCurrentVersionName:\n status_messages.append(f'🟢 Appliance (MX): Upgrade scheduled from {applianceCurrentVersionName} to version ID {appliance_input_version}')\n else:\n status_messages.append(f'🟢 Appliance (MX): Upgrade scheduled to version ID {appliance_input_version}')\n\n# Check switch upgrade requirement \nif switch_input_version and switch_input_version.strip() != '' and switch_input_version != 'null':\n if switch_input_version == switchCurrentVersionId:\n status_messages.append(f'🔵 Switch (MS): Already running target version (ID: {switch_input_version}) - upgrade skipped')\n else:\n filteredSwitchVersionId = switch_input_version\n if switchCurrentVersionName:\n status_messages.append(f'🟢 Switch (MS): Upgrade scheduled from {switchCurrentVersionName} to version ID {switch_input_version}')\n else:\n status_messages.append(f'🟢 Switch (MS): Upgrade scheduled to version ID {switch_input_version}')\n\n# Check wireless upgrade requirement\nif wireless_input_version and wireless_input_version.strip() != '' and wireless_input_version != 'null':\n if wireless_input_version == wirelessCurrentVersionId:\n status_messages.append(f'🔵 Wireless (MR): Already running target version (ID: {wireless_input_version}) - upgrade skipped')\n else:\n filteredWirelessVersionId = wireless_input_version\n if wirelessCurrentVersionName:\n status_messages.append(f'🟢 Wireless (MR): Upgrade scheduled from {wirelessCurrentVersionName} to version ID {wireless_input_version}')\n else:\n status_messages.append(f'🟢 Wireless (MR): Upgrade scheduled to version ID {wireless_input_version}')\n\n# Determine if any upgrades are needed\nanyUpgradeNeeded = (filteredApplianceVersionId != '' or \n filteredSwitchVersionId != '' or \n filteredWirelessVersionId != '')\n\n# Generate final status message\nif not status_messages:\n upgrade_status_message = 'ℹ️ No firmware upgrade targets specified - all device type version fields are empty.'\nelse:\n upgrade_status_message = '\\n'.join(status_messages)\n if anyUpgradeNeeded:\n upgrade_count = sum(1 for vid in [filteredApplianceVersionId, filteredSwitchVersionId, filteredWirelessVersionId] if vid != '')\n skip_count = len(status_messages) - upgrade_count\n if skip_count \u003e 0:\n upgrade_status_message += f'\\n\\n📊 Summary: {upgrade_count} device type(s) scheduled for upgrade, {skip_count} already at target version(s)'\n else:\n upgrade_status_message += f'\\n\\n📊 Summary: {upgrade_count} device type(s) scheduled for upgrade'\n else:\n upgrade_status_message += '\\n\\n📊 Summary: All specified device types are already running target firmware versions - no upgrades needed'", + "script_arguments": [ + "$activity.definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "$activity.definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "$activity.definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$" + ], + "script_queries": [ + { + "script_query": "filteredApplianceVersionId", + "script_query_name": "filteredApplianceVersionId", + "script_query_type": "string" + }, + { + "script_query": "filteredSwitchVersionId", + "script_query_name": "filteredSwitchVersionId", + "script_query_type": "string" + }, + { + "script_query": "filteredWirelessVersionId", + "script_query_name": "filteredWirelessVersionId", + "script_query_type": "string" + }, + { + "script_query": "anyUpgradeNeeded", + "script_query_name": "anyUpgradeNeeded", + "script_query_type": "boolean" + }, + { + "script_query": "upgrade_status_message", + "script_query_name": "upgrade_status_message", + "script_query_type": "string" + } + ], "skip_execution": false }, - "object_type": "definition_activity", - "actions": [ - { - "unique_name": "definition_activity_02M6LGMTX8O0O3mNa7v1zbntIH5z4Oxd3to", - "name": "Set Variables", - "title": "Set Variables", - "type": "core.set_multiple_variables", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "display_name": "Set Variables", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade is scheduled." - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", - "variable_value_new": "completed-successfully" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" - } - ] + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA7K8N8J2S0drT8u5x6nMLA010qXafOr", + "name": "Set Variables", + "title": "Set Filtered Version IDs", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set the local variables with filtered version IDs for each device type. Variables will contain version ID if upgrade needed, empty if no upgrade required.", + "display_name": "Set Filtered Version IDs", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZO7WI1FZX3TWhd6HR5Vuhw8CFIEZ4Jq$", + "variable_value_new": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.filteredApplianceVersionId$" }, - "object_type": "definition_activity" - }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOFQTFANI5LoBVWZnJdR7p6CL07k1i5$", + "variable_value_new": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.filteredSwitchVersionId$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOBV3C7K00njLjGN4Zjj0wjpCW0SGhM$", + "variable_value_new": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.filteredWirelessVersionId$" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA2F3I3DXM4WLN2o9r0hGFU004kRUYHi", + "name": "Condition Block", + "title": "Validate Version Requirements", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Check each device type to determine if upgrade is needed by comparing input version IDs with current version IDs.", + "display_name": "Validate Version Requirements", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ { - "unique_name": "definition_activity_02M7XZRJ5SP1B3Cdj8cxHqP4acnsnL3ovqL", - "name": "Completed", - "title": "Completed", - "type": "logic.completed", + "unique_name": "definition_activity_02PZA2F3I7GYN5XMO3p0s1iHGV005lSVZIj", + "name": "Condition Branch", + "title": "No Upgrades Needed", + "type": "logic.condition_block", "base_type": "activity", "properties": { - "completion_type": "succeeded", + "condition": { + "left_operand": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.anyUpgradeNeeded$", + "operator": "eq", + "right_operand": false + }, "continue_on_failure": false, - "display_name": "Completed", - "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "description": "No firmware upgrades are needed - all specified devices are already running the target versions", + "display_name": "No Upgrades Needed", "skip_execution": false }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PZA3G4J4EYO6ZNP4q1t2jIHW006mTWaJk", + "name": "Set Variables", + "title": "Set No Upgrade Needed Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set No Upgrade Needed Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 200 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "No firmware upgrade needed - all specified devices are already running the target firmware versions or no valid version IDs were provided.\n$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.upgrade_status_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "Network: $workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ Upgrade skipped - devices are already running target firmware versions." + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA4H5K5FZP7aoQ5r2u3kJIX007nUXbKl", + "name": "Completed", + "title": "Completed - No Upgrade Needed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "succeeded", + "continue_on_failure": false, + "display_name": "Completed - No Upgrade Needed", + "result_message": "All devices are already running the specified firmware versions. No upgrade needed.", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] } ] + } + ] + }, + { + "unique_name": "definition_activity_02Q09HV27P34N1B6qUGq6RYL2dAvIwQAlSA", + "name": "Group", + "title": "Upgrade Networks", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Executes the actual firmware upgrade scheduling after validation and requirements determination. Uses the Update Network Firmware Upgrades atomic workflow to schedule firmware upgrades for the filtered device types that require updates. Handles both successful scheduling and error scenarios with comprehensive status reporting and proper error handling.", + "display_as_suggestion": false, + "display_name": "Upgrade Networks", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0", + "name": "Update Network Firmware Upgrades", + "title": "Update Network Firmware Upgrades", + "type": "workflow.atomic_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Update Network Firmware based on inputs provided.", + "display_name": "Update Network Firmware Upgrades", + "input": { + "variable_workflow_02M3057KLFLIG20p3pF8ezNDO75MHqfMshf": "$activity.definition_activity_02M312TTTNDIE7iqfUDnANBR4WCbYfp3fdy.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$", + "variable_workflow_02M4KERVOSRJQ08qXFbfM4iMYQx2FpdU2Wv": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZO7WI1FZX3TWhd6HR5Vuhw8CFIEZ4Jq$", + "variable_workflow_02M4KERVP62GU060qFU6m1vvv9OwL3mx2dr": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", + "variable_workflow_02M4KERVPIWKK5qoD0mltZ2vRBwqueLtzx3": "false", + "variable_workflow_02M4KERVPWAVA4upg4hyDRhVSQq4gXX6sf2": "", + "variable_workflow_02M4KERVQ9MZF7jg3BdAhGNZFlt3qteptmt": "", + "variable_workflow_02M4KERVQMOMV7BMIPi4zaoJNiqQg4T9JvI": "", + "variable_workflow_02M4KERVQZELU4R7e0vGsxOkGMXFgxCcCQA": "false", + "variable_workflow_02M4KERVRC3QE2OLTU4o22QEpid35nqLKxL": "", + "variable_workflow_02M4KERVS2VGZ2aMw0gwig6JJIT24q4KMP3": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", + "variable_workflow_02M4KERVSTNX04vnDZTl0xrUY7LDJa4ZdlN": "", + "variable_workflow_02M4KERVT6GCB3qhldBseHG3T6lt0rMU1Mh": "", + "variable_workflow_02M4KERVTJG3D6z0pR38CYPBhZD7S5rTHeL": "", + "variable_workflow_02M4KERVTXNXE0VtG74iQnLYuk15EOGjdTE": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", + "variable_workflow_02M4KERVUAJ1V1PyguqfdoICjF1BmHR7X2b": "false", + "variable_workflow_02M4KERVUNIC90E9ID0hvx5GO21BmmzIs08": "false", + "variable_workflow_02M4KERVV09U46NNQXWhuLlgEFsBSliOUNR": "false", + "variable_workflow_02M4KERVVD4B80d0TNrHG17Oj0JRKQ0t1rM": "", + "variable_workflow_02M4KERVVPPQ72Beed28WWzCNhfcw121KZh": "", + "variable_workflow_02M4KERVW32IK323MeeO2ZRMVhqupIl3Vnf": "", + "variable_workflow_02M4KERVWFXYU1hDx5aB3T8ThL6zSXFMTT3": "false", + "variable_workflow_02M4KERVWSKTJ4T8YMhcQ21to7TnlCqYM3l": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOFQTFANI5LoBVWZnJdR7p6CL07k1i5$", + "variable_workflow_02M4KERVX5OFW4pJO7lxPaQ7ocZzRKxdKfn": "", + "variable_workflow_02M4KERVXJS3R2hNPsRY66qPvsx8P6I77S3": "false", + "variable_workflow_02M4KERVXWWZV3oInj8jFfnitnKrWUaFaX2": "false", + "variable_workflow_02M4KERVYC3RT6HIpeFiGsPas45oB0gD48h": "false", + "variable_workflow_02M4KERVYPC1E11PVRqaDjAaHJ3TRWznwFf": "", + "variable_workflow_02M4KERVZ2C7F7lU7gVGO8NZOaQjYe95OZW": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOBV3C7K00njLjGN4Zjj0wjpCW0SGhM$" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF", + "workflow_name": "Meraki - Update Network Firmware Upgrades" + }, + "object_type": "definition_activity" }, { - "unique_name": "definition_activity_02M7XFCXFP11H20q6JIAnJT636nfw2T9ldr", - "name": "Condition Branch", - "title": "Ignore Errors", - "type": "logic.condition_block", + "unique_name": "definition_activity_02M6LGMTX47U46kBoNBf5Ftup3tj59Fv2y4", + "name": "Condition Block", + "title": "Was the Request Successful?", + "type": "logic.if_else", "base_type": "activity", "properties": { - "condition": { - "left_operand": { - "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", - "operator": "ne", - "right_operand": 200 - }, - "operator": "and", - "right_operand": { - "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo$", - "operator": "eq", - "right_operand": true - } - }, + "conditions": [], "continue_on_failure": false, - "display_name": "Ignore Errors", + "description": "Evaluate result of the operation and populate final responses.", + "display_name": "Was the Request Successful?", "skip_execution": false }, "object_type": "definition_activity", - "actions": [ + "blocks": [ { - "unique_name": "definition_activity_02M7XFCXFQJGB0gBMuBXF8loPLg1QZp6uyt", - "name": "Set Variables", - "title": "Set Variables", - "type": "core.set_multiple_variables", + "unique_name": "definition_activity_02M6LGMTX4ZD53IvNzCWjfCmdXwlkPZIHZy", + "name": "Condition Branch", + "title": "200/Success", + "type": "logic.condition_block", "base_type": "activity", "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", + "operator": "eq", + "right_operand": 200 + }, "continue_on_failure": false, - "display_name": "Set Variables", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ updrade skipped due to errors." + "display_name": "200/Success", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M6LGMTX8O0O3mNa7v1zbntIH5z4Oxd3to", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade is scheduled.\n\n$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.upgrade_status_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + } + ] }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", - "variable_value_new": "completed-successfully" + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7XZRJ5SP1B3Cdj8cxHqP4acnsnL3ovqL", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "succeeded", + "continue_on_failure": false, + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "skip_execution": false }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02M7XFCXFP11H20q6JIAnJT636nfw2T9ldr", + "name": "Condition Branch", + "title": "Ignore Errors", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": { + "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", + "operator": "ne", + "right_operand": 200 }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo$", + "operator": "eq", + "right_operand": true } - ] + }, + "continue_on_failure": false, + "display_name": "Ignore Errors", + "skip_execution": false }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M7XFCXFQJGB0gBMuBXF8loPLg1QZp6uyt", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade skipped due to errors.\n\n$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.upgrade_status_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7XEWRKKEDR03oKIqk0z2zRZs5yMos1Dx", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "succeeded", + "continue_on_failure": false, + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] }, { - "unique_name": "definition_activity_02M7XEWRKKEDR03oKIqk0z2zRZs5yMos1Dx", - "name": "Completed", - "title": "Completed", - "type": "logic.completed", + "unique_name": "definition_activity_02M6LGMTX9Q7O5MIGWYEeR2Cyu3kUvEZePO", + "name": "Condition Branch", + "title": "Failed", + "type": "logic.condition_block", "base_type": "activity", "properties": { - "completion_type": "succeeded", + "condition": { + "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", + "operator": "ne", + "right_operand": 200 + }, "continue_on_failure": false, - "display_name": "Completed", - "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "display_name": "Failed", "skip_execution": false }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M6LGMTXC5ZS0ubOpj1D3lXEetwnitprPd", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade failed to schedule." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", + "variable_value_new": "workflow-errored" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7XZMZ74LRQ63EGvzvETpm9aDNJ7QYsR1", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] } ] + } + ] + } + ], + "categories": [ + "category_02M5I40Y7XSOX59ZtwCZnsrkS73sAGa3w1t" + ] + }, + "subworkflows": [ + { + "workflow": { + "unique_name": "definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF", + "name": "Check Available Firmware for Network", + "title": "Check Available Firmware for Network", + "type": "generic.workflow", + "base_type": "workflow", + "variables": [ + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Result", + "type": "datatype.string", + "description": "Comprehensive summary report containing current firmware versions and available upgrades for all device types (Appliance, Switch, Wireless) in a human-readable format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Switch Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Switches (MS): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M3N3D6E9MRS0zGiJk4LnOpQ2TuV3wX4yZ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Switch - Available Firmware Versions", + "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Switches (MS) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "json" + }, + "unique_name": "variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Error Message", + "type": "datatype.string", + "description": "Detailed error information when workflow fails. Empty for successful executions, contains specific error details for troubleshooting failures.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Wireless Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Wireless Access Points (MR): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M3N4E7F0NST1AHjKl5MoQpR3UvW4xY5zA", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Appliance - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Security Appliances (MX) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "input", + "name": "Input - Network Name", + "type": "datatype.string", + "description": "The name of the Meraki network to check for firmware updates. Must be an exact match for an existing network within the specified organization.", + "is_required": true, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Switch - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Switches (MS) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.integer", + "properties": { + "value": 0, + "scope": "output", + "name": "Status Code", + "type": "datatype.integer", + "description": "HTTP status code or workflow completion status. Returns 200 for success, 4xx/5xx for various error conditions.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "local", + "name": "Organization ID", + "type": "datatype.string", + "description": "Internal variable to store the resolved Meraki organization ID, determined from either the organization name lookup or direct ID input.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Appliance Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Security Appliances (MX): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02PYYLS61FZLF0ryAp4sqcDyP4E8mhuheHl", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Appliance - Available Firmware Versions", + "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Security Appliances (MX) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "json" + }, + "unique_name": "variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Wireless - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Wireless Access Points (MR) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Status Message", + "type": "datatype.string", + "description": "Brief status description of workflow execution result. 'Success' for successful completion or error summary for failures.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Wireless - Available Firmware Versions", + "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Wireless Access Points (MR) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "json" + }, + "unique_name": "variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "input", + "name": "Input - Organization ID or Name", + "type": "datatype.string", + "description": "Provide the Organization Name or Organization ID.", + "is_required": true, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw", + "object_type": "variable_workflow" + } + ], + "properties": { + "atomic": { + "is_atomic": false + }, + "automation_rules": { + "type": [] + }, + "delete_workflow_instance": false, + "description": "Checks available firmware updates for Meraki network devices including Security Appliances (MX), Switches (MS), and Wireless Access Points (MR). Accepts organization name or ID, locates the specified network, and returns current firmware versions along with available upgrades for each device type in both individual outputs and a consolidated summary format.", + "display_name": "Check Available Firmware for Network", + "runtime_user": { + "target_default": true }, + "target": { + "target_type": "meraki.endpoint", + "specify_on_workflow_start": true + } + }, + "object_type": "definition_workflow", + "actions": [ { - "unique_name": "definition_activity_02M6LGMTX9Q7O5MIGWYEeR2Cyu3kUvEZePO", - "name": "Condition Branch", - "title": "Failed", - "type": "logic.condition_block", + "unique_name": "definition_activity_02PEOAC0PDY003JBVLtTaygKBLzGSOB5tGo", + "name": "Group", + "title": "Find Organization by ID or Name", + "type": "logic.group", "base_type": "activity", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", - "operator": "ne", - "right_operand": 200 - }, "continue_on_failure": false, - "display_name": "Failed", + "description": "Handles input flexibility by accepting either organization name or ID. Uses conditional logic to determine input type and set the organization ID for subsequent steps.", + "display_as_suggestion": false, + "display_name": "Find Organization by ID or Name", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02M6LGMTXC5ZS0ubOpj1D3lXEetwnitprPd", - "name": "Set Variables", - "title": "Set Variables", - "type": "core.set_multiple_variables", + "unique_name": "definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg", + "name": "Get Organization By Name or ID", + "title": "Get Organization By Name or ID", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Lookup the Organization by Name or ID", + "display_name": "Get Organization By Name or ID", + "input": { + "variable_workflow_02M605GTHU5L72i8goD4nuYixYOvQEFV7rN": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw$", + "variable_workflow_02M605GTI1LUG737lDLyzxnE9jwENJNQ08W": false + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", + "workflow_name": "Meraki - Get Organization By Name or ID" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M6GWLTHB0QQ2tHfY1ZO36K4S9uzgqt7gD", + "name": "Condition Block", + "title": "Was the Request Successful?", + "type": "logic.if_else", "base_type": "activity", "properties": { + "conditions": [], "continue_on_failure": false, - "display_name": "Set Variables", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade failed to schedule." - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", - "variable_value_new": "workflow-errored" + "description": "Routes logic based on lookup success to set organization ID from either lookup result or original input.", + "display_name": "Was the Request Successful?", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02M6GWLTN539K1dlKUmeNaU8S93S4tVs7gp", + "name": "Condition Branch", + "title": "Yes, Set ID from Get", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "HTTP 200 indicates successful name lookup - use returned organization ID.", + "display_name": "Yes, Set ID from Get", + "skip_execution": false }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M6H1KCDK4CL6WPslndUEMP25csS3zZZkL", + "name": "Set Variables", + "title": "Set Local Org ID", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Use organization ID from lookup result.", + "display_name": "Set Local Org ID", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.local.variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2$", + "variable_value_new": "$activity.definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg.output.variable_workflow_02M605GTJITQP1fcLQlR8CLYAHoMomGWZvE$" + } + ] + }, + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02M6H2KH6P4Q56cig9mkjsWMHaANAfb03Z8", + "name": "Condition Branch", + "title": "No, Org Match", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Non-200 response indicates input was likely already an organization ID - use original input.", + "display_name": "No, Org Match", + "skip_execution": false }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" - } - ] + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q1UNZE489PT5GCm8gQpGtyfoTzenSEocF", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Completed action", + "display_name": "Completed", + "result_message": "No Organization Match.", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02PEOGIRQ9Q462hvTAYZcXnY4qw3q9o75kw", + "name": "Group", + "title": "Find Network By Name", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Locates the target network within the organization using the provided network name.", + "display_as_suggestion": false, + "display_name": "Find Network By Name", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB", + "name": "Get Network By Name", + "title": "Get Network By Name", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Finds network by name within the organization and returns network ID for firmware queries.", + "display_name": "Get Network By Name", + "input": { + "variable_workflow_02LCRACABYWD40LVa27k00YndGuostARjdp": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.local.variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2$", + "variable_workflow_02LCRAQ5WICDM3PgxFwKyi19yaeu1bTpVUx": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq$", + "variable_workflow_02LEUF5N782ES5q1O7K4p1AoMBPrkkcxi1E": false + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02LCR4UKH38PM6zDR4Bx2b2J165gCF1mhvh", + "workflow_name": "Meraki - Get Network By Name" }, "object_type": "definition_activity" }, { - "unique_name": "definition_activity_02M7XZMZ74LRQ63EGvzvETpm9aDNJ7QYsR1", - "name": "Completed", - "title": "Completed", - "type": "logic.completed", + "unique_name": "definition_activity_02PYK5VPXEWSO5RSV0KinD05aQCclZv5BRH", + "name": "Condition Block", + "title": "Is Network Found?", + "type": "logic.if_else", "base_type": "activity", "properties": { - "completion_type": "failed-completed", + "conditions": [], "continue_on_failure": false, - "display_name": "Completed", - "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "description": "Validates that the network was successfully found before proceeding with firmware queries.", + "display_name": "Is Network Found?", "skip_execution": false }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYLIFDS10246F4non6pLnBPBeKn6M4Hvs", + "name": "Condition Branch", + "title": "Network Found", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCS9H7YNIYX1GDaReaAe3aek2b4CnpPEW$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Network lookup successful", + "display_name": "Network Found", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PEOH4UMTQ7T1GVwglfqrY6D6A5FZRlOop", + "name": "Group", + "title": "Find Firmware for Network", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Retrieves firmware data, processes to remove current versions from upgrade lists, and formats output for all device types.", + "display_as_suggestion": false, + "display_name": "Find Firmware for Network", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt", + "name": "Get Network Firmware Upgrades", + "title": "Get Network Firmware Upgrades", + "type": "workflow.atomic_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Retrieves raw firmware upgrade data for the network using Meraki atomic.", + "display_name": "Get Network Firmware Upgrades", + "input": { + "variable_workflow_02LV1H3CNM5T45adfzDFwEeMjrKbmdHd58D": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6", + "workflow_name": "Meraki - Get Network Firmware Upgrades" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PYK5VVYSATE4J6abUrIud4Cbm26oCiwHX", + "name": "Condition Block", + "title": "Validate Firmware Data Retrieved", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validates that firmware data was successfully retrieved before proceeding with processing.", + "display_name": "Validate Firmware Data Retrieved", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYLK1OLP6721UsBBwfRaGOF1PjvaI27T9", + "name": "Condition Branch", + "title": "Success", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Firmware data retrieval failed - set error outputs and terminate workflow.", + "display_name": "Success", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p", + "name": "JSONPath Query", + "title": "Parse Output", + "type": "corejava.jsonpathquery", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": true, + "description": "Parses firmware data using JSONPath to extract version details for each device type. Continues on failure to handle missing device types gracefully.", + "display_name": "Parse Output", + "input_json": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNMB7K2eIEUcLniuSFXAmkGIOQJ2$", + "jsonpath_queries": [ + { + "jsonpath_query": ".products.appliance.currentVersion.id", + "jsonpath_query_name": "applianceCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.appliance.currentVersion.shortName", + "jsonpath_query_name": "applianceCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.appliance", + "jsonpath_query_name": "applianceDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch.currentVersion.id", + "jsonpath_query_name": "switchCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch.currentVersion.shortName", + "jsonpath_query_name": "switchCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch", + "jsonpath_query_name": "switchDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless.currentVersion.id", + "jsonpath_query_name": "wirelessCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless.currentVersion.shortName", + "jsonpath_query_name": "wirelessCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless", + "jsonpath_query_name": "wirelessDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + } + ], + "skip_execution": false, + "skip_path": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PYK5W0XEWSO5RSV0KinD05aQCclZv5BRH", + "name": "Condition Block", + "title": "Validate JSONPath Results", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validates JSONPath parsing results and handles any failures by providing default values for missing device types.", + "display_name": "Validate JSONPath Results", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYK5W1JMDSF5ESkvsZQVY94LjCs3jQbHu", + "name": "Condition Branch", + "title": "JSONPath Failed", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.succeeded$", + "operator": "eq", + "right_operand": false + }, + "continue_on_failure": false, + "description": "JSONPath parsing failed - set default empty values for all device types.", + "display_name": "JSONPath Failed", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5W2JACY04QBD6lQGzESHLHYeadvaZe", + "name": "Set Variables", + "title": "Set Default Values", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set default empty values for failed JSONPath parsing.", + "display_name": "Set Default Values", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "variable_value_new": "Network firmware check completed with limited device types available." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Network firmware check completed with limited device types available." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Failed" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q0VAR7Z9KPL1nIoC9KGwuyxoY8x5BFfnt", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Completed action", + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P", + "name": "Execute Python Script", + "title": "Identify Available Versions", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Processes firmware data to remove current versions from available upgrade lists and filter unnecessary attributes.", + "display_name": "Identify Available Versions", + "script": "import sys\nimport json\n\n####################\n# This section establishes some inputs and local variables we need for later\n####################\n\n# Note when you have one item as input you need extra comma - it's not a mistake\n(mxDetails,msDetails,mrDetails) = sys.argv[1:4]\n\ndef remove_current_version_and_attributes(json_data):\n \"\"\"\n Removes the current version from the list of available versions and\n excludes 'releaseDate' and 'firmware' attributes from the output JSON.\n Handles missing/empty device types gracefully.\n\n Parameters:\n json_data (str): The JSON data as a string.\n\n Returns:\n tuple: (updated_json_str, no_available_versions_flag)\n - updated_json_str: The updated JSON data as a string or appropriate message for missing devices\n - no_available_versions_flag: Boolean indicating if current version is the only available version\n \"\"\"\n # Handle null, empty, or invalid inputs\n if not json_data or json_data == 'null' or json_data.strip() == '' or json_data == 'None':\n return \"No devices of this type found in the network.\", False\n \n try:\n # Parse the JSON string into a Python dictionary\n data = json.loads(json_data)\n \n # Handle empty or null parsed data\n if not data or data is None:\n return \"No devices of this type found in the network.\", False\n \n # Check if required keys exist\n if 'currentVersion' not in data or not data['currentVersion']:\n return \"No current version information available for this device type.\", False\n \n if 'id' not in data['currentVersion']:\n return \"Invalid current version data for this device type.\", False\n \n # Find the current version ID\n current_version_id = data['currentVersion']['id']\n \n # Handle missing availableVersions key\n if 'availableVersions' not in data:\n data['availableVersions'] = []\n \n # Check if current version is the only available version\n available_version_ids = [version.get('id') for version in data['availableVersions'] if version.get('id')]\n no_available_versions = len(available_version_ids) == 1 and current_version_id in available_version_ids\n \n # Remove the current version and filter out specific attributes\n data['availableVersions'] = [\n # iterate over each element in available versions and remove extra elements\n {key: version[key] for key in version if key not in ['releaseDate', 'firmware']}\n for version in data['availableVersions']\n if version.get('id') != current_version_id\n ]\n \n # Remove from final JSON (safely handle missing keys)\n data.pop('currentVersion', None)\n data.pop('lastUpgrade', None)\n data.pop('nextUpgrade', None)\n data.pop('isUpgradeAvailable', None)\n data.pop('participateInNextBetaRelease', None)\n \n # Check if 'availableVersions' is an empty list\n if not data['availableVersions']:\n return \"Running the latest firmware.\", no_available_versions\n else:\n # Keep the original data if not empty\n # Return the updated JSON data as a string\n return json.dumps(data, indent=4), no_available_versions\n \n except json.JSONDecodeError:\n return \"Invalid JSON data for this device type.\", False\n except KeyError as e:\n return f\"Missing required data field: {str(e)}\", False\n except Exception as e:\n return f\"Error processing device data: {str(e)}\", False\n\n# Process each device type and capture both JSON and boolean results\napplianceResult, applianceNoVersions = remove_current_version_and_attributes(mxDetails)\nswitchResult, switchNoVersions = remove_current_version_and_attributes(msDetails)\nwirelessResult, wirelessNoVersions = remove_current_version_and_attributes(mrDetails)\n\n# Set the JSON results for backward compatibility\napplianceAvailableVersionsJson = applianceResult\nswitchAvailableVersionsJson = switchResult\nwirelessAvailableVersionsJson = wirelessResult\n\n# Set individual boolean flags for each product type (using positive logic)\n# True = upgrades available, False = no upgrades available\napplianceHasUpgradeAvailable = not applianceNoVersions\nswitchHasUpgradeAvailable = not switchNoVersions\nwirelessHasUpgradeAvailable = not wirelessNoVersions\n", + "script_arguments": [ + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceDetails$", + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchDetails$", + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessDetails$" + ], + "script_queries": [ + { + "script_query": "applianceAvailableVersionsJson", + "script_query_name": "applianceAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "switchAvailableVersionsJson", + "script_query_name": "switchAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "wirelessAvailableVersionsJson", + "script_query_name": "wirelessAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "applianceHasUpgradeAvailable", + "script_query_name": "applianceHasUpgradeAvailable", + "script_query_type": "boolean" + }, + { + "script_query": "switchHasUpgradeAvailable", + "script_query_name": "switchHasUpgradeAvailable", + "script_query_type": "boolean" + }, + { + "script_query": "wirelessHasUpgradeAvailable", + "script_query_name": "wirelessHasUpgradeAvailable", + "script_query_type": "boolean" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M3KCC16KVL679xGr1IX2USKsfHp7EFzVx", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Sets output variables with processed firmware information and summary results.", + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.applianceAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionShortName$ (ID: $activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.switchAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.wirelessAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "variable_value_new": "Appliance Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$\nAppliance Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$\n------------------------------------\nSwitch Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$\nSwitch Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$\n------------------------------------\nWireless Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$\nWireless Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$\n------------------------------------" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 200 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Success" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYYLS61FZLF0ryAp4sqcDyP4E8mhuheHl$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.applianceHasUpgradeAvailable$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3N3D6E9MRS0zGiJk4LnOpQ2TuV3wX4yZ$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.switchHasUpgradeAvailable$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3N4E7F0NST1AHjKl5MoQpR3UvW4xY5zA$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.wirelessHasUpgradeAvailable$" + } + ] + }, + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02PYK5VWKXWO03SwInni34FV61tFGMogA14", + "name": "Condition Branch", + "title": "Firmware Data Failed", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Firmware data retrieval failed - set error outputs and terminate workflow.", + "display_name": "Firmware Data Failed", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5VXKM0224WPCi8cJLvdfvalA1JFJt9", + "name": "Set Variables", + "title": "Set Firmware Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error outputs for firmware data retrieval failure.", + "display_name": "Set Firmware Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Firmware Data Retrieval Failed" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl$", + "variable_value_new": "Failed to retrieve firmware data for network. Error: $activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNMB7K7L2YWKcivCpvRDwhECTDqR$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Failed: Firmware data retrieval error" + } + ] + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02PYK5VQJMDSF5ESkvsZQVY94LjCs3jQbHu", + "name": "Condition Branch", + "title": "Network Not Found", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCS9H7YNIYX1GDaReaAe3aek2b4CnpPEW$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Network lookup failed - set error outputs and terminate workflow.", + "display_name": "Network Not Found", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5VRJACY04QBD6lQGzESHLHYeadvaZe", + "name": "Set Variables", + "title": "Set Network Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error outputs for network not found.", + "display_name": "Set Network Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 404 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Network Not Found" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl$", + "variable_value_new": "Network '$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq$' not found in organization. Error details: $activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCSAES32AOH7RGaVHj5aM3SixcS34Qdqc$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Failed: Network not found" + } + ] + }, + "object_type": "definition_activity" + } + ] + } + ] } ] } + ], + "categories": [ + "category_02M5I40Y7XSOX59ZtwCZnsrkS73sAGa3w1t" ] - } - ], - "categories": [ - "category_02M5I40Y7XSOX59ZtwCZnsrkS73sAGa3w1t" - ] - }, + }, + "atomic_workflows": [ + "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6" + ], + "dependent_workflows": [ + "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", + "definition_workflow_02LCR4UKH38PM6zDR4Bx2b2J165gCF1mhvh", + "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6" + ] + } + ], "atomic_workflows": [ "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF" ], "dependent_workflows": [ "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", "definition_workflow_02LCR4UKH38PM6zDR4Bx2b2J165gCF1mhvh", + "definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF", "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF" ] } \ No newline at end of file diff --git a/Meraki/ScheduleFirmwareUpgradeForNetworksByTag__definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD/definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.json b/Meraki/ScheduleFirmwareUpgradeForNetworksByTag__definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD/definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.json index 9f1e042..a4e1c20 100644 --- a/Meraki/ScheduleFirmwareUpgradeForNetworksByTag__definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD/definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.json +++ b/Meraki/ScheduleFirmwareUpgradeForNetworksByTag__definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD/definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.json @@ -7,21 +7,19 @@ "base_type": "workflow", "variables": [ { - "schema_id": "variable_type_array_01JhSTW61I3ZU2IfL7dwQox83eFDzE1qUiA", + "schema_id": "datatype.string", "properties": { - "value": [ - "classroom" - ], + "value": "", "scope": "input", - "name": "List of Network Tags to Search", - "type": "datatype.array", - "description": "Provide a list of network tags to search. Only networks in the user's organization with at least one matching tag from this list will be included. Note: The filtering is case-sensitive.\nExample:\n[\n \"classroom\", \"cafe\"\n]", + "name": "Wireless Version ID to Upgrade", + "type": "datatype.string", + "description": "The Version ID is a unique identifier for a specific firmware version in the Cisco Meraki system. Leave the field empty to skip scheduling the product type.\n\nTo find the available Version IDs for your network, use the \"Check Available Firmware for Network\" workflow.\n\nExample: 4532 might correspond to firmware version MR 15.1.1.", "is_required": false, "display_on_wizard": false, "is_invisible": false, - "variable_string_format": "" + "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M7ZT2FW7KP67B68QGgkYqXkJDUxuhPU0Y", + "unique_name": "variable_workflow_02M80QC4GKP121LnGTN1qZd0Y8MmbDofKGt", "object_type": "variable_workflow" }, { @@ -29,31 +27,63 @@ "properties": { "value": "", "scope": "input", - "name": "Input - Switch Version ID to Upgrade", + "name": "Upgrade Date Time", "type": "datatype.string", - "description": "The Version ID is a unique identifier for a specific firmware version in the Cisco Meraki system. Leave the field empty to skip scheduling the product type.\n\nTo find the available Version IDs for your network, use the \"Check Available Firmware for Network\" workflow.\n\nExample: 4531 might correspond to firmware version MS 15.1.1.", + "description": "The date and time for the next firmware upgrade in the network. The upgrade for network devices is scheduled using the network's timezone to ensure they get the latest updates. If no date-time is given, it will be set to the next 5 minutes. The upgrade can be scheduled up to 1 month from today, and all devices will use the same date and time. \nExample: YYYY-MM-DD HH:MM:SS", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M80Q4SYT9IL3tmfMRYvFyBHUB7jGJinNn", + "unique_name": "variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { - "value": "4952", - "scope": "input", - "name": "Input - Wireless Version ID to Upgrade", + "value": "", + "scope": "output", + "name": "Result", "type": "datatype.string", - "description": "The Version ID is a unique identifier for a specific firmware version in the Cisco Meraki system. Leave the field empty to skip scheduling the product type.\n\nTo find the available Version IDs for your network, use the \"Check Available Firmware for Network\" workflow.\n\nExample: 4532 might correspond to firmware version MR 15.1.1.", + "description": "Comprehensive summary of firmware upgrade scheduling results, including successful and failed network upgrades with detailed information.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M80QC4GKP121LnGTN1qZd0Y8MmbDofKGt", + "unique_name": "variable_workflow_02MLIQ98QXVS92qpmOxIVvAtEREVZqkc0Ay", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.integer", + "properties": { + "value": 0, + "scope": "output", + "name": "Status Code", + "type": "datatype.integer", + "description": "The HTTP status code of the workflow execution.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02Q0RX6R2LHQP2DiJMpvoWSg7M1gkVzmFGi", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Status Message", + "type": "datatype.string", + "description": "The status message of the workflow execution.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02Q0RX6R2M6L34pYKn5ELjrxxOI5k8ralWJ", "object_type": "variable_workflow" }, { @@ -63,6 +93,7 @@ "scope": "local", "name": "Temp Message", "type": "datatype.string", + "description": "Temporary variable used to accumulate and format output messages from multiple network processing operations.", "is_required": false, "display_on_wizard": false, "is_invisible": false, @@ -74,9 +105,9 @@ { "schema_id": "datatype.string", "properties": { - "value": "5149", + "value": "", "scope": "input", - "name": "Input - Appliance Version ID to Upgrade", + "name": "Appliance Version ID to Upgrade", "type": "datatype.string", "description": "The Version ID is a unique identifier for a specific firmware version in the Cisco Meraki system. Leave the field empty to skip scheduling the product type.\n\nTo find the available Version IDs for your network, use the \"Check Available Firmware for Network\" workflow.\n\nExample: 4532 might correspond to firmware version MX 15.1.1.\n", "is_required": false, @@ -90,17 +121,17 @@ { "schema_id": "datatype.string", "properties": { - "value": "2025-06-12 14:30:00", + "value": "", "scope": "input", - "name": "Input - Upgrade Date Time", + "name": "Switch Version ID to Upgrade", "type": "datatype.string", - "description": "The date and time for the next firmware upgrade in the network. The upgrade for network devices is scheduled using the network's timezone to ensure they get the latest updates. If no date-time is given, it will be set to the next 5 minutes. The upgrade can be scheduled up to 1 month from today, and all devices will use the same date and time. \nExample: 2025-05-20 14:30:00", + "description": "The Version ID is a unique identifier for a specific firmware version in the Cisco Meraki system. Leave the field empty to skip scheduling the product type.\n\nTo find the available Version IDs for your network, use the \"Check Available Firmware for Network\" workflow.\n\nExample: 4531 might correspond to firmware version MS 15.1.1.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM", + "unique_name": "variable_workflow_02M80Q4SYT9IL3tmfMRYvFyBHUB7jGJinNn", "object_type": "variable_workflow" }, { @@ -108,14 +139,31 @@ "properties": { "value": "", "scope": "output", - "name": "Output - Summary Results", + "name": "Error Message", "type": "datatype.string", + "description": "The error message if the workflow fails.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02MLIQ98QXVS92qpmOxIVvAtEREVZqkc0Ay", + "unique_name": "variable_workflow_02Q0RX6R2LYDU17lJxlhjIjzrYGgemnddxA", + "object_type": "variable_workflow" + }, + { + "schema_id": "variable_type_array_01JhSTW61I3ZU2IfL7dwQox83eFDzE1qUiA", + "properties": { + "value": [], + "scope": "input", + "name": "Network Tags to Search", + "type": "datatype.array", + "description": "Provide a list of network tags to search. Only networks in the user's organization with at least one matching tag from this list will be included. Note: The filtering is case-sensitive.\nExample:\n[\n \"example-tag\", \"another-tag\"\n]", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M7ZT2FW7KP67B68QGgkYqXkJDUxuhPU0Y", "object_type": "variable_workflow" } ], @@ -127,7 +175,7 @@ "type": [] }, "delete_workflow_instance": false, - "description": "This workflow allows users to schedule firmware upgrade for one or more networks based on input tags. The workflow first identifies the networks that has the input tags. The workflow queries networks across organization that the user has access.\nThe workflow currently provides firmware upgrade options for Appliance, Switch, Wireless devices in the network.\nThe workflow upgrades all the networks on the same Date \u0026 time.", + "description": "This workflow allows users to schedule firmware upgrades for one or more networks based on input tags. The workflow first identifies networks that have the input tags, then queries networks across organizations that the user has access to.\n\nThe workflow currently provides firmware upgrade options for Appliance, Switch, and Wireless devices in the network. All networks are upgraded on the same date and time.\n\nPrerequisites:\n- User must have network admin privileges for target organizations\n- Target networks must exist and have the specified tags\n\nLimitations:\n- Maximum 1000 networks per organization query\n- Upgrades scheduled for same date/time across all networks\n- Case-sensitive tag matching\n- Requires existing firmware version IDs", "display_name": "Schedule Firmware Upgrade for Networks by Tag", "runtime_user": { "override_target_runtime_user": false, @@ -142,353 +190,798 @@ "object_type": "definition_workflow", "actions": [ { - "unique_name": "definition_activity_02M7ZE6UBFLC30u6gAWymgglirsvu7TPGM2", - "name": "Get Organizations", - "title": "Get Organizations", - "type": "workflow.atomic_workflow", - "base_type": "subworkflow", - "properties": { - "continue_on_failure": false, - "description": "Retrieve a list of organizations that the authenticated user has access to within their Meraki account. \n", - "display_name": "Get Organizations", - "input": { - "variable_workflow_02LXK9KUOD0MH4qj4j062vm12gYmFb9y5N0": 100, - "variable_workflow_02LXKBG6HGMSD1YojnHQ3bM2cT6mP8A02A9": "", - "variable_workflow_02LXKCCX4AREX6odSHkvY5oECunJtqcLahK": "" - }, - "runtime_user": { - "target_default": true - }, - "skip_execution": false, - "target": { - "target_type": "meraki.endpoint", - "use_workflow_target": true - }, - "workflow_id": "definition_workflow_02LV5GIDUTY3X0WhuidM5ZWhkjL8wQCGAPq", - "workflow_name": "Meraki - Get Organizations" - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02MI1ZCW9HIBS2B2s0fnDlr6tGk7KinmDME", - "name": "Condition Block", - "title": "Has Orgs?", - "type": "logic.if_else", + "unique_name": "definition_activity_02Q0RX6YHGRA46GbUGafQ8IlrshRncLUQYH", + "name": "Group", + "title": "Input Validation", + "type": "logic.group", "base_type": "activity", "properties": { - "conditions": [], "continue_on_failure": false, - "description": "Error checks to proceed with next steps only when Orgs are found for the Target selected.", - "display_name": "Has Orgs?", + "description": "Validate input parameters to ensure they meet required format and constraints.", + "display_as_suggestion": false, + "display_name": "Input Validation", "skip_execution": false }, "object_type": "definition_activity", - "blocks": [ + "actions": [ { - "unique_name": "definition_activity_02MI1ZCWFHN3C5Dauno8f354ls7gmFFLCn1", - "name": "Condition Branch", - "title": "Yes", - "type": "logic.condition_block", + "unique_name": "definition_activity_02Q0T8U5Z5P6C77MVUIrlij0vVkWpcHCOrf", + "name": "Parallel Block", + "title": "Validate Required Inputs", + "type": "logic.parallel", "base_type": "activity", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02M7ZE6UBFLC30u6gAWymgglirsvu7TPGM2.output.variable_workflow_02LXKZA6725S35QBWMZCg1AlZnT11mbSFQi$", - "operator": "ne", - "right_operand": "[]" - }, "continue_on_failure": false, - "display_name": "Yes", + "description": "Validate all required input parameters in parallel to ensure efficient error detection.", + "display_name": "Validate Required Inputs", "skip_execution": false }, "object_type": "definition_activity", - "actions": [ + "blocks": [ { - "unique_name": "definition_activity_02MI772R0CRCI5654Lsjjx5fGjJPyAW1IdC", - "name": "Group", - "title": "Fetch Networks", - "type": "logic.group", + "unique_name": "definition_activity_02Q0T8UAIUBXD1mPnMGmgPkIhXzpy0zJRf9", + "name": "Parallel Branch", + "title": "Check Tags are provided", + "type": "logic.parallel_block", "base_type": "activity", "properties": { "continue_on_failure": false, - "description": "Find Network matching input Tags.", - "display_as_suggestion": false, - "display_name": "Fetch Networks", + "display_name": "Check Tags are provided", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02M7ZEYFJSPJ27IvL5DEET1taQhSeE3TImo", - "name": "Read Table from JSON", - "title": "Read Organizations from JSON", - "type": "corejava.read_table_from_json", + "unique_name": "definition_activity_02Q0TGU1O6LPA0zt1pZmSqgQNdAtkzlaOpi", + "name": "Execute Python Script", + "title": "Validate Network Tags Array", + "type": "python3.script", "base_type": "activity", "properties": { "action_timeout": 180, "continue_on_failure": false, - "display_name": "Read Organizations from JSON", - "input_json": "$activity.definition_activity_02M7ZE6UBFLC30u6gAWymgglirsvu7TPGM2.output.variable_workflow_02LXKZA6725S35QBWMZCg1AlZnT11mbSFQi$", - "jsonpath_query": "$.*", - "persist_output": true, - "populate_columns": false, - "skip_execution": false, - "table_columns": [ + "description": "Validates that the network tags array is not empty and contains valid tag values for network discovery.", + "display_name": "Validate Network Tags Array", + "script": "import sys\nimport json\n\n# Get the network tags input\ntags_input = sys.argv[1]\n\n# Check if array is empty\nif tags_input == \"[]\":\n isValid = False\n errorMessage = \"Network tags array is empty. At least one tag must be provided.\"\nelse:\n isValid = True\n errorMessage = \"\"", + "script_arguments": [ + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M7ZT2FW7KP67B68QGgkYqXkJDUxuhPU0Y$" + ], + "script_queries": [ { - "column_name": "id", - "column_type": "string" + "script_query": "isValid", + "script_query_name": "isValid", + "script_query_type": "boolean" }, { - "column_name": "name", - "column_type": "string" + "script_query": "errorMessage", + "script_query_name": "errorMessage", + "script_query_type": "string" } - ] + ], + "skip_execution": false }, "object_type": "definition_activity" }, { - "unique_name": "definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf", - "name": "For Each", - "title": "For Each Org", - "type": "logic.for_each", + "unique_name": "definition_activity_02Q0T8UBCQ87V4XPExRaMtRb7Biw0xHMKPJ", + "name": "Condition Block", + "title": "Has Tags?", + "type": "logic.if_else", "base_type": "activity", "properties": { + "conditions": [], "continue_on_failure": false, - "display_name": "For Each Org", - "skip_execution": false, - "source_array": "$activity.definition_activity_02M7ZEYFJSPJ27IvL5DEET1taQhSeE3TImo.output.read_table_from_json$" + "display_name": "Has Tags?", + "skip_execution": false }, "object_type": "definition_activity", - "actions": [ + "blocks": [ { - "unique_name": "definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd", - "name": "Get Organization Networks", - "title": "Get Organization Networks", - "type": "workflow.atomic_workflow", - "base_type": "subworkflow", + "unique_name": "definition_activity_02Q0T8UC1CTE46Ec7MqgmqpYSlsli58hdPX", + "name": "Condition Branch", + "title": "No Tags Provided", + "type": "logic.condition_block", + "base_type": "activity", "properties": { - "continue_on_failure": false, - "description": "List the networks that the user has privileges on in an organization", - "display_name": "Get Organization Networks", - "input": { - "variable_workflow_02L9TZH6C81473IDtFQ0NIzW3jmXrgchtN9": "$activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].id$", - "variable_workflow_02LEUL5GOHN9T53T7jFQx3T2Yo04p5Xuz0r": false, - "variable_workflow_02LNK5WW0RD2A20mG7v1G7gsyE2N2RrKdQd": "", - "variable_workflow_02LNK5WW0RTCB1AXbOwJOBVWvUx1wdyKtkt": "withAnyTags", - "variable_workflow_02LNK5WW0S5E21Q9biFSXTiLbHr7cWP2K7y": false, - "variable_workflow_02LNK5WW0SE2H1zmchhUHyfX7L0XGvKmB7W": 1000, - "variable_workflow_02LNK5WW0SM7R5SjIvnnytN6vYzR7wfDHeE": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M7ZT2FW7KP67B68QGgkYqXkJDUxuhPU0Y$", - "variable_workflow_02LNK5WW0STMX38BXiY2IvPQoHQliJHSCgE": [], - "variable_workflow_02LNK5WW0T0NX26NyApdlTn355uYJwcQGqW": "", - "variable_workflow_02LNK5WW0T92U1HJd1sxzFrmVvwxy7NVaQn": "" + "condition": { + "left_operand": "$activity.definition_activity_02Q0TGU1O6LPA0zt1pZmSqgQNdAtkzlaOpi.output.script_queries.isValid$", + "operator": "eq", + "right_operand": false }, - "runtime_user": { - "target_default": true + "continue_on_failure": false, + "description": "Handle validation failure when no network tags are provided by the user.", + "display_name": "No Tags Provided", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q0T8UDAHVEC3qUDsw3worGBHI2NxGNK14", + "name": "Set Variables", + "title": "Set Tag Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error output variables when network tags validation fails.", + "display_name": "Set Tag Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LYDU17lJxlhjIjzrYGgemnddxA$", + "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LYDU17lJxlhjIjzrYGgemnddxA$\n$activity.definition_activity_02Q0TGU1O6LPA0zt1pZmSqgQNdAtkzlaOpi.output.script_queries.errorMessage$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2M6L34pYKn5ELjrxxOI5k8ralWJ$", + "variable_value_new": "Failed" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LHQP2DiJMpvoWSg7M1gkVzmFGi$", + "variable_value_new": "400" + } + ] + }, + "object_type": "definition_activity" }, - "skip_execution": false, - "target": { - "target_type": "meraki.endpoint", - "use_workflow_target": true + { + "unique_name": "definition_activity_02Q0T8UE1O2I65t8KA4W7Yo9vEDKdhi9kao", + "name": "Completed", + "title": "End on Tag Validation Error", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Terminate workflow execution when network tags validation fails.", + "display_name": "End on Tag Validation Error", + "result_message": "Network tags validation failed", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02Q0TDMMP700M7hypgie0Jmsbp8dJSR5OiE", + "name": "Parallel Branch", + "title": "Check Version IDs", + "type": "logic.parallel_block", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Validate that at least one firmware version ID is provided for upgrade scheduling.", + "display_name": "Check Version IDs", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q0TDMMQEMW95ibPbLJY8UW5I4zDaZ5CjG", + "name": "Condition Block", + "title": "Has Version IDs?", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Check if at least one firmware version ID (MX, MS, or MR) is provided for upgrade scheduling.", + "display_name": "Has Version IDs?", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02Q0TDMMRSSDE23yXdk1cdPs9wApesigFgO", + "name": "Condition Branch", + "title": "No Version IDs Provided", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": { + "left_operand": { + "left_operand": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80PYJ5OJOQ1TZAtY1z1PcWdWbFsoSpTz$", + "operator": "eq", + "right_operand": "" + }, + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80Q4SYT9IL3tmfMRYvFyBHUB7jGJinNn$", + "operator": "eq", + "right_operand": "" + } + }, + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QC4GKP121LnGTN1qZd0Y8MmbDofKGt$", + "operator": "eq", + "right_operand": "" + } }, - "workflow_id": "definition_workflow_02L9TZH5W95870XebPF2g8kSyIYcawUvljX", - "workflow_name": "Meraki - Get Organization Networks" + "continue_on_failure": false, + "description": "Handle validation failure when no firmware version IDs are provided by the user.", + "display_name": "No Version IDs Provided", + "skip_execution": false }, - "object_type": "definition_activity" - }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q0TDMMVI9NY7L01aQ87rjieqpa0I5RvfI", + "name": "Set Variables", + "title": "Set Version ID Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error output variables when firmware version ID validation fails.", + "display_name": "Set Version ID Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LYDU17lJxlhjIjzrYGgemnddxA$", + "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LYDU17lJxlhjIjzrYGgemnddxA$\nValidation failed: At least one firmware version ID (Appliance, Switch, or Wireless) must be provided to schedule upgrades." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2M6L34pYKn5ELjrxxOI5k8ralWJ$", + "variable_value_new": "Failed" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LHQP2DiJMpvoWSg7M1gkVzmFGi$", + "variable_value_new": "400" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q0TDMMYGA9Q2OURih7h9qJQufvaDyIvcp", + "name": "Completed", + "title": "End on Version ID Validation Error", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Terminate workflow execution when firmware version ID validation fails.", + "display_name": "End on Version ID Validation Error", + "result_message": "At least one firmware version ID must be provided", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02Q0T8UEO0WMY1Caaf5VgHTlVtw3motSFle", + "name": "Parallel Branch", + "title": "Check Date Format", + "type": "logic.parallel_block", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Validate upgrade date format when a custom date is provided.", + "display_name": "Check Date Format", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q0RX6ZG53ET0kb51Bzb7R1Zhlh3N2cQQw", + "name": "Condition Block", + "title": "Validate Date Format", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Check if upgrade date time is provided and in correct format (YYYY-MM-DD HH:MM:SS)", + "display_name": "Validate Date Format", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ { - "unique_name": "definition_activity_02MI24QT6XBHB54dHZreEhjcB72R3EkXH6d", - "name": "Condition Block", - "title": "Has Networks matching Tag?", - "type": "logic.if_else", + "unique_name": "definition_activity_02Q0RX6ZXS8UD6JGYFCrLnwbRihqH76n2Wu", + "name": "Condition Branch", + "title": "Date Provided", + "type": "logic.condition_block", "base_type": "activity", "properties": { - "conditions": [], + "condition": { + "left_operand": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM$", + "operator": "ne", + "right_operand": "" + }, "continue_on_failure": false, - "description": "Error check to proceed with next step only when there are matching networks.", - "display_name": "Has Networks matching Tag?", + "description": "Execute date format validation when a custom upgrade date/time is provided by the user.", + "display_name": "Date Provided", "skip_execution": false }, "object_type": "definition_activity", - "blocks": [ + "actions": [ { - "unique_name": "definition_activity_02MI24QT6Y0G03ACodDNeIB5md4qt7SW6Ky", - "name": "Condition Branch", - "title": "Yes", - "type": "logic.condition_block", + "unique_name": "definition_activity_02Q0RX70ONO5N59DXbgFKq5wp0NEZXiuI8R", + "name": "Execute Python Script", + "title": "Validate Date Format", + "type": "python3.script", "base_type": "activity", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd.output.variable_workflow_02L9TZH6C8OZI7c9t9Z0h0JHAbqCc7LuTGT$", - "operator": "ne", - "right_operand": "[]" - }, + "action_timeout": 180, + "continue_on_failure": false, + "description": "Validates the upgrade date time format. Accepts empty value or 'YYYY-MM-DD HH:MM:SS' format.", + "display_name": "Validate Date Format", + "script": "import re\nimport sys\nfrom datetime import datetime\n\n# Get the date time input\n(upgrade_datetime,) = sys.argv[1:2]\n\n# Initialize validation result\nvalid_date = True\nerror_message = ''\n\n# Check if date is empty (which is allowed)\nif not upgrade_datetime or upgrade_datetime.strip() == '':\n valid_date = True\n error_message = ''\nelse:\n # Validate the format using regex: YYYY-MM-DD HH:MM:SS\n date_pattern = r'^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$'\n \n if not re.match(date_pattern, upgrade_datetime):\n valid_date = False\n error_message = f'Invalid date format: \"{upgrade_datetime}\". Expected format: YYYY-MM-DD HH:MM:SS (e.g., 2025-05-20 14:30:00)'\n else:\n # Additional validation - try to parse the date to ensure it's a valid date\n try:\n datetime.strptime(upgrade_datetime, '%Y-%m-%d %H:%M:%S')\n valid_date = True\n error_message = ''\n except ValueError:\n valid_date = False\n error_message = f'Invalid date values: \"{upgrade_datetime}\". Please check month, day, hour, minute, and second values are valid.'", + "script_arguments": [ + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM$" + ], + "script_queries": [ + { + "script_query": "valid_date", + "script_query_name": "valid_date", + "script_query_type": "boolean" + }, + { + "script_query": "error_message", + "script_query_name": "error_message", + "script_query_type": "string" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q0T8UHV9LZQ6M0vJftpSfaJEpXqMifyfF", + "name": "Condition Block", + "title": "Date Format Valid?", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], "continue_on_failure": false, - "display_name": "Yes", + "description": "Check if the date format validation result indicates an invalid format.", + "display_name": "Date Format Valid?", "skip_execution": false }, "object_type": "definition_activity", - "actions": [ + "blocks": [ { - "unique_name": "definition_activity_02MI781PG8D074obqHQS8sGyDHPsYupUjDD", - "name": "Group", - "title": "Schedule Network", - "type": "logic.group", + "unique_name": "definition_activity_02Q0T8UILUP4X1wpZNRX3Z7tXgQj09Yp3I5", + "name": "Condition Branch", + "title": "Invalid Date Format", + "type": "logic.condition_block", "base_type": "activity", "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02Q0RX70ONO5N59DXbgFKq5wp0NEZXiuI8R.output.script_queries.valid_date$", + "operator": "eq", + "right_operand": false + }, "continue_on_failure": false, - "display_name": "Schedule Network", + "description": "Handle validation failure when the provided date format is invalid.", + "display_name": "Invalid Date Format", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02MIU3K2YL8AH0Sr894iDzuvtwlPFwYiJWa", + "unique_name": "definition_activity_02Q0T8UJOXYG02DwKUdpb73eu8mMzs099cW", "name": "Set Variables", - "title": "Set Ouput Messages", + "title": "Set Date Format Validation Error", "type": "core.set_multiple_variables", "base_type": "activity", "properties": { "continue_on_failure": false, - "display_name": "Set Ouput Messages", + "description": "Set error output variables when date format validation fails.", + "display_name": "Set Date Format Validation Error", "skip_execution": false, "variables_to_update": [ { - "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$", - "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$ \nResults for Organization: $activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].name$ " - } - ] - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02M7ZX7M3A87B5OQBKHfla6GUhcTCD4CUvL", - "name": "Read Table from JSON", - "title": "Read Networks from JSON", - "type": "corejava.read_table_from_json", - "base_type": "activity", - "properties": { - "action_timeout": 180, - "continue_on_failure": false, - "display_name": "Read Networks from JSON", - "input_json": "$activity.definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd.output.variable_workflow_02L9TZH6C8OZI7c9t9Z0h0JHAbqCc7LuTGT$", - "jsonpath_query": "$.*", - "persist_output": true, - "populate_columns": false, - "skip_execution": false, - "table_columns": [ + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LYDU17lJxlhjIjzrYGgemnddxA$", + "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LYDU17lJxlhjIjzrYGgemnddxA$\n$activity.definition_activity_02Q0RX70ONO5N59DXbgFKq5wp0NEZXiuI8R.output.script_queries.error_message$" + }, { - "column_name": "id", - "column_type": "string" + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2M6L34pYKn5ELjrxxOI5k8ralWJ$", + "variable_value_new": "Failed" }, { - "column_name": "name", - "column_type": "string" + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LHQP2DiJMpvoWSg7M1gkVzmFGi$", + "variable_value_new": "400" } ] }, "object_type": "definition_activity" }, { - "unique_name": "definition_activity_02M7ZWG3EFUQ12yJ8JMkR6BfZYCzQUGVj8f", - "name": "For Each", - "title": "For Each Network", - "type": "logic.for_each", + "unique_name": "definition_activity_02Q0T8UKK0UGK37awcIfNb75OXG0PkvVBe0", + "name": "Completed", + "title": "End on Date Format Validation Error", + "type": "logic.completed", "base_type": "activity", "properties": { + "completion_type": "failed-completed", "continue_on_failure": false, - "display_name": "For Each Network", - "skip_execution": false, - "source_array": "$activity.definition_activity_02M7ZX7M3A87B5OQBKHfla6GUhcTCD4CUvL.output.read_table_from_json$" + "description": "Terminate workflow execution when date format validation fails.", + "display_name": "End on Date Format Validation Error", + "result_message": "Invalid date format provided", + "skip_execution": false }, - "object_type": "definition_activity", - "actions": [ - { - "unique_name": "definition_activity_02M80271512QX6j2En2tSjJy4UfqV8maAVI", - "name": "Schedule Firmware Upgrade for Network", - "title": "Schedule Firmware Upgrade for Network", - "type": "workflow.sub_workflow", - "base_type": "subworkflow", - "properties": { - "continue_on_failure": true, - "display_name": "Schedule Firmware Upgrade for Network", - "input": { - "variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ": "$activity.definition_activity_02M7ZWG3EFUQ12yJ8JMkR6BfZYCzQUGVj8f.input.source_array[@].name$", - "variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ": "$activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].id$", - "variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM$", - "variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80Q4SYT9IL3tmfMRYvFyBHUB7jGJinNn$", - "variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80PYJ5OJOQ1TZAtY1z1PcWdWbFsoSpTz$", - "variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QC4GKP121LnGTN1qZd0Y8MmbDofKGt$", - "variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo": false - }, - "runtime_user": { - "target_default": true - }, - "skip_execution": false, - "target": { - "target_type": "meraki.endpoint", - "use_workflow_target": true - }, - "workflow_id": "definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M", - "workflow_name": "Schedule Firmware Upgrade for Network" - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02MIU392M8EM14vrZdoVHhXRzec8p0FJWu8", - "name": "Set Variables", - "title": "Set Ouput Messages", - "type": "core.set_multiple_variables", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "display_name": "Set Ouput Messages", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$", - "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$ \nNetwork: $activity.definition_activity_02M80271512QX6j2En2tSjJy4UfqV8maAVI.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$$activity.definition_activity_02M80271512QX6j2En2tSjJy4UfqV8maAVI.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$" - } - ] - }, - "object_type": "definition_activity" - } - ] + "object_type": "definition_activity" } ] } ] - }, - { - "unique_name": "definition_activity_02MITCURRS2SA53eC37hZny8ECUR2iDpJQZ", - "name": "Condition Branch", - "title": "No", - "type": "logic.condition_block", - "base_type": "activity", - "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd.output.variable_workflow_02L9TZH6C8OZI7c9t9Z0h0JHAbqCc7LuTGT$", - "operator": "eq", - "right_operand": "[]" - }, - "continue_on_failure": false, - "display_name": "No", - "skip_execution": false - }, - "object_type": "definition_activity", - "actions": [ - { - "unique_name": "definition_activity_02MITL87GEAQ63xDo6biCQruWNKMSBei7WP", - "name": "Set Variables", - "title": "Set Ouput Messages", - "type": "core.set_multiple_variables", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "display_name": "Set Ouput Messages", - "skip_execution": false, - "variables_to_update": [ - { + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02Q1OAEJCTBWF1w3jaCg2JON4HBb7UHHXeW", + "name": "Group", + "title": "Find Organizations", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Retrieve all organizations accessible to the authenticated API key and identify those containing networks with the specified tags for firmware upgrade targeting.", + "display_as_suggestion": false, + "display_name": "Find Organizations", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M7ZE6UBFLC30u6gAWymgglirsvu7TPGM2", + "name": "Get Organizations", + "title": "Get Organizations", + "type": "workflow.atomic_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": false, + "description": "Retrieve a list of organizations that the authenticated user has access to within their Meraki account. \n", + "display_name": "Get Organizations", + "input": { + "variable_workflow_02LXK9KUOD0MH4qj4j062vm12gYmFb9y5N0": 100, + "variable_workflow_02LXKBG6HGMSD1YojnHQ3bM2cT6mP8A02A9": "", + "variable_workflow_02LXKCCX4AREX6odSHkvY5oECunJtqcLahK": "" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02LV5GIDUTY3X0WhuidM5ZWhkjL8wQCGAPq", + "workflow_name": "Meraki - Get Organizations" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02MI1ZCW9HIBS2B2s0fnDlr6tGk7KinmDME", + "name": "Condition Block", + "title": "No Organizations Found?", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validate that organizations are available before proceeding with network discovery and firmware upgrade scheduling.", + "display_name": "No Organizations Found?", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02MI1ZCWFHN3C5Dauno8f354ls7gmFFLCn1", + "name": "Condition Branch", + "title": "Yes", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M7ZE6UBFLC30u6gAWymgglirsvu7TPGM2.output.variable_workflow_02LXKZA6725S35QBWMZCg1AlZnT11mbSFQi$", + "operator": "eq", + "right_operand": "[]" + }, + "continue_on_failure": false, + "description": "Process organizations when at least one organization is found for the authenticated user.", + "display_name": "Yes", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q1OCAZBQFCD5aj0Gns82nYcFsQXEwHoO7", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Terminate workflow execution when no organizations are found for the authenticated user.", + "display_name": "Completed", + "result_message": "No Organizations found.", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02MI772R0CRCI5654Lsjjx5fGjJPyAW1IdC", + "name": "Group", + "title": "Network Discovery and Firmware Scheduling", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Iterate through each organization to discover networks with matching tags, then schedule firmware upgrades for all qualifying networks. Handles both successful scheduling and organizations with no matching networks.", + "display_as_suggestion": false, + "display_name": "Network Discovery and Firmware Scheduling", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M7ZEYFJSPJ27IvL5DEET1taQhSeE3TImo", + "name": "Read Table from JSON", + "title": "Read Organizations from JSON", + "type": "corejava.read_table_from_json", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Parse the JSON response containing organizations to extract organization IDs and names for network discovery.", + "display_name": "Read Organizations from JSON", + "input_json": "$activity.definition_activity_02M7ZE6UBFLC30u6gAWymgglirsvu7TPGM2.output.variable_workflow_02LXKZA6725S35QBWMZCg1AlZnT11mbSFQi$", + "jsonpath_query": "$.*", + "persist_output": true, + "populate_columns": false, + "skip_execution": false, + "table_columns": [ + { + "column_name": "id", + "column_type": "string" + }, + { + "column_name": "name", + "column_type": "string" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf", + "name": "For Each", + "title": "For Each Org", + "type": "logic.for_each", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Iterate through each organization to discover networks with matching tags for firmware upgrade scheduling.", + "display_name": "For Each Org", + "skip_execution": false, + "source_array": "$activity.definition_activity_02M7ZEYFJSPJ27IvL5DEET1taQhSeE3TImo.output.read_table_from_json$" + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd", + "name": "Get Organization Networks", + "title": "Get Organization Networks", + "type": "workflow.atomic_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": false, + "description": "List the networks that the user has privileges on in an organization", + "display_name": "Get Organization Networks", + "input": { + "variable_workflow_02L9TZH6C81473IDtFQ0NIzW3jmXrgchtN9": "$activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].id$", + "variable_workflow_02LEUL5GOHN9T53T7jFQx3T2Yo04p5Xuz0r": false, + "variable_workflow_02LNK5WW0RD2A20mG7v1G7gsyE2N2RrKdQd": "", + "variable_workflow_02LNK5WW0RTCB1AXbOwJOBVWvUx1wdyKtkt": "withAnyTags", + "variable_workflow_02LNK5WW0S5E21Q9biFSXTiLbHr7cWP2K7y": "false", + "variable_workflow_02LNK5WW0SE2H1zmchhUHyfX7L0XGvKmB7W": 1000, + "variable_workflow_02LNK5WW0SM7R5SjIvnnytN6vYzR7wfDHeE": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M7ZT2FW7KP67B68QGgkYqXkJDUxuhPU0Y$", + "variable_workflow_02LNK5WW0STMX38BXiY2IvPQoHQliJHSCgE": [], + "variable_workflow_02LNK5WW0T0NX26NyApdlTn355uYJwcQGqW": "", + "variable_workflow_02LNK5WW0T92U1HJd1sxzFrmVvwxy7NVaQn": "" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02L9TZH5W95870XebPF2g8kSyIYcawUvljX", + "workflow_name": "Meraki - Get Organization Networks" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02MI24QT6XBHB54dHZreEhjcB72R3EkXH6d", + "name": "Condition Block", + "title": "Has Networks matching Tag?", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validate that networks with matching tags exist in the current organization before proceeding with firmware upgrade scheduling.", + "display_name": "Has Networks matching Tag?", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02MI24QT6Y0G03ACodDNeIB5md4qt7SW6Ky", + "name": "Condition Branch", + "title": "Yes", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd.output.variable_workflow_02L9TZH6C8OZI7c9t9Z0h0JHAbqCc7LuTGT$", + "operator": "ne", + "right_operand": "[]" + }, + "continue_on_failure": false, + "description": "Process networks when at least one network with matching tags is found in the current organization.", + "display_name": "Yes", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MI781PG8D074obqHQS8sGyDHPsYupUjDD", + "name": "Group", + "title": "Schedule Network Firmware", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Schedule firmware upgrades for each network found with matching tags. Calls the sub-workflow for each network and aggregates results.", + "display_name": "Schedule Network Firmware", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MIU3K2YL8AH0Sr894iDzuvtwlPFwYiJWa", + "name": "Set Variables", + "title": "Set Output Messages", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Initialize the output message with the current organization name being processed for network scheduling results.", + "display_name": "Set Output Messages", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$", + "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$ \nResults for Organization: $activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].name$ " + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7ZX7M3A87B5OQBKHfla6GUhcTCD4CUvL", + "name": "Read Table from JSON", + "title": "Read Networks from JSON", + "type": "corejava.read_table_from_json", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Parse the JSON response containing networks to extract network IDs and names for firmware upgrade scheduling.", + "display_name": "Read Networks from JSON", + "input_json": "$activity.definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd.output.variable_workflow_02L9TZH6C8OZI7c9t9Z0h0JHAbqCc7LuTGT$", + "jsonpath_query": "$.*", + "persist_output": true, + "populate_columns": false, + "skip_execution": false, + "table_columns": [ + { + "column_name": "id", + "column_type": "string" + }, + { + "column_name": "name", + "column_type": "string" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7ZWG3EFUQ12yJ8JMkR6BfZYCzQUGVj8f", + "name": "For Each", + "title": "For Each Network", + "type": "logic.for_each", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Iterate through each discovered network to schedule firmware upgrades for all matching networks in the current organization.", + "display_name": "For Each Network", + "skip_execution": false, + "source_array": "$activity.definition_activity_02M7ZX7M3A87B5OQBKHfla6GUhcTCD4CUvL.output.read_table_from_json$" + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M80271512QX6j2En2tSjJy4UfqV8maAVI", + "name": "Schedule Firmware Upgrade for Network", + "title": "Schedule Firmware Upgrade for Network", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Call the sub-workflow to schedule firmware upgrade for the current network, passing all required version IDs and scheduling parameters.", + "display_name": "Schedule Firmware Upgrade for Network", + "input": { + "variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ": "$activity.definition_activity_02M7ZWG3EFUQ12yJ8JMkR6BfZYCzQUGVj8f.input.source_array[@].name$", + "variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ": "$activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].id$", + "variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM$", + "variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80Q4SYT9IL3tmfMRYvFyBHUB7jGJinNn$", + "variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80PYJ5OJOQ1TZAtY1z1PcWdWbFsoSpTz$", + "variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QC4GKP121LnGTN1qZd0Y8MmbDofKGt$", + "variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo": false + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M", + "workflow_name": "Schedule Firmware Upgrade for Network" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02MIU392M8EM14vrZdoVHhXRzec8p0FJWu8", + "name": "Set Variables", + "title": "Set Output Messages", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Append the network upgrade result (success or failure) to the accumulated output message for summary reporting.", + "display_name": "Set Output Messages", + "skip_execution": false, + "variables_to_update": [ + { "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$", - "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$ \nOrganization: $activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].name$ has no matching tags." + "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$ \nNetwork: $activity.definition_activity_02M80271512QX6j2En2tSjJy4UfqV8maAVI.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$$activity.definition_activity_02M80271512QX6j2En2tSjJy4UfqV8maAVI.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$" } ] }, @@ -499,6 +992,47 @@ ] } ] + }, + { + "unique_name": "definition_activity_02MITCURRS2SA53eC37hZny8ECUR2iDpJQZ", + "name": "Condition Branch", + "title": "No", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M7ZOCUTOH5H3lJR3l5kVRBM3K1ale6WJd.output.variable_workflow_02L9TZH6C8OZI7c9t9Z0h0JHAbqCc7LuTGT$", + "operator": "eq", + "right_operand": "[]" + }, + "continue_on_failure": false, + "description": "Handle the case when no networks with matching tags are found in the current organization.", + "display_name": "No", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MITL87GEAQ63xDo6biCQruWNKMSBei7WP", + "name": "Set Variables", + "title": "Set Output Messages", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Record when an organization has no networks matching the specified tags for informational reporting.", + "display_name": "Set Output Messages", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$", + "variable_value_new": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$ \nOrganization: $activity.definition_activity_02M7ZGCH2FDLC5R9eeSbhahJ7kO4VDNNZXf.input.source_array[@].name$ has no matching tags." + } + ] + }, + "object_type": "definition_activity" + } + ] } ] } @@ -507,53 +1041,80 @@ ] }, { - "unique_name": "definition_activity_02MLI8JZX2NZG6HQCpfmGCpavVKhlpOi3jg", - "name": "Execute Python Script", - "title": "Prepare Summary Output", - "type": "python3.script", + "unique_name": "definition_activity_02Q1OJDB49Y3I5taWbMVIS4EzxJKUveFIRB", + "name": "Group", + "title": "Summarize Outputs", + "type": "logic.group", "base_type": "activity", "properties": { - "action_timeout": 180, "continue_on_failure": false, - "display_name": "Prepare Summary Output", - "script": "import re\nimport sys\n\n# Note when you have one item as input you need extra comma - its not a mistake\n(input_text, mxID, msID, mrID, dtime, tagsArr) = sys.argv[1:7]\n\n# Summary information \nsummary_info = {\n \"time_date\": dtime,\n \"appliance_version\": mxID, \n \"switch_version\": msID, \n \"wireless_version\": mrID,\n \"tags\": tagsArr\n}\n\ndef parse_meraki_output(text):\n results = {\n \"scheduled_upgrades\": [],\n \"failed_upgrades\": []\n }\n\n current_organization = None\n lines = text.splitlines()\n\n for line in lines:\n if line.startswith(\"Results for Organization:\"):\n # Extract current organization name\n current_organization = line.split(\"Results for Organization:\")[1].strip()\n elif line.startswith(\"Network:\") and \"upgrade is scheduled\" in line:\n # Extract scheduled network name\n network_name = re.search(r\"Network:\\s(.+?)\\supgrade is scheduled\", line)\n if network_name:\n results[\"scheduled_upgrades\"].append({\n \"organization\": current_organization,\n \"network\": network_name.group(1)\n })\n elif line.startswith(\"Network:\") and \"upgrade failed to schedule\" in line:\n # Extract failed network name and reason\n failed_match = re.search(r\"Network:\\s(.+?)\\supgrade failed to schedule\\.(.+)\", line)\n if failed_match:\n results[\"failed_upgrades\"].append({\n \"organization\": current_organization,\n \"network\": failed_match.group(1),\n \"reason\": failed_match.group(2).strip(\"[]\")\n })\n\n return results\n\ndef display_results(results, summary_info):\n sys.stdout.write(\"Network Firmware Schedule Ouput Summary:\")\n sys.stdout.write(f\"Schedule Time/Date: {summary_info['time_date']}\")\n sys.stdout.write(f\"Upgrade to Appliance version: {summary_info['appliance_version']}\")\n sys.stdout.write(f\"Upgrade to Switch version: {summary_info['switch_version']}\")\n sys.stdout.write(f\"Upgrade to Wireless version: {summary_info['wireless_version']}\")\n sys.stdout.write(f\"Matched Tags: {summary_info['tags']}\\n\")\n\n if results[\"scheduled_upgrades\"]:\n sys.stdout.write(\"Successfully Scheduled Firmware for:\")\n for item in results[\"scheduled_upgrades\"]:\n # Strip trailing whitespace or newlines from the organization and network names\n organization = item['organization'].strip()\n network = item['network'].strip()\n sys.stdout.write(f\"{organization} - {network}\\n\")\n\n sys.stdout.write(\"\\n\") # Add a single blank line after this section\n\n if results[\"failed_upgrades\"]:\n sys.stdout.write(\"Failed to Schedule Firmware for:\")\n for item in results[\"failed_upgrades\"]:\n # Strip trailing whitespace or newlines from all fields\n organization = item['organization'].strip()\n network = item['network'].strip()\n reason = item['reason'].strip()\n sys.stdout.write(f\"{organization} - {network} - {reason}\")\n\n# Parse and display results\nresults = parse_meraki_output(input_text)\ndisplay_results(results, summary_info)", - "script_arguments": [ - "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$", - "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80PYJ5OJOQ1TZAtY1z1PcWdWbFsoSpTz$", - "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80Q4SYT9IL3tmfMRYvFyBHUB7jGJinNn$", - "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QC4GKP121LnGTN1qZd0Y8MmbDofKGt$", - "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM$", - "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M7ZT2FW7KP67B68QGgkYqXkJDUxuhPU0Y$" - ], - "script_queries": [ - { - "script_query": "results", - "script_query_name": "results", - "script_query_type": "string" - } - ], + "description": "Process workflow execution results and generate a comprehensive summary report showing successful firmware upgrades, failures, and organizations without matching tags in a user-friendly format.", + "display_as_suggestion": false, + "display_name": "Summarize Outputs", "skip_execution": false }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02MMCPFEXN77P0cvk2zHdDwKM5IF3woK7VJ", - "name": "Set Variables", - "title": "Set Summary Output", - "type": "core.set_multiple_variables", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "display_name": "Set Summary Output", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02MLIQ98QXVS92qpmOxIVvAtEREVZqkc0Ay$", - "variable_value_new": "$activity.definition_activity_02MLI8JZX2NZG6HQCpfmGCpavVKhlpOi3jg.output.response_body$" - } - ] - }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MLI8JZX2NZG6HQCpfmGCpavVKhlpOi3jg", + "name": "Execute Python Script", + "title": "Prepare Summary Output", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Process and format the workflow results into a user-friendly summary report showing successful and failed firmware upgrades by organization and network.", + "display_name": "Prepare Summary Output", + "script": "import re\nimport sys\n\n# Note: When you have one item as input you need extra comma - it's not a mistake\n(input_text, mxID, msID, mrID, dtime, tagsArr) = sys.argv[1:7]\n\n# If dtime is empty, set as text \"5 minutes from now\"\nif not dtime:\n dtime = \"5 minutes from now\"\n\n# If tagsArr should be a string, keep as is. If you expect a list, split by comma:\n# tagsArr = tagsArr.split(\",\") if tagsArr else []\n\n# Summary information \nsummary_info = {\n \"time_date\": dtime,\n \"appliance_version\": mxID, \n \"switch_version\": msID, \n \"wireless_version\": mrID,\n \"tags\": tagsArr\n}\n\ndef parse_meraki_output(text):\n results = {\n \"scheduled_upgrades\": [],\n \"failed_upgrades\": [],\n \"no_matching_tags\": []\n }\n\n current_organization = None\n lines = text.splitlines()\n\n for line in lines:\n if line.startswith(\"Results for Organization:\"):\n # Extract current organization name\n current_organization = line.split(\"Results for Organization:\")[1].strip()\n elif line.startswith(\"Network:\") and \"upgrade is scheduled\" in line:\n # Extract scheduled network name\n network_name = re.search(r\"Network:\\s(.+?)\\supgrade is scheduled\", line)\n if network_name:\n results[\"scheduled_upgrades\"].append({\n \"organization\": current_organization,\n \"network\": network_name.group(1)\n })\n elif line.startswith(\"Network:\") and \"upgrade failed to schedule\" in line:\n # Extract failed network name and reason\n failed_match = re.search(r\"Network:\\s(.+?)\\supgrade failed to schedule\\.(.+)\", line)\n if failed_match:\n results[\"failed_upgrades\"].append({\n \"organization\": current_organization,\n \"network\": failed_match.group(1),\n \"reason\": failed_match.group(2).strip(\"[]\")\n })\n elif re.match(r\"Organization: .+ has no matching tags\\.\", line):\n # Extract organization name and add to no_matching_tags\n org_match = re.match(r\"Organization:\\s(.+)\\shas no matching tags\\.\", line)\n if org_match:\n org_name = org_match.group(1).strip()\n results[\"no_matching_tags\"].append(org_name)\n\n return results\n\ndef display_results(results, summary_info):\n sys.stdout.write(\"Network Firmware Schedule Output Summary:\")\n sys.stdout.write(f\"Schedule Time/Date: {summary_info['time_date']}\")\n sys.stdout.write(f\"Upgrade to Appliance version: {summary_info['appliance_version']}\")\n sys.stdout.write(f\"Upgrade to Switch version: {summary_info['switch_version']}\")\n sys.stdout.write(f\"Upgrade to Wireless version: {summary_info['wireless_version']}\")\n sys.stdout.write(f\"Matched Tags: {summary_info['tags']}\\n\")\n\n if results[\"scheduled_upgrades\"]:\n sys.stdout.write(\"Successfully Scheduled Firmware for: Organization Name - Network Name\\n\")\n for item in results[\"scheduled_upgrades\"]:\n organization = item['organization'].strip()\n network = item['network'].strip()\n sys.stdout.write(f\"{organization} - {network}\")\n sys.stdout.write(\"\\n\")\n\n if results[\"failed_upgrades\"]:\n sys.stdout.write(\"Failed to Schedule Firmware for: Organization Name - Network Name - Failure Reason\\n\")\n for item in results[\"failed_upgrades\"]:\n organization = item['organization'].strip()\n network = item['network'].strip()\n reason = item['reason'].strip()\n sys.stdout.write(f\"{organization} - {network} - {reason}\")\n sys.stdout.write(\"\\n\")\n\n # Section for Organizations with No Matching Tags\n if results.get(\"no_matching_tags\"):\n sys.stdout.write(\"No Tags match in Organizations:\\n\")\n for org in results[\"no_matching_tags\"]:\n sys.stdout.write(f\"{org}\")\n sys.stdout.write(\"\\n\")\n\n# Parse and display results\nresults = parse_meraki_output(input_text)\ndisplay_results(results, summary_info)", + "script_arguments": [ + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.local.variable_workflow_02MITDWATP3K83S7N0YHmU1k4Oz0ZF9tuFO$", + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80PYJ5OJOQ1TZAtY1z1PcWdWbFsoSpTz$", + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80Q4SYT9IL3tmfMRYvFyBHUB7jGJinNn$", + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QC4GKP121LnGTN1qZd0Y8MmbDofKGt$", + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M80QZ2QQFQZ2qdsJZEcSzZrj7mzQs8QDM$", + "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.input.variable_workflow_02M7ZT2FW7KP67B68QGgkYqXkJDUxuhPU0Y$" + ], + "script_queries": [ + { + "script_query": "results", + "script_query_name": "results", + "script_query_type": "string" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02MMCPFEXN77P0cvk2zHdDwKM5IF3woK7VJ", + "name": "Set Variables", + "title": "Set Summary Output", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set the final output variables with workflow execution results, including the formatted summary, status indicators, and error information.", + "display_name": "Set Summary Output", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02MLIQ98QXVS92qpmOxIVvAtEREVZqkc0Ay$", + "variable_value_new": "$activity.definition_activity_02MLI8JZX2NZG6HQCpfmGCpavVKhlpOi3jg.output.response_body$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2M6L34pYKn5ELjrxxOI5k8ralWJ$", + "variable_value_new": "Success" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M7Z8N486Z985yvnPOvF97ovjxUaJgGjFD.output.variable_workflow_02Q0RX6R2LHQP2DiJMpvoWSg7M1gkVzmFGi$", + "variable_value_new": "200" + } + ] + }, + "object_type": "definition_activity" + } + ] } ], "categories": [ @@ -574,14 +1135,15 @@ "properties": { "value": "", "scope": "input", - "name": "Input - Network Name", + "name": "Switch Version ID to Upgrade", "type": "datatype.string", - "is_required": true, + "description": "Specific firmware version ID for Meraki Switch (MS) devices to upgrade to. This must be a valid version ID available for the switches in your network. Use the 'Check Available Firmware for Network' workflow to identify compatible version IDs. Leave empty to use the latest available firmware version. Example: 4758 for MS firmware v15.21.1.", + "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ", + "unique_name": "variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N", "object_type": "variable_workflow" }, { @@ -589,24 +1151,25 @@ "properties": { "value": "", "scope": "output", - "name": "Output - Error Message", + "name": "Status Message", "type": "datatype.string", - "description": "The HTTP error message of the API response.", + "description": "Human-readable status message describing the firmware upgrade scheduling operation outcome. Provides clear success confirmation, partial completion details, or failure reasons. Essential for user feedback and workflow orchestration decision-making in automated deployments.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6", + "unique_name": "variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { - "value": "4727", + "value": "", "scope": "input", - "name": "Input - Appliance Version ID to Upgrade", + "name": "Appliance Version ID to Upgrade", "type": "datatype.string", + "description": "Specific firmware version ID for Meraki Security Appliance (MX) devices to upgrade to. This must be a valid version ID available for the appliances in your network. Use the 'Check Available Firmware for Network' workflow to identify compatible version IDs. Leave empty to use the latest available firmware version. Example: 4727 for MX firmware v18.107.2.", "is_required": false, "display_on_wizard": false, "is_invisible": false, @@ -618,16 +1181,17 @@ { "schema_id": "datatype.string", "properties": { - "value": "4952", + "value": "", "scope": "input", - "name": "Input - Wireless Version ID to Upgrade", + "name": "Organization ID or Name", "type": "datatype.string", - "is_required": false, + "description": "Meraki organization identifier - provide either the organization name (e.g., 'Acme Corporation') or the organization ID (e.g., '123456'). The workflow automatically detects the input type and resolves to the correct organization ID. Organization names are case-sensitive and must match exactly as they appear in the Meraki Dashboard.", + "is_required": true, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT", + "unique_name": "variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ", "object_type": "variable_workflow" }, { @@ -635,9 +1199,9 @@ "properties": { "value": "", "scope": "output", - "name": "Output - Result", + "name": "Result", "type": "datatype.string", - "description": "Raw API response.", + "description": "Complete JSON response from the Meraki Dashboard API containing detailed firmware upgrade scheduling results. Includes upgrade confirmation details, scheduled times, affected devices, and any warnings or additional information returned by the API for troubleshooting and audit purposes.", "is_required": false, "display_on_wizard": false, "is_invisible": false, @@ -646,19 +1210,35 @@ "unique_name": "variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr", "object_type": "variable_workflow" }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "input", + "name": "Wireless Version ID to Upgrade", + "type": "datatype.string", + "description": "Specific firmware version ID for Meraki Wireless Access Points (MR) devices to upgrade to. This must be a valid version ID available for the wireless devices in your network. Use the 'Check Available Firmware for Network' workflow to identify compatible version IDs. Leave empty to use the latest available firmware version. Example: 4952 for MR firmware v29.7.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT", + "object_type": "variable_workflow" + }, { "schema_id": "datatype.string", "properties": { "value": "", "scope": "local", - "name": "Local Organization ID", + "name": "MS ID", "type": "datatype.string", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT", + "unique_name": "variable_workflow_02PZZOFQTFANI5LoBVWZnJdR7p6CL07k1i5", "object_type": "variable_workflow" }, { @@ -666,8 +1246,9 @@ "properties": { "value": false, "scope": "input", - "name": "Input - Ignore Errors", + "name": "Ignore Errors", "type": "datatype.boolean", + "description": "Controls workflow behavior when encountering API errors or validation failures. When set to false (default), the workflow will terminate on first error with detailed error information. When set to true, the workflow continues processing and provides best-effort results despite errors.", "is_required": false, "display_on_wizard": false, "is_invisible": false, @@ -680,26 +1261,25 @@ "schema_id": "datatype.string", "properties": { "value": "", - "scope": "output", - "name": "Output - Status Code", + "scope": "local", + "name": "MR ID", "type": "datatype.string", - "description": "The HTTP status code of the API response.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8", + "unique_name": "variable_workflow_02PZZOBV3C7K00njLjGN4Zjj0wjpCW0SGhM", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { - "value": "2025-04-20 14:30:00", + "value": "", "scope": "input", - "name": "Input - Upgrade Date Time", + "name": "Upgrade Date Time", "type": "datatype.string", - "description": "The date and time for the next firmware upgrade in the network. The upgrade for network devices is scheduled using the network's timezone to ensure they get the latest updates. If no date-time is given, it will be set to the next 5 minutes. The upgrade can be scheduled up to 1 month from today, and all devices will use the same date and time. \nExample: 2025-05-20 14:30:00\n", + "description": "Scheduled date and time for the firmware upgrade in 'YYYY-MM-DD HH:MM:SS' format using the network's timezone. All devices in the network will be upgraded simultaneously at this time. If left empty, the upgrade will be scheduled for 5 minutes from now. Maximum scheduling window is 30 days from current date. Examples: '2025-05-20 14:30:00' for 2:30 PM on May 20th, '2025-12-15 02:00:00' for 2:00 AM maintenance window.", "is_required": false, "display_on_wizard": false, "is_invisible": false, @@ -712,48 +1292,79 @@ "schema_id": "datatype.string", "properties": { "value": "", - "scope": "input", - "name": "Input - Switch Version ID to Upgrade", + "scope": "local", + "name": "Local Organization ID", "type": "datatype.string", - "description": "Provide the Switch Firmware Version ID you want to upgrade to. You can find it by running the 'Check Available Firmware Versions' workflow. For example: 4758.", + "description": "Internal variable that stores the resolved Meraki organization ID after processing the input (organization name or ID). This variable ensures consistent organization identification throughout the workflow regardless of input format.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N", + "unique_name": "variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.integer", + "properties": { + "value": 0, + "scope": "output", + "name": "Status Code", + "type": "datatype.integer", + "description": "HTTP status code indicating the firmware upgrade scheduling operation result. Returns 200 for successful scheduling, 404 for network/organization not found, 400 for invalid parameters, and other standard HTTP codes for various error conditions. Essential for automated workflow decision-making.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { "value": "", - "scope": "output", - "name": "Output - Status Message", + "scope": "input", + "name": "Network Name", + "type": "datatype.string", + "description": "The exact name of the Meraki network where firmware upgrades will be scheduled. Must match an existing network within the specified organization. Network names are case-sensitive and must be provided exactly as they appear in the Meraki Dashboard.", + "is_required": true, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "local", + "name": "MX ID", "type": "datatype.string", - "description": "The HTTP status message of the API response.", "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV", + "unique_name": "variable_workflow_02PZZO7WI1FZX3TWhd6HR5Vuhw8CFIEZ4Jq", "object_type": "variable_workflow" }, { "schema_id": "datatype.string", "properties": { "value": "", - "scope": "input", - "name": "Input - Organization ID or Name", + "scope": "output", + "name": "Error Message", "type": "datatype.string", - "description": "An \"Organization ID\" is a unique identifier assigned to a specific organization. Provide the Organization ID or the Name of the Organization.", - "is_required": true, + "description": "Detailed error information when firmware upgrade scheduling fails. Contains specific API error messages, validation failures, or system issues to enable effective troubleshooting. Empty when workflow completes successfully, populated with diagnostic details when errors occur.", + "is_required": false, "display_on_wizard": false, "is_invisible": false, "variable_string_format": "text" }, - "unique_name": "variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ", + "unique_name": "variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6", "object_type": "variable_workflow" } ], @@ -762,7 +1373,7 @@ "is_atomic": false }, "delete_workflow_instance": false, - "description": "This workflow allows users to schedule firmware upgrade for one or more networks based on input tags. The workflow first identifies the networks that has the input tags. The workflows queries networks across organization that the user has access.\nThe workflow currently provides firmware upgrade options for Appliance, Switch, Wireless devices in the network.\n\n\n", + "description": "Schedules firmware upgrades for Meraki network devices including Security Appliances (MX), Switches (MS), and Wireless Access Points (MR). Accepts organization name or ID, locates the specified network, and schedules firmware upgrades with specified version IDs and timing. Supports flexible scheduling from immediate (5 minutes) to 30 days in advance using network timezone. \n\nAutomatically compares current firmware versions against target versions and only schedules upgrades when necessary. Multiple executions are safe - devices already running target versions are skipped with clear status reporting.\n\nUse 'Check Available Firmware for Network' workflow first to identify compatible firmware version IDs.", "display_name": "Schedule Firmware Upgrade for Network", "runtime_user": { "target_default": true @@ -775,153 +1386,560 @@ "object_type": "definition_workflow", "actions": [ { - "unique_name": "definition_activity_02M6JZVP05OG65tqeJlav9hEVYcW0OF8qpu", + "unique_name": "definition_activity_02Q09GI4H5AEJ1GZLwktLEc4zXg9U8t6N6g", "name": "Group", - "title": "Find Organization and Network", + "title": "Input Validation", "type": "logic.group", "base_type": "activity", "properties": { "continue_on_failure": false, - "description": "Lookup the the Organization and the Network within the Organization. ", + "description": "Validates firmware version ID inputs and provides helpful feedback if all version inputs are empty.", "display_as_suggestion": false, - "display_name": "Find Organization and Network", + "display_name": "Input Validation", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA", - "name": "Get Organization By Name", - "title": "Get Organization By Name", - "type": "workflow.sub_workflow", - "base_type": "subworkflow", - "properties": { - "continue_on_failure": true, - "display_name": "Get Organization By Name", - "input": { - "variable_workflow_02M605GTHU5L72i8goD4nuYixYOvQEFV7rN": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ$", - "variable_workflow_02M605GTI1LUG737lDLyzxnE9jwENJNQ08W": false - }, - "runtime_user": { - "target_default": true - }, - "skip_execution": false, - "target": { - "target_type": "meraki.endpoint", - "use_workflow_target": true - }, - "workflow_id": "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", - "workflow_name": "Meraki - Get Organization By Name" - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02M6HPRJG1K7U41B1j5MHl3N7AhJpHF4ul8", - "name": "Condition Block", - "title": "Was Input Org Name?", - "type": "logic.if_else", + "unique_name": "definition_activity_02Q0Q5CM32I1G4m2nIIaLjqPNXTj1LGemil", + "name": "Parallel Block", + "title": "Run Input Validations in Parallel", + "type": "logic.parallel", "base_type": "activity", "properties": { - "conditions": [], "continue_on_failure": false, - "display_name": "Was Input Org Name?", + "description": "Performs comprehensive input validation using parallel execution for improved performance. Three validation types run simultaneously: version ID input validation, upgrade date/time format validation, and firmware version ID format verification. This parallel approach reduces total validation time while ensuring all inputs meet required standards before proceeding with firmware upgrade operations.", + "display_name": "Run Input Validations in Parallel", "skip_execution": false }, "object_type": "definition_activity", "blocks": [ { - "unique_name": "definition_activity_02M6HPRJLFUAD4QDpPEenjH0rJOVlMxuss1", - "name": "Condition Branch", - "title": "Yes, Set ID from Get", - "type": "logic.condition_block", + "unique_name": "definition_activity_02Q0Q5CNEYPWM7butfY9tlUz1X1EPjzvU8M", + "name": "Parallel Branch", + "title": "Validate Valid Version IDs", + "type": "logic.parallel_block", "base_type": "activity", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", - "operator": "eq", - "right_operand": 200 - }, "continue_on_failure": false, - "display_name": "Yes, Set ID from Get", + "description": "Validates that at least one firmware version ID is provided for any device type (appliance, switch, or wireless). This validation runs in parallel with other input checks to improve workflow performance.", + "display_name": "Validate Valid Version IDs", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02M6HQLPWGM364f64fuS1qF3ohGzIVeBrSN", - "name": "Set Variables", - "title": "Set Local Org ID Variable", - "type": "core.set_multiple_variables", + "unique_name": "definition_activity_02Q09GI5GDZQT4tQjLnzlWHLvTPl3Iah0zE", + "name": "Condition Block", + "title": "Check Input Version IDs", + "type": "logic.if_else", "base_type": "activity", "properties": { "continue_on_failure": false, - "display_name": "Set Local Org ID Variable", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT$", - "variable_value_new": "$activity.definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA.output.variable_workflow_02M605GTJITQP1fcLQlR8CLYAHoMomGWZvE$" - } - ] + "description": "Check if all firmware version ID inputs are empty and provide guidance if needed", + "display_name": "Check Input Version IDs", + "skip_execution": false }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02Q09GI60MO9C5mrQJbgYxl52R7L5MnqDwC", + "name": "Condition Branch", + "title": "All Version IDs Empty", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": { + "left_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", + "operator": "eq", + "right_operand": "" + }, + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", + "operator": "eq", + "right_operand": "" + } + }, + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$", + "operator": "eq", + "right_operand": "" + } + }, + "continue_on_failure": false, + "description": "All firmware version IDs are empty - provide guidance", + "display_name": "All Version IDs Empty", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q09GI6TGJTS3iJW6J3nb6orARHgid3bk1", + "name": "Set Variables", + "title": "Set Input Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Input Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$\nInvalid input: At least one firmware version ID must be provided for Appliance, Switch, or Wireless devices. Use the 'Check Available Firmware for Network' workflow to identify valid version IDs." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$\nInvalid input: At least one firmware version ID must be provided for Appliance, Switch, or Wireless devices. Use the 'Check Available Firmware for Network' workflow to identify valid version IDs." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$\nFirmware upgrade failed - no version IDs specified for any device types" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q09GI7EWL0N3QQUaLxvvxeqyU8vHuYQZE", + "name": "Completed", + "title": "Completed - Input Validation Failed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed - Input Validation Failed", + "result_message": "At least one firmware version ID must be provided", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] } ] }, { - "unique_name": "definition_activity_02M6HPRJQWZ2Z5e27Q83OcHNA47AU8yTHof", - "name": "Condition Branch", - "title": "No, Set ID from Input", - "type": "logic.condition_block", + "unique_name": "definition_activity_02Q0Q5COF3PWD0eCXCSs0ZaPtrAwwRyUhwP", + "name": "Parallel Branch", + "title": "Validate Upgrade Date Format", + "type": "logic.parallel_block", "base_type": "activity", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", - "operator": "ne", - "right_operand": 200 - }, "continue_on_failure": false, - "display_name": "No, Set ID from Input", + "description": "Validates the upgrade date and time format to ensure it follows the required 'YYYY-MM-DD HH:MM:SS' format (e.g., 2025-05-20 14:30:00). Empty values are allowed for immediate upgrades. This validation runs in parallel with other input checks.", + "display_name": "Validate Upgrade Date Format", "skip_execution": false }, "object_type": "definition_activity", "actions": [ { - "unique_name": "definition_activity_02M6HSB8V83YX5CLExsB7hICBo11No4pZkD", - "name": "Set Variables", - "title": "Set Local Org ID Variable", - "type": "core.set_multiple_variables", + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr", + "name": "Execute Python Script", + "title": "Validate Date Format", + "type": "python3.script", "base_type": "activity", "properties": { + "action_timeout": 180, "continue_on_failure": false, - "display_name": "Set Local Org ID Variable", - "skip_execution": false, - "variables_to_update": [ + "description": "Validates the upgrade date time format. Accepts empty value or 'YYYY-MM-DD HH:MM:SS' format.", + "display_name": "Validate Date Format", + "script": "import re\nimport sys\nfrom datetime import datetime\n\n# Get the date time input\n(upgrade_datetime,) = sys.argv[1:2]\n\n# Initialize validation result\nvalid_date = True\nerror_message = ''\n\n# Check if date is empty (which is allowed)\nif not upgrade_datetime or upgrade_datetime.strip() == '':\n valid_date = True\n error_message = ''\nelse:\n # Validate the format using regex: YYYY-MM-DD HH:MM:SS\n date_pattern = r'^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$'\n \n if not re.match(date_pattern, upgrade_datetime):\n valid_date = False\n error_message = f'Invalid date format: \"{upgrade_datetime}\". Expected format: YYYY-MM-DD HH:MM:SS (e.g., 2025-05-20 14:30:00)'\n else:\n # Additional validation - try to parse the date to ensure it's a valid date\n try:\n datetime.strptime(upgrade_datetime, '%Y-%m-%d %H:%M:%S')\n valid_date = True\n error_message = ''\n except ValueError:\n valid_date = False\n error_message = f'Invalid date values: \"{upgrade_datetime}\". Please check month, day, hour, minute, and second values are valid.'", + "script_arguments": [ + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$" + ], + "script_queries": [ { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ$" + "script_query": "valid_date", + "script_query_name": "valid_date", + "script_query_type": "boolean" + }, + { + "script_query": "error_message", + "script_query_name": "error_message", + "script_query_type": "string" } - ] + ], + "skip_execution": false }, "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPs", + "name": "Condition Block", + "title": "Check Date Validation Result", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Check if date validation failed and exit with error if invalid format", + "display_name": "Check Date Validation Result", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPt", + "name": "Condition Branch", + "title": "Invalid Date Format", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.valid_date$", + "operator": "eq", + "right_operand": false + }, + "continue_on_failure": false, + "description": "Date format validation failed", + "display_name": "Invalid Date Format", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPu", + "name": "Set Variables", + "title": "Set Date Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Date Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$\n$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$\n$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$\nFirmware upgrade failed - invalid date format provided" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPv", + "name": "Completed", + "title": "Completed - Date Validation Failed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed - Date Validation Failed", + "result_message": "$activity.definition_activity_02PZA8L9O9K3T1esU9v6y7oNMB011rWbgPr.output.script_queries.error_message$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] } ] - } - ] - }, - { - "unique_name": "definition_activity_02M312TTTNDIE7iqfUDnANBR4WCbYfp3fdy", - "name": "Get Network By Name", - "title": "Get Network By Name", - "type": "workflow.sub_workflow", - "base_type": "subworkflow", - "properties": { - "continue_on_failure": true, - "display_name": "Get Network By Name", - "input": { - "variable_workflow_02LCRACABYWD40LVa27k00YndGuostARjdp": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT$", - "variable_workflow_02LCRAQ5WICDM3PgxFwKyi19yaeu1bTpVUx": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$", - "variable_workflow_02LEUF5N782ES5q1O7K4p1AoMBPrkkcxi1E": false + }, + { + "unique_name": "definition_activity_02Q0Q5QCLEZDU4QFlhPxTAJ5rf0wWKRYajA", + "name": "Parallel Branch", + "title": "Validate Version ID Formats", + "type": "logic.parallel_block", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Validates firmware version IDs for all device types (appliance, switch, wireless) to ensure they are numeric when provided (e.g., 4727, 4952, 4758). Empty values are allowed to skip upgrades for specific device types. This validation runs in parallel with other input checks.", + "display_name": "Validate Version ID Formats", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0", + "name": "Execute Python Script", + "title": "Validate Version ID Formats", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Validates that version IDs are numeric when provided", + "display_name": "Validate Version ID Formats", + "script": "import re\nimport sys\n\n# Get version IDs from command line arguments\n(appliance_version, switch_version, wireless_version) = sys.argv[1:4]\n\n# Initialize validation result\nvalid_versions = True\nerror_messages = []\n\n# Function to validate version ID format\ndef validate_version_id(version_id, device_type):\n if not version_id or version_id.strip() == '':\n return True, '' # Empty is allowed\n \n # Check if it's numeric\n if not version_id.isdigit():\n return False, f'Invalid {device_type} Version ID: \"{version_id}\". Version IDs must be numeric (e.g., 4727, 4952, 4758).'\n \n return True, ''\n\n# Validate each version ID\nvalidations = [\n (appliance_version, 'Appliance'),\n (switch_version, 'Switch'),\n (wireless_version, 'Wireless')\n]\n\nfor version_id, device_type in validations:\n is_valid, error_msg = validate_version_id(version_id, device_type)\n if not is_valid:\n valid_versions = False\n error_messages.append(error_msg)\n\n# Combine error messages\nfinal_error_message = '\\n'.join(error_messages) if error_messages else ''", + "script_arguments": [ + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$" + ], + "script_queries": [ + { + "script_query": "valid_versions", + "script_query_name": "valid_versions", + "script_query_type": "boolean" + }, + { + "script_query": "final_error_message", + "script_query_name": "error_message", + "script_query_type": "string" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q09GICUX7RC67n3s3iWIVdt3O8K9rtGeV", + "name": "Condition Block", + "title": "Check Version ID Validation Result", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Check if version ID validation failed and exit with error if invalid format", + "display_name": "Check Version ID Validation Result", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02Q09GIDGL0HQ3iQ7n8PLqcqi2vLHM94twW", + "name": "Condition Branch", + "title": "Invalid Version ID Format", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.valid_versions$", + "operator": "eq", + "right_operand": false + }, + "continue_on_failure": false, + "description": "Version ID format validation failed", + "display_name": "Invalid Version ID Format", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q09GIEFH9PL30q00BtXBQWqSxVFn9Y7M2", + "name": "Set Variables", + "title": "Set Version ID Validation Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Version ID Validation Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$\n$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$\n$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.error_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$\nFirmware upgrade failed - invalid version ID format provided" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q09GIF73GML2p7LQSjAog4iz54ni0nCwq", + "name": "Completed", + "title": "Completed - Version ID Validation Failed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed - Version ID Validation Failed", + "result_message": "$activity.definition_activity_02Q09GIC8MVIQ4pDqP9wLXZFUqYYHuGN4l0.output.script_queries.error_message$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02M6JZVP05OG65tqeJlav9hEVYcW0OF8qpu", + "name": "Group", + "title": "Lookup Organization and Network", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Lookup the Organization and the Network within the Organization. ", + "display_as_suggestion": false, + "display_name": "Lookup Organization and Network", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA", + "name": "Get Organization By Name or ID", + "title": "Get Organization By Name or ID", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "display_name": "Get Organization By Name or ID", + "input": { + "variable_workflow_02M605GTHU5L72i8goD4nuYixYOvQEFV7rN": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ$", + "variable_workflow_02M605GTI1LUG737lDLyzxnE9jwENJNQ08W": false + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", + "workflow_name": "Meraki - Get Organization By Name or ID" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M6HPRJG1K7U41B1j5MHl3N7AhJpHF4ul8", + "name": "Condition Block", + "title": "Was the Request Successful?", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "display_name": "Was the Request Successful?", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02M6HPRJLFUAD4QDpPEenjH0rJOVlMxuss1", + "name": "Condition Branch", + "title": "Yes, Set ID from Get", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "display_name": "Yes, Set ID from Get", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M6HQLPWGM364f64fuS1qF3ohGzIVeBrSN", + "name": "Set Variables", + "title": "Set Local Org ID Variable", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Local Org ID Variable", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT$", + "variable_value_new": "$activity.definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA.output.variable_workflow_02M605GTJITQP1fcLQlR8CLYAHoMomGWZvE$" + } + ] + }, + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02M6HPRJQWZ2Z5e27Q83OcHNA47AU8yTHof", + "name": "Condition Branch", + "title": "No, Org Match", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBK77HJ5SF71aVNGCAJ7Bifn5QSUdozA.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "display_name": "No, Org Match", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q1V2KM0348261SvnzSSFlzR6FlJ5WY3I2", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Completed action", + "display_name": "Completed", + "result_message": "No Org Match.", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02M312TTTNDIE7iqfUDnANBR4WCbYfp3fdy", + "name": "Get Network By Name", + "title": "Get Network By Name", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "display_name": "Get Network By Name", + "input": { + "variable_workflow_02LCRACABYWD40LVa27k00YndGuostARjdp": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02M6HQJ239YBT6VFBUlUndyY9WWtNOYImuT$", + "variable_workflow_02LCRAQ5WICDM3PgxFwKyi19yaeu1bTpVUx": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$", + "variable_workflow_02LEUF5N782ES5q1O7K4p1AoMBPrkkcxi1E": false }, "runtime_user": { "target_default": true @@ -1091,296 +2109,516 @@ ] }, { - "unique_name": "definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0", - "name": "Update Network Firmware Upgrades", - "title": "Update Network Firmware Upgrades", - "type": "workflow.atomic_workflow", - "base_type": "subworkflow", - "properties": { - "continue_on_failure": true, - "description": "Update Network Firmware based on inputs provided.", - "display_name": "Update Network Firmware Upgrades", - "input": { - "variable_workflow_02M3057KLFLIG20p3pF8ezNDO75MHqfMshf": "$activity.definition_activity_02M312TTTNDIE7iqfUDnANBR4WCbYfp3fdy.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$", - "variable_workflow_02M4KERVOSRJQ08qXFbfM4iMYQx2FpdU2Wv": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", - "variable_workflow_02M4KERVP62GU060qFU6m1vvv9OwL3mx2dr": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", - "variable_workflow_02M4KERVPIWKK5qoD0mltZ2vRBwqueLtzx3": false, - "variable_workflow_02M4KERVPWAVA4upg4hyDRhVSQq4gXX6sf2": "", - "variable_workflow_02M4KERVQ9MZF7jg3BdAhGNZFlt3qteptmt": "", - "variable_workflow_02M4KERVQMOMV7BMIPi4zaoJNiqQg4T9JvI": "", - "variable_workflow_02M4KERVQZELU4R7e0vGsxOkGMXFgxCcCQA": false, - "variable_workflow_02M4KERVRC3QE2OLTU4o22QEpid35nqLKxL": "", - "variable_workflow_02M4KERVS2VGZ2aMw0gwig6JJIT24q4KMP3": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", - "variable_workflow_02M4KERVSTNX04vnDZTl0xrUY7LDJa4ZdlN": "", - "variable_workflow_02M4KERVT6GCB3qhldBseHG3T6lt0rMU1Mh": "", - "variable_workflow_02M4KERVTJG3D6z0pR38CYPBhZD7S5rTHeL": "", - "variable_workflow_02M4KERVTXNXE0VtG74iQnLYuk15EOGjdTE": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", - "variable_workflow_02M4KERVUAJ1V1PyguqfdoICjF1BmHR7X2b": false, - "variable_workflow_02M4KERVUNIC90E9ID0hvx5GO21BmmzIs08": false, - "variable_workflow_02M4KERVV09U46NNQXWhuLlgEFsBSliOUNR": false, - "variable_workflow_02M4KERVVD4B80d0TNrHG17Oj0JRKQ0t1rM": "", - "variable_workflow_02M4KERVVPPQ72Beed28WWzCNhfcw121KZh": "", - "variable_workflow_02M4KERVW32IK323MeeO2ZRMVhqupIl3Vnf": "", - "variable_workflow_02M4KERVWFXYU1hDx5aB3T8ThL6zSXFMTT3": false, - "variable_workflow_02M4KERVWSKTJ4T8YMhcQ21to7TnlCqYM3l": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", - "variable_workflow_02M4KERVX5OFW4pJO7lxPaQ7ocZzRKxdKfn": "", - "variable_workflow_02M4KERVXJS3R2hNPsRY66qPvsx8P6I77S3": false, - "variable_workflow_02M4KERVXWWZV3oInj8jFfnitnKrWUaFaX2": false, - "variable_workflow_02M4KERVYC3RT6HIpeFiGsPas45oB0gD48h": false, - "variable_workflow_02M4KERVYPC1E11PVRqaDjAaHJ3TRWznwFf": "", - "variable_workflow_02M4KERVZ2C7F7lU7gVGO8NZOaQjYe95OZW": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$" - }, - "runtime_user": { - "target_default": true - }, - "skip_execution": false, - "target": { - "target_type": "meraki.endpoint", - "use_workflow_target": true - }, - "workflow_id": "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF", - "workflow_name": "Meraki - Update Network Firmware Upgrades" - }, - "object_type": "definition_activity" - }, - { - "unique_name": "definition_activity_02M6LGMTX47U46kBoNBf5Ftup3tj59Fv2y4", - "name": "Condition Block", - "title": "Was the Request Successful?", - "type": "logic.if_else", + "unique_name": "definition_activity_02PYMKA5ZB9KB2fLLZztXyVbFS002iPSWFg", + "name": "Group", + "title": "Check if Upgrade is needed", + "type": "logic.group", "base_type": "activity", "properties": { - "conditions": [], "continue_on_failure": false, - "description": "Evaluate result of the operation and populate final responses.", - "display_name": "Was the Request Successful?", + "description": "Validates current firmware versions against input version IDs to determine if upgrades are needed. Implements idempotency by ensuring devices are only upgraded when input version differs from current version.", + "display_as_suggestion": false, + "display_name": "Check if Upgrade is needed", "skip_execution": false }, "object_type": "definition_activity", - "blocks": [ + "actions": [ { - "unique_name": "definition_activity_02M6LGMTX4ZD53IvNzCWjfCmdXwlkPZIHZy", - "name": "Condition Branch", - "title": "200/Success", - "type": "logic.condition_block", - "base_type": "activity", + "unique_name": "definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd", + "name": "Check Available Firmware for Network", + "title": "Check Available Firmware for Network", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", - "operator": "eq", - "right_operand": 200 + "continue_on_failure": true, + "description": "Checks available firmware updates for Meraki network devices including Security Appliances (MX), Switches (MS), and Wireless Access Points (MR). Accepts organization name or ID, locates the specified network, and returns current firmware versions along with available upgrades for each device type in both individual outputs and a consolidated summary format.", + "display_name": "Check Available Firmware for Network", + "input": { + "variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$", + "variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNV48D362Qqex9PTw1USYd7QlgbfQ$" }, - "continue_on_failure": false, - "display_name": "200/Success", - "skip_execution": false - }, - "object_type": "definition_activity", - "actions": [ - { - "unique_name": "definition_activity_02M6LGMTX8O0O3mNa7v1zbntIH5z4Oxd3to", - "name": "Set Variables", - "title": "Set Variables", - "type": "core.set_multiple_variables", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "display_name": "Set Variables", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade is scheduled." - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", - "variable_value_new": "completed-successfully" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" - } - ] - }, - "object_type": "definition_activity" + "runtime_user": { + "target_default": true }, - { - "unique_name": "definition_activity_02M7XZRJ5SP1B3Cdj8cxHqP4acnsnL3ovqL", - "name": "Completed", - "title": "Completed", - "type": "logic.completed", - "base_type": "activity", - "properties": { - "completion_type": "succeeded", - "continue_on_failure": false, - "display_name": "Completed", - "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", - "skip_execution": false + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF", + "workflow_name": "Check Available Firmware for Network" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh", + "name": "Execute Python Script", + "title": "Determine Upgrade Requirements", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Compare input version IDs against current versions to determine which device types need upgrades. Sets filtered version IDs for each device type - empty if no upgrade needed, input value if upgrade required. Generates status messages for user feedback.", + "display_name": "Determine Upgrade Requirements", + "script": "import re\nimport sys\n\n# Get inputs from command line arguments\n(appliance_current_version, switch_current_version, wireless_current_version, \n appliance_input_version, switch_input_version, wireless_input_version) = sys.argv[1:7]\n\n# Extract version IDs from formatted strings like 'MX 18.211.5.2 (ID:4625)'\ndef extract_version_id(version_string):\n if not version_string or version_string.strip() == '' or version_string == 'null':\n return ''\n \n # Look for pattern like '(ID:1234)' in the string\n match = re.search(r'\\(ID:([^)]+)\\)', version_string)\n if match:\n return match.group(1)\n return ''\n\n# Extract version names from formatted strings like 'MX 18.211.5.2 (ID:4625)'\ndef extract_version_name(version_string):\n if not version_string or version_string.strip() == '' or version_string == 'null':\n return ''\n \n # Extract everything before ' (ID:' or return the whole string if no ID found\n if ' (ID:' in version_string:\n return version_string.split(' (ID:')[0]\n return version_string\n\n# Extract current version IDs and names from each device type\napplianceCurrentVersionId = extract_version_id(appliance_current_version)\nswitchCurrentVersionId = extract_version_id(switch_current_version)\nwirelessCurrentVersionId = extract_version_id(wireless_current_version)\n\napplianceCurrentVersionName = extract_version_name(appliance_current_version)\nswitchCurrentVersionName = extract_version_name(switch_current_version)\nwirelessCurrentVersionName = extract_version_name(wireless_current_version)\n\n# Initialize status tracking\nstatus_messages = []\n\n# Determine filtered version IDs based on upgrade requirements\n# Set to input value if upgrade needed, empty if not needed or input is empty\nfilteredApplianceVersionId = ''\nfilteredSwitchVersionId = ''\nfilteredWirelessVersionId = ''\n\n# Check appliance upgrade requirement\nif appliance_input_version and appliance_input_version.strip() != '' and appliance_input_version != 'null':\n if appliance_input_version == applianceCurrentVersionId:\n status_messages.append(f'🔵 Appliance (MX): Already running target version (ID: {appliance_input_version}) - upgrade skipped')\n else:\n filteredApplianceVersionId = appliance_input_version\n if applianceCurrentVersionName:\n status_messages.append(f'🟢 Appliance (MX): Upgrade scheduled from {applianceCurrentVersionName} to version ID {appliance_input_version}')\n else:\n status_messages.append(f'🟢 Appliance (MX): Upgrade scheduled to version ID {appliance_input_version}')\n\n# Check switch upgrade requirement \nif switch_input_version and switch_input_version.strip() != '' and switch_input_version != 'null':\n if switch_input_version == switchCurrentVersionId:\n status_messages.append(f'🔵 Switch (MS): Already running target version (ID: {switch_input_version}) - upgrade skipped')\n else:\n filteredSwitchVersionId = switch_input_version\n if switchCurrentVersionName:\n status_messages.append(f'🟢 Switch (MS): Upgrade scheduled from {switchCurrentVersionName} to version ID {switch_input_version}')\n else:\n status_messages.append(f'🟢 Switch (MS): Upgrade scheduled to version ID {switch_input_version}')\n\n# Check wireless upgrade requirement\nif wireless_input_version and wireless_input_version.strip() != '' and wireless_input_version != 'null':\n if wireless_input_version == wirelessCurrentVersionId:\n status_messages.append(f'🔵 Wireless (MR): Already running target version (ID: {wireless_input_version}) - upgrade skipped')\n else:\n filteredWirelessVersionId = wireless_input_version\n if wirelessCurrentVersionName:\n status_messages.append(f'🟢 Wireless (MR): Upgrade scheduled from {wirelessCurrentVersionName} to version ID {wireless_input_version}')\n else:\n status_messages.append(f'🟢 Wireless (MR): Upgrade scheduled to version ID {wireless_input_version}')\n\n# Determine if any upgrades are needed\nanyUpgradeNeeded = (filteredApplianceVersionId != '' or \n filteredSwitchVersionId != '' or \n filteredWirelessVersionId != '')\n\n# Generate final status message\nif not status_messages:\n upgrade_status_message = 'ℹ️ No firmware upgrade targets specified - all device type version fields are empty.'\nelse:\n upgrade_status_message = '\\n'.join(status_messages)\n if anyUpgradeNeeded:\n upgrade_count = sum(1 for vid in [filteredApplianceVersionId, filteredSwitchVersionId, filteredWirelessVersionId] if vid != '')\n skip_count = len(status_messages) - upgrade_count\n if skip_count \u003e 0:\n upgrade_status_message += f'\\n\\n📊 Summary: {upgrade_count} device type(s) scheduled for upgrade, {skip_count} already at target version(s)'\n else:\n upgrade_status_message += f'\\n\\n📊 Summary: {upgrade_count} device type(s) scheduled for upgrade'\n else:\n upgrade_status_message += '\\n\\n📊 Summary: All specified device types are already running target firmware versions - no upgrades needed'", + "script_arguments": [ + "$activity.definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "$activity.definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "$activity.definition_activity_02PZA0D1G1BVX2UJYN0u7UFRCDXxjQjEdpd.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG0JY44ZB2J10JOQI8CsqtK0hhn1SBp$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6J1XSPTOPF32pVY3YOG8khAHZh9c1W2N$", + "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6JG70GBGQG7HoqTfGf5aqzeOeDO3N0OT$" + ], + "script_queries": [ + { + "script_query": "filteredApplianceVersionId", + "script_query_name": "filteredApplianceVersionId", + "script_query_type": "string" }, - "object_type": "definition_activity" - } - ] + { + "script_query": "filteredSwitchVersionId", + "script_query_name": "filteredSwitchVersionId", + "script_query_type": "string" + }, + { + "script_query": "filteredWirelessVersionId", + "script_query_name": "filteredWirelessVersionId", + "script_query_type": "string" + }, + { + "script_query": "anyUpgradeNeeded", + "script_query_name": "anyUpgradeNeeded", + "script_query_type": "boolean" + }, + { + "script_query": "upgrade_status_message", + "script_query_name": "upgrade_status_message", + "script_query_type": "string" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" }, { - "unique_name": "definition_activity_02M7XFCXFP11H20q6JIAnJT636nfw2T9ldr", - "name": "Condition Branch", - "title": "Ignore Errors", - "type": "logic.condition_block", + "unique_name": "definition_activity_02PZA7K8N8J2S0drT8u5x6nMLA010qXafOr", + "name": "Set Variables", + "title": "Set Filtered Version IDs", + "type": "core.set_multiple_variables", "base_type": "activity", "properties": { - "condition": { - "left_operand": { - "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", - "operator": "ne", - "right_operand": 200 + "continue_on_failure": false, + "description": "Set the local variables with filtered version IDs for each device type. Variables will contain version ID if upgrade needed, empty if no upgrade required.", + "display_name": "Set Filtered Version IDs", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZO7WI1FZX3TWhd6HR5Vuhw8CFIEZ4Jq$", + "variable_value_new": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.filteredApplianceVersionId$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOFQTFANI5LoBVWZnJdR7p6CL07k1i5$", + "variable_value_new": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.filteredSwitchVersionId$" }, - "operator": "and", - "right_operand": { - "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo$", - "operator": "eq", - "right_operand": true + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOBV3C7K00njLjGN4Zjj0wjpCW0SGhM$", + "variable_value_new": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.filteredWirelessVersionId$" } - }, + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA2F3I3DXM4WLN2o9r0hGFU004kRUYHi", + "name": "Condition Block", + "title": "Validate Version Requirements", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], "continue_on_failure": false, - "display_name": "Ignore Errors", + "description": "Check each device type to determine if upgrade is needed by comparing input version IDs with current version IDs.", + "display_name": "Validate Version Requirements", "skip_execution": false }, "object_type": "definition_activity", - "actions": [ - { - "unique_name": "definition_activity_02M7XFCXFQJGB0gBMuBXF8loPLg1QZp6uyt", - "name": "Set Variables", - "title": "Set Variables", - "type": "core.set_multiple_variables", - "base_type": "activity", - "properties": { - "continue_on_failure": false, - "display_name": "Set Variables", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ updrade skipped due to errors." - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", - "variable_value_new": "completed-successfully" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" - } - ] - }, - "object_type": "definition_activity" - }, + "blocks": [ { - "unique_name": "definition_activity_02M7XEWRKKEDR03oKIqk0z2zRZs5yMos1Dx", - "name": "Completed", - "title": "Completed", - "type": "logic.completed", + "unique_name": "definition_activity_02PZA2F3I7GYN5XMO3p0s1iHGV005lSVZIj", + "name": "Condition Branch", + "title": "No Upgrades Needed", + "type": "logic.condition_block", "base_type": "activity", "properties": { - "completion_type": "succeeded", + "condition": { + "left_operand": "$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.anyUpgradeNeeded$", + "operator": "eq", + "right_operand": false + }, "continue_on_failure": false, - "display_name": "Completed", - "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "description": "No firmware upgrades are needed - all specified devices are already running the target versions", + "display_name": "No Upgrades Needed", "skip_execution": false }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PZA3G4J4EYO6ZNP4q1t2jIHW006mTWaJk", + "name": "Set Variables", + "title": "Set No Upgrade Needed Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set No Upgrade Needed Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": 200 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "No firmware upgrade needed - all specified devices are already running the target firmware versions or no valid version IDs were provided.\n$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.upgrade_status_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "Network: $workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ Upgrade skipped - devices are already running target firmware versions." + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PZA4H5K5FZP7aoQ5r2u3kJIX007nUXbKl", + "name": "Completed", + "title": "Completed - No Upgrade Needed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "succeeded", + "continue_on_failure": false, + "display_name": "Completed - No Upgrade Needed", + "result_message": "All devices are already running the specified firmware versions. No upgrade needed.", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] } ] + } + ] + }, + { + "unique_name": "definition_activity_02Q09HV27P34N1B6qUGq6RYL2dAvIwQAlSA", + "name": "Group", + "title": "Upgrade Networks", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Executes the actual firmware upgrade scheduling after validation and requirements determination. Uses the Update Network Firmware Upgrades atomic workflow to schedule firmware upgrades for the filtered device types that require updates. Handles both successful scheduling and error scenarios with comprehensive status reporting and proper error handling.", + "display_as_suggestion": false, + "display_name": "Upgrade Networks", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0", + "name": "Update Network Firmware Upgrades", + "title": "Update Network Firmware Upgrades", + "type": "workflow.atomic_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Update Network Firmware based on inputs provided.", + "display_name": "Update Network Firmware Upgrades", + "input": { + "variable_workflow_02M3057KLFLIG20p3pF8ezNDO75MHqfMshf": "$activity.definition_activity_02M312TTTNDIE7iqfUDnANBR4WCbYfp3fdy.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$", + "variable_workflow_02M4KERVOSRJQ08qXFbfM4iMYQx2FpdU2Wv": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZO7WI1FZX3TWhd6HR5Vuhw8CFIEZ4Jq$", + "variable_workflow_02M4KERVP62GU060qFU6m1vvv9OwL3mx2dr": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", + "variable_workflow_02M4KERVPIWKK5qoD0mltZ2vRBwqueLtzx3": "false", + "variable_workflow_02M4KERVPWAVA4upg4hyDRhVSQq4gXX6sf2": "", + "variable_workflow_02M4KERVQ9MZF7jg3BdAhGNZFlt3qteptmt": "", + "variable_workflow_02M4KERVQMOMV7BMIPi4zaoJNiqQg4T9JvI": "", + "variable_workflow_02M4KERVQZELU4R7e0vGsxOkGMXFgxCcCQA": "false", + "variable_workflow_02M4KERVRC3QE2OLTU4o22QEpid35nqLKxL": "", + "variable_workflow_02M4KERVS2VGZ2aMw0gwig6JJIT24q4KMP3": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", + "variable_workflow_02M4KERVSTNX04vnDZTl0xrUY7LDJa4ZdlN": "", + "variable_workflow_02M4KERVT6GCB3qhldBseHG3T6lt0rMU1Mh": "", + "variable_workflow_02M4KERVTJG3D6z0pR38CYPBhZD7S5rTHeL": "", + "variable_workflow_02M4KERVTXNXE0VtG74iQnLYuk15EOGjdTE": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M6ITCWL1UEH2ROmXLUwyaAtxN0s8yb5Xq$", + "variable_workflow_02M4KERVUAJ1V1PyguqfdoICjF1BmHR7X2b": "false", + "variable_workflow_02M4KERVUNIC90E9ID0hvx5GO21BmmzIs08": "false", + "variable_workflow_02M4KERVV09U46NNQXWhuLlgEFsBSliOUNR": "false", + "variable_workflow_02M4KERVVD4B80d0TNrHG17Oj0JRKQ0t1rM": "", + "variable_workflow_02M4KERVVPPQ72Beed28WWzCNhfcw121KZh": "", + "variable_workflow_02M4KERVW32IK323MeeO2ZRMVhqupIl3Vnf": "", + "variable_workflow_02M4KERVWFXYU1hDx5aB3T8ThL6zSXFMTT3": "false", + "variable_workflow_02M4KERVWSKTJ4T8YMhcQ21to7TnlCqYM3l": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOFQTFANI5LoBVWZnJdR7p6CL07k1i5$", + "variable_workflow_02M4KERVX5OFW4pJO7lxPaQ7ocZzRKxdKfn": "", + "variable_workflow_02M4KERVXJS3R2hNPsRY66qPvsx8P6I77S3": "false", + "variable_workflow_02M4KERVXWWZV3oInj8jFfnitnKrWUaFaX2": "false", + "variable_workflow_02M4KERVYC3RT6HIpeFiGsPas45oB0gD48h": "false", + "variable_workflow_02M4KERVYPC1E11PVRqaDjAaHJ3TRWznwFf": "", + "variable_workflow_02M4KERVZ2C7F7lU7gVGO8NZOaQjYe95OZW": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.local.variable_workflow_02PZZOBV3C7K00njLjGN4Zjj0wjpCW0SGhM$" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF", + "workflow_name": "Meraki - Update Network Firmware Upgrades" + }, + "object_type": "definition_activity" }, { - "unique_name": "definition_activity_02M6LGMTX9Q7O5MIGWYEeR2Cyu3kUvEZePO", - "name": "Condition Branch", - "title": "Failed", - "type": "logic.condition_block", + "unique_name": "definition_activity_02M6LGMTX47U46kBoNBf5Ftup3tj59Fv2y4", + "name": "Condition Block", + "title": "Was the Request Successful?", + "type": "logic.if_else", "base_type": "activity", "properties": { - "condition": { - "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", - "operator": "ne", - "right_operand": 200 - }, + "conditions": [], "continue_on_failure": false, - "display_name": "Failed", + "description": "Evaluate result of the operation and populate final responses.", + "display_name": "Was the Request Successful?", "skip_execution": false }, "object_type": "definition_activity", - "actions": [ + "blocks": [ { - "unique_name": "definition_activity_02M6LGMTXC5ZS0ubOpj1D3lXEetwnitprPd", - "name": "Set Variables", - "title": "Set Variables", - "type": "core.set_multiple_variables", + "unique_name": "definition_activity_02M6LGMTX4ZD53IvNzCWjfCmdXwlkPZIHZy", + "name": "Condition Branch", + "title": "200/Success", + "type": "logic.condition_block", "base_type": "activity", "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", + "operator": "eq", + "right_operand": 200 + }, "continue_on_failure": false, - "display_name": "Set Variables", - "skip_execution": false, - "variables_to_update": [ - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade failed to schedule." - }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", - "variable_value_new": "workflow-errored" + "display_name": "200/Success", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M6LGMTX8O0O3mNa7v1zbntIH5z4Oxd3to", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade is scheduled.\n\n$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.upgrade_status_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + } + ] }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", - "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7XZRJ5SP1B3Cdj8cxHqP4acnsnL3ovqL", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "succeeded", + "continue_on_failure": false, + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "skip_execution": false }, - { - "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", - "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" - } - ] - }, - "object_type": "definition_activity" + "object_type": "definition_activity" + } + ] }, { - "unique_name": "definition_activity_02M7XZMZ74LRQ63EGvzvETpm9aDNJ7QYsR1", - "name": "Completed", - "title": "Completed", - "type": "logic.completed", + "unique_name": "definition_activity_02M7XFCXFP11H20q6JIAnJT636nfw2T9ldr", + "name": "Condition Branch", + "title": "Ignore Errors", + "type": "logic.condition_block", "base_type": "activity", "properties": { - "completion_type": "failed-completed", + "condition": { + "left_operand": { + "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", + "operator": "ne", + "right_operand": 200 + }, + "operator": "and", + "right_operand": { + "left_operand": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M7XBLKG0QUX0Rem8WlG1RekFxSh8w3YWo$", + "operator": "eq", + "right_operand": true + } + }, "continue_on_failure": false, - "display_name": "Completed", - "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "display_name": "Ignore Errors", "skip_execution": false }, - "object_type": "definition_activity" + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M7XFCXFQJGB0gBMuBXF8loPLg1QZp6uyt", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade skipped due to errors.\n\n$activity.definition_activity_02PZA1E2H2CWL3VKM1n8q9gFET003jQTXGh.output.script_queries.upgrade_status_message$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7XEWRKKEDR03oKIqk0z2zRZs5yMos1Dx", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "succeeded", + "continue_on_failure": false, + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02M6LGMTX9Q7O5MIGWYEeR2Cyu3kUvEZePO", + "name": "Condition Branch", + "title": "Failed", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "display_name": "Failed", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M6LGMTXC5ZS0ubOpj1D3lXEetwnitprPd", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L2QUMXRS66QznqbbhESCOI6BVQ5KLP8$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFT882CZIEPo8wIRVmx8JqaChAz$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L319PNRLE5UnZJlJVqWYILq8SQZe8nV$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFSGG0DBQRLz133mNnZHnGJESAq$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.input.variable_workflow_02M312TNUWBWB54vet49qWU74z2yohx7ssJ$ upgrade failed to schedule." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results_code$", + "variable_value_new": "workflow-errored" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3FIK1MB054rZdfPQcAYgBDONPSlwN6$", + "variable_value_new": "$activity.definition_activity_02MGCSC45W3PJ5TPIq4e9IaIOQToLGFC3p0.output.variable_workflow_02M3057KLFURS0hP6yaZLrIa3H5T3VKTy5E$" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M7XZMZ74LRQ63EGvzvETpm9aDNJ7QYsR1", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M312TMR8LMG3UJlEY07a3HLYWHV8awf3M.output.variable_workflow_02M6L3TQUAWOC1fCLGxNZgjlFeD9xgkJoHr$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] } ] } @@ -1391,12 +2629,1035 @@ "category_02M5I40Y7XSOX59ZtwCZnsrkS73sAGa3w1t" ] }, + "subworkflows": [ + { + "workflow": { + "unique_name": "definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF", + "name": "Check Available Firmware for Network", + "title": "Check Available Firmware for Network", + "type": "generic.workflow", + "base_type": "workflow", + "variables": [ + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Switch - Available Firmware Versions", + "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Switches (MS) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "json" + }, + "unique_name": "variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Switch - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Switches (MS) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Error Message", + "type": "datatype.string", + "description": "Detailed error information when workflow fails. Empty for successful executions, contains specific error details for troubleshooting failures.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Result", + "type": "datatype.string", + "description": "Comprehensive summary report containing current firmware versions and available upgrades for all device types (Appliance, Switch, Wireless) in a human-readable format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Wireless - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Wireless Access Points (MR) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Appliance Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Security Appliances (MX): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02PYYLS61FZLF0ryAp4sqcDyP4E8mhuheHl", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.integer", + "properties": { + "value": 0, + "scope": "output", + "name": "Status Code", + "type": "datatype.integer", + "description": "HTTP status code or workflow completion status. Returns 200 for success, 4xx/5xx for various error conditions.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Wireless - Available Firmware Versions", + "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Wireless Access Points (MR) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "json" + }, + "unique_name": "variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Switch Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Switches (MS): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M3N3D6E9MRS0zGiJk4LnOpQ2TuV3wX4yZ", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.boolean", + "properties": { + "value": false, + "scope": "output", + "name": "Wireless Has Upgrade Available", + "type": "datatype.boolean", + "description": "Boolean flag for Wireless Access Points (MR): true = firmware upgrades are available, false = running latest firmware or no upgrade versions available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "" + }, + "unique_name": "variable_workflow_02M3N4E7F0NST1AHjKl5MoQpR3UvW4xY5zA", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "input", + "name": "Input - Network Name", + "type": "datatype.string", + "description": "The name of the Meraki network to check for firmware updates. Must be an exact match for an existing network within the specified organization.", + "is_required": true, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "input", + "name": "Input - Organization ID or Name", + "type": "datatype.string", + "description": "Provide the Organization Name or Organization ID.", + "is_required": true, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "local", + "name": "Organization ID", + "type": "datatype.string", + "description": "Internal variable to store the resolved Meraki organization ID, determined from either the organization name lookup or direct ID input.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Appliance - Available Firmware Versions", + "type": "datatype.string", + "description": "JSON formatted list of available firmware versions for Meraki Security Appliances (MX) in the network. Returns 'Running the latest firmware.' if no upgrades are available.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "json" + }, + "unique_name": "variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Output - Appliance - Current Version", + "type": "datatype.string", + "description": "The current firmware version running on Meraki Security Appliances (MX) in the network, displayed as 'ShortName (ID: VersionID)' format.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY", + "object_type": "variable_workflow" + }, + { + "schema_id": "datatype.string", + "properties": { + "value": "", + "scope": "output", + "name": "Status Message", + "type": "datatype.string", + "description": "Brief status description of workflow execution result. 'Success' for successful completion or error summary for failures.", + "is_required": false, + "display_on_wizard": false, + "is_invisible": false, + "variable_string_format": "text" + }, + "unique_name": "variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7", + "object_type": "variable_workflow" + } + ], + "properties": { + "atomic": { + "is_atomic": false + }, + "automation_rules": { + "type": [] + }, + "delete_workflow_instance": false, + "description": "Checks available firmware updates for Meraki network devices including Security Appliances (MX), Switches (MS), and Wireless Access Points (MR). Accepts organization name or ID, locates the specified network, and returns current firmware versions along with available upgrades for each device type in both individual outputs and a consolidated summary format.", + "display_name": "Check Available Firmware for Network", + "runtime_user": { + "target_default": true + }, + "target": { + "target_type": "meraki.endpoint", + "specify_on_workflow_start": true + } + }, + "object_type": "definition_workflow", + "actions": [ + { + "unique_name": "definition_activity_02PEOAC0PDY003JBVLtTaygKBLzGSOB5tGo", + "name": "Group", + "title": "Find Organization by ID or Name", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Handles input flexibility by accepting either organization name or ID. Uses conditional logic to determine input type and set the organization ID for subsequent steps.", + "display_as_suggestion": false, + "display_name": "Find Organization by ID or Name", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg", + "name": "Get Organization By Name or ID", + "title": "Get Organization By Name or ID", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Lookup the Organization by Name or ID", + "display_name": "Get Organization By Name or ID", + "input": { + "variable_workflow_02M605GTHU5L72i8goD4nuYixYOvQEFV7rN": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30IM5VO2AS4WKLy2VYN1plX7frJeH1qw$", + "variable_workflow_02M605GTI1LUG737lDLyzxnE9jwENJNQ08W": false + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", + "workflow_name": "Meraki - Get Organization By Name or ID" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M6GWLTHB0QQ2tHfY1ZO36K4S9uzgqt7gD", + "name": "Condition Block", + "title": "Was the Request Successful?", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Routes logic based on lookup success to set organization ID from either lookup result or original input.", + "display_name": "Was the Request Successful?", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02M6GWLTN539K1dlKUmeNaU8S93S4tVs7gp", + "name": "Condition Branch", + "title": "Yes, Set ID from Get", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "HTTP 200 indicates successful name lookup - use returned organization ID.", + "display_name": "Yes, Set ID from Get", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M6H1KCDK4CL6WPslndUEMP25csS3zZZkL", + "name": "Set Variables", + "title": "Set Local Org ID", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Use organization ID from lookup result.", + "display_name": "Set Local Org ID", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.local.variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2$", + "variable_value_new": "$activity.definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg.output.variable_workflow_02M605GTJITQP1fcLQlR8CLYAHoMomGWZvE$" + } + ] + }, + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02M6H2KH6P4Q56cig9mkjsWMHaANAfb03Z8", + "name": "Condition Branch", + "title": "No, Org Match", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBB1XV74T14vch1JymK78sjVAG8XLMPg.output.variable_workflow_02M605GTHEWOW4TGG1xjMEivKqrrMbc2hM3$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Non-200 response indicates input was likely already an organization ID - use original input.", + "display_name": "No, Org Match", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02Q1UNZE489PT5GCm8gQpGtyfoTzenSEocF", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Completed action", + "display_name": "Completed", + "result_message": "No Organization Match.", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02PEOGIRQ9Q462hvTAYZcXnY4qw3q9o75kw", + "name": "Group", + "title": "Find Network By Name", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Locates the target network within the organization using the provided network name.", + "display_as_suggestion": false, + "display_name": "Find Network By Name", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB", + "name": "Get Network By Name", + "title": "Get Network By Name", + "type": "workflow.sub_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Finds network by name within the organization and returns network ID for firmware queries.", + "display_name": "Get Network By Name", + "input": { + "variable_workflow_02LCRACABYWD40LVa27k00YndGuostARjdp": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.local.variable_workflow_02M6H1GEN4C263m1V94LPMCQNjGf0OG5ZG2$", + "variable_workflow_02LCRAQ5WICDM3PgxFwKyi19yaeu1bTpVUx": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq$", + "variable_workflow_02LEUF5N782ES5q1O7K4p1AoMBPrkkcxi1E": false + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02LCR4UKH38PM6zDR4Bx2b2J165gCF1mhvh", + "workflow_name": "Meraki - Get Network By Name" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PYK5VPXEWSO5RSV0KinD05aQCclZv5BRH", + "name": "Condition Block", + "title": "Is Network Found?", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validates that the network was successfully found before proceeding with firmware queries.", + "display_name": "Is Network Found?", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYLIFDS10246F4non6pLnBPBeKn6M4Hvs", + "name": "Condition Branch", + "title": "Network Found", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCS9H7YNIYX1GDaReaAe3aek2b4CnpPEW$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Network lookup successful", + "display_name": "Network Found", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PEOH4UMTQ7T1GVwglfqrY6D6A5FZRlOop", + "name": "Group", + "title": "Find Firmware for Network", + "type": "logic.group", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Retrieves firmware data, processes to remove current versions from upgrade lists, and formats output for all device types.", + "display_as_suggestion": false, + "display_name": "Find Firmware for Network", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt", + "name": "Get Network Firmware Upgrades", + "title": "Get Network Firmware Upgrades", + "type": "workflow.atomic_workflow", + "base_type": "subworkflow", + "properties": { + "continue_on_failure": true, + "description": "Retrieves raw firmware upgrade data for the network using Meraki atomic.", + "display_name": "Get Network Firmware Upgrades", + "input": { + "variable_workflow_02LV1H3CNM5T45adfzDFwEeMjrKbmdHd58D": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCRLPN6EZY51pb3GRpQG7QdKWS452YyuL$" + }, + "runtime_user": { + "target_default": true + }, + "skip_execution": false, + "target": { + "target_type": "meraki.endpoint", + "use_workflow_target": true + }, + "workflow_id": "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6", + "workflow_name": "Meraki - Get Network Firmware Upgrades" + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PYK5VVYSATE4J6abUrIud4Cbm26oCiwHX", + "name": "Condition Block", + "title": "Validate Firmware Data Retrieved", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validates that firmware data was successfully retrieved before proceeding with processing.", + "display_name": "Validate Firmware Data Retrieved", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYLK1OLP6721UsBBwfRaGOF1PjvaI27T9", + "name": "Condition Branch", + "title": "Success", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$", + "operator": "eq", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Firmware data retrieval failed - set error outputs and terminate workflow.", + "display_name": "Success", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p", + "name": "JSONPath Query", + "title": "Parse Output", + "type": "corejava.jsonpathquery", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": true, + "description": "Parses firmware data using JSONPath to extract version details for each device type. Continues on failure to handle missing device types gracefully.", + "display_name": "Parse Output", + "input_json": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNMB7K2eIEUcLniuSFXAmkGIOQJ2$", + "jsonpath_queries": [ + { + "jsonpath_query": ".products.appliance.currentVersion.id", + "jsonpath_query_name": "applianceCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.appliance.currentVersion.shortName", + "jsonpath_query_name": "applianceCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.appliance", + "jsonpath_query_name": "applianceDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch.currentVersion.id", + "jsonpath_query_name": "switchCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch.currentVersion.shortName", + "jsonpath_query_name": "switchCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.switch", + "jsonpath_query_name": "switchDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless.currentVersion.id", + "jsonpath_query_name": "wirelessCurrVersionId", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless.currentVersion.shortName", + "jsonpath_query_name": "wirelessCurrVersionShortName", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + }, + { + "jsonpath_query": ".products.wireless", + "jsonpath_query_name": "wirelessDetails", + "jsonpath_query_type": "string", + "zdate_type_format": "yyyy-MM-dd'T'HH:mm:ssZ" + } + ], + "skip_execution": false, + "skip_path": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02PYK5W0XEWSO5RSV0KinD05aQCclZv5BRH", + "name": "Condition Block", + "title": "Validate JSONPath Results", + "type": "logic.if_else", + "base_type": "activity", + "properties": { + "conditions": [], + "continue_on_failure": false, + "description": "Validates JSONPath parsing results and handles any failures by providing default values for missing device types.", + "display_name": "Validate JSONPath Results", + "skip_execution": false + }, + "object_type": "definition_activity", + "blocks": [ + { + "unique_name": "definition_activity_02PYK5W1JMDSF5ESkvsZQVY94LjCs3jQbHu", + "name": "Condition Branch", + "title": "JSONPath Failed", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.succeeded$", + "operator": "eq", + "right_operand": false + }, + "continue_on_failure": false, + "description": "JSONPath parsing failed - set default empty values for all device types.", + "display_name": "JSONPath Failed", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5W2JACY04QBD6lQGzESHLHYeadvaZe", + "name": "Set Variables", + "title": "Set Default Values", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set default empty values for failed JSONPath parsing.", + "display_name": "Set Default Values", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$", + "variable_value_new": "No devices of this type found in the network." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "variable_value_new": "Network firmware check completed with limited device types available." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Network firmware check completed with limited device types available." + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 400 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Failed" + } + ] + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02Q0VAR7Z9KPL1nIoC9KGwuyxoY8x5BFfnt", + "name": "Completed", + "title": "Completed", + "type": "logic.completed", + "base_type": "activity", + "properties": { + "completion_type": "failed-completed", + "continue_on_failure": false, + "description": "Completed action", + "display_name": "Completed", + "result_message": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "skip_execution": false + }, + "object_type": "definition_activity" + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P", + "name": "Execute Python Script", + "title": "Identify Available Versions", + "type": "python3.script", + "base_type": "activity", + "properties": { + "action_timeout": 180, + "continue_on_failure": false, + "description": "Processes firmware data to remove current versions from available upgrade lists and filter unnecessary attributes.", + "display_name": "Identify Available Versions", + "script": "import sys\nimport json\n\n####################\n# This section establishes some inputs and local variables we need for later\n####################\n\n# Note when you have one item as input you need extra comma - it's not a mistake\n(mxDetails,msDetails,mrDetails) = sys.argv[1:4]\n\ndef remove_current_version_and_attributes(json_data):\n \"\"\"\n Removes the current version from the list of available versions and\n excludes 'releaseDate' and 'firmware' attributes from the output JSON.\n Handles missing/empty device types gracefully.\n\n Parameters:\n json_data (str): The JSON data as a string.\n\n Returns:\n tuple: (updated_json_str, no_available_versions_flag)\n - updated_json_str: The updated JSON data as a string or appropriate message for missing devices\n - no_available_versions_flag: Boolean indicating if current version is the only available version\n \"\"\"\n # Handle null, empty, or invalid inputs\n if not json_data or json_data == 'null' or json_data.strip() == '' or json_data == 'None':\n return \"No devices of this type found in the network.\", False\n \n try:\n # Parse the JSON string into a Python dictionary\n data = json.loads(json_data)\n \n # Handle empty or null parsed data\n if not data or data is None:\n return \"No devices of this type found in the network.\", False\n \n # Check if required keys exist\n if 'currentVersion' not in data or not data['currentVersion']:\n return \"No current version information available for this device type.\", False\n \n if 'id' not in data['currentVersion']:\n return \"Invalid current version data for this device type.\", False\n \n # Find the current version ID\n current_version_id = data['currentVersion']['id']\n \n # Handle missing availableVersions key\n if 'availableVersions' not in data:\n data['availableVersions'] = []\n \n # Check if current version is the only available version\n available_version_ids = [version.get('id') for version in data['availableVersions'] if version.get('id')]\n no_available_versions = len(available_version_ids) == 1 and current_version_id in available_version_ids\n \n # Remove the current version and filter out specific attributes\n data['availableVersions'] = [\n # iterate over each element in available versions and remove extra elements\n {key: version[key] for key in version if key not in ['releaseDate', 'firmware']}\n for version in data['availableVersions']\n if version.get('id') != current_version_id\n ]\n \n # Remove from final JSON (safely handle missing keys)\n data.pop('currentVersion', None)\n data.pop('lastUpgrade', None)\n data.pop('nextUpgrade', None)\n data.pop('isUpgradeAvailable', None)\n data.pop('participateInNextBetaRelease', None)\n \n # Check if 'availableVersions' is an empty list\n if not data['availableVersions']:\n return \"Running the latest firmware.\", no_available_versions\n else:\n # Keep the original data if not empty\n # Return the updated JSON data as a string\n return json.dumps(data, indent=4), no_available_versions\n \n except json.JSONDecodeError:\n return \"Invalid JSON data for this device type.\", False\n except KeyError as e:\n return f\"Missing required data field: {str(e)}\", False\n except Exception as e:\n return f\"Error processing device data: {str(e)}\", False\n\n# Process each device type and capture both JSON and boolean results\napplianceResult, applianceNoVersions = remove_current_version_and_attributes(mxDetails)\nswitchResult, switchNoVersions = remove_current_version_and_attributes(msDetails)\nwirelessResult, wirelessNoVersions = remove_current_version_and_attributes(mrDetails)\n\n# Set the JSON results for backward compatibility\napplianceAvailableVersionsJson = applianceResult\nswitchAvailableVersionsJson = switchResult\nwirelessAvailableVersionsJson = wirelessResult\n\n# Set individual boolean flags for each product type (using positive logic)\n# True = upgrades available, False = no upgrades available\napplianceHasUpgradeAvailable = not applianceNoVersions\nswitchHasUpgradeAvailable = not switchNoVersions\nwirelessHasUpgradeAvailable = not wirelessNoVersions\n", + "script_arguments": [ + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceDetails$", + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchDetails$", + "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessDetails$" + ], + "script_queries": [ + { + "script_query": "applianceAvailableVersionsJson", + "script_query_name": "applianceAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "switchAvailableVersionsJson", + "script_query_name": "switchAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "wirelessAvailableVersionsJson", + "script_query_name": "wirelessAvailableVersionsJson", + "script_query_type": "string" + }, + { + "script_query": "applianceHasUpgradeAvailable", + "script_query_name": "applianceHasUpgradeAvailable", + "script_query_type": "boolean" + }, + { + "script_query": "switchHasUpgradeAvailable", + "script_query_name": "switchHasUpgradeAvailable", + "script_query_type": "boolean" + }, + { + "script_query": "wirelessHasUpgradeAvailable", + "script_query_name": "wirelessHasUpgradeAvailable", + "script_query_type": "boolean" + } + ], + "skip_execution": false + }, + "object_type": "definition_activity" + }, + { + "unique_name": "definition_activity_02M3KCC16KVL679xGr1IX2USKsfHp7EFzVx", + "name": "Set Variables", + "title": "Set Variables", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Sets output variables with processed firmware information and summary results.", + "display_name": "Set Variables", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.applianceCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.applianceAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionShortName$ (ID: $activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.switchCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.switchAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$", + "variable_value_new": "$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionShortName$ (ID:$activity.definition_activity_02M3IVKIZS08U0H7qiGNWAtzvz7OkVBAI0p.output.jsonpath_queries.wirelessCurrVersionId$)" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.wirelessAvailableVersionsJson$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$", + "variable_value_new": "Appliance Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MVNE15DQQ3GM2uGQAx8zHoAAIsYmtPY$\nAppliance Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYCAE4Z471oBd6zU3dI7HlwvXsNtZ4q$\n------------------------------------\nSwitch Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MYR7I3LS64vFgpXcAidxLtVMy50gOdZ$\nSwitch Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZ49LWOK23aGQRbYOcYcm8ivPEZ2mVf$\n------------------------------------\nWireless Current Version: $workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZEFROAQL7kpDMAgvAu62wWwqTwJmqJ$\nWireless Available Version(s):\n$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3MZOEXMFJN34Sue1HxX2IRzkVMmDXuMz$\n------------------------------------" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M6KC1YUN2E21oTPUAWTuiigLqni8IaiMR$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results_code$", + "variable_value_new": "completed-successfully" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 200 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Success" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYYLS61FZLF0ryAp4sqcDyP4E8mhuheHl$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.applianceHasUpgradeAvailable$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3N3D6E9MRS0zGiJk4LnOpQ2TuV3wX4yZ$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.switchHasUpgradeAvailable$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02M3N4E7F0NST1AHjKl5MoQpR3UvW4xY5zA$", + "variable_value_new": "$activity.definition_activity_02M3J5QYN9IQR5PcWCx4uv47zJMWbpGUP2P.output.script_queries.wirelessHasUpgradeAvailable$" + } + ] + }, + "object_type": "definition_activity" + } + ] + }, + { + "unique_name": "definition_activity_02PYK5VWKXWO03SwInni34FV61tFGMogA14", + "name": "Condition Branch", + "title": "Firmware Data Failed", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Firmware data retrieval failed - set error outputs and terminate workflow.", + "display_name": "Firmware Data Failed", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5VXKM0224WPCi8cJLvdfvalA1JFJt9", + "name": "Set Variables", + "title": "Set Firmware Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error outputs for firmware data retrieval failure.", + "display_name": "Set Firmware Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": "$activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNM9O04WSyjWX5NG0o5H3rbSFXFi$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Firmware Data Retrieval Failed" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl$", + "variable_value_new": "Failed to retrieve firmware data for network. Error: $activity.definition_activity_02MGBHTE6I3GX3DjiCchzbnQ27TYv3mNIjt.output.variable_workflow_02LV1H3CNMB7K7L2YWKcivCpvRDwhECTDqR$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Failed: Firmware data retrieval error" + } + ] + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + } + ] + }, + { + "unique_name": "definition_activity_02PYK5VQJMDSF5ESkvsZQVY94LjCs3jQbHu", + "name": "Condition Branch", + "title": "Network Not Found", + "type": "logic.condition_block", + "base_type": "activity", + "properties": { + "condition": { + "left_operand": "$activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCS9H7YNIYX1GDaReaAe3aek2b4CnpPEW$", + "operator": "ne", + "right_operand": 200 + }, + "continue_on_failure": false, + "description": "Network lookup failed - set error outputs and terminate workflow.", + "display_name": "Network Not Found", + "skip_execution": false + }, + "object_type": "definition_activity", + "actions": [ + { + "unique_name": "definition_activity_02PYK5VRJACY04QBD6lQGzESHLHYeadvaZe", + "name": "Set Variables", + "title": "Set Network Error", + "type": "core.set_multiple_variables", + "base_type": "activity", + "properties": { + "continue_on_failure": false, + "description": "Set error outputs for network not found.", + "display_name": "Set Network Error", + "skip_execution": false, + "variables_to_update": [ + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIPF36xAo4ekXNelumZ8N2XzZdG$", + "variable_value_new": 404 + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTJ5NE1O23tXaKnEe0XOOGEJ4zH7$", + "variable_value_new": "Network Not Found" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.variable_workflow_02PYK5VBTIZ1M25E7SGVpt8SrknI56VrtMl$", + "variable_value_new": "Network '$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.input.variable_workflow_02M30H9ZWVYG97Ddcta3xu7rrVUZsl8ifwq$' not found in organization. Error details: $activity.definition_activity_02M30HGB4LNA03KaCfBjUVYxuyHAOiEq2IB.output.variable_workflow_02LCSAES32AOH7RGaVHj5aM3SixcS34Qdqc$" + }, + { + "variable_to_update": "$workflow.definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF.output.workflow_results$", + "variable_value_new": "Failed: Network not found" + } + ] + }, + "object_type": "definition_activity" + } + ] + } + ] + } + ] + } + ], + "categories": [ + "category_02M5I40Y7XSOX59ZtwCZnsrkS73sAGa3w1t" + ] + }, + "atomic_workflows": [ + "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6" + ], + "dependent_workflows": [ + "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", + "definition_workflow_02LCR4UKH38PM6zDR4Bx2b2J165gCF1mhvh", + "definition_workflow_02LV1H3CNM49K1df7J02ad4wyV6Jv0E23b6" + ] + } + ], "atomic_workflows": [ "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF" ], "dependent_workflows": [ "definition_workflow_02M605GS81XN44qr4RBWrJ6Zazk7k0ArIYX", "definition_workflow_02LCR4UKH38PM6zDR4Bx2b2J165gCF1mhvh", + "definition_workflow_02M30GYJJSYJL0wQPPnkQgIcavBkG6796mF", "definition_workflow_02M3057KLFJ745Vm184muHicvBpdJ0s0vGF" ] }