{
  "type": "workflow_collections",
  "macros": [],
  "exported_tags": [
    "Microsoft",
    "microsoft-sharepoint-v2",
    "use-case"
  ],
  "data": [
    {
      "@type": "WorkflowCollection",
      "name": "SOC Use Cases - Microsoft SharePoint and OneDrive v2",
      "description": "Use-case playbooks for the Microsoft SharePoint and OneDrive connector (5.0.0, Microsoft Graph): an oversharing review that revokes anonymous and organisation-wide links, a malicious-document response that preserves evidence, revokes links and quarantines the file (to the recycle bin, restorable), and the four OneDrive use cases (departing user handoff, sharing exposure response, version rollback, search and archive).",
      "visible": true,
      "image": null,
      "uuid": "a7d37275-ea14-536e-92e7-16635031e597",
      "recordTags": [
        "microsoft-sharepoint-v2",
        "Microsoft",
        "use-case"
      ],
      "workflows": [
        {
          "@type": "Workflow",
          "name": "SharePoint - Oversharing review and revoke",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Audit every file under a folder for sharing exposure (anonymous links, organisation-wide links, guest grantees). For each file with an anonymous or organisation link, revoke that link. Guest grants are reported, not removed, so the owner can decide. Logs one alert record with the result.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "folder_path",
            "notify_to"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/7db38637-657c-546d-b01e-16b4ad1c43f9",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "folder_path"
                  },
                  {
                    "name": "notify_to"
                  }
                ],
                "title": "SharePoint - Oversharing review",
                "resources": [
                  "alerts"
                ],
                "route": "1403d14d-afcc-5cdd-9422-865e9c24a38d",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "folder_path": "{{vars.request.data[\"folder_path\"]}}",
                      "notify_to": "{{vars.request.data[\"notify_to\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "7db38637-657c-546d-b01e-16b4ad1c43f9"
            },
            {
              "@type": "WorkflowStep",
              "name": "Audit Sharing",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "audit_sharing",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "folder_path": "{{ vars.input.params.folder_path }}",
                  "recursive": true,
                  "max_items": 200
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Audit Sharing",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "cebf9404-01a4-5af6-af89-0ace7f617a02"
            },
            {
              "@type": "WorkflowStep",
              "name": "Any Exposure",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "exposed files found",
                    "condition": "{{ vars.steps.Audit_Sharing.data.findings_count | int > 0 }}",
                    "step_iri": "/api/3/workflow_steps/f01ab27a-d646-58a4-b85d-55bdb4612fe9",
                    "step_name": "Revoke Exposures"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/a490fbf3-0fb3-5756-9eae-2876ca1a20e3",
                    "step_name": "Log Clean Result"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "376ca860-6b84-5d0e-9a5e-7750f4a11a72"
            },
            {
              "@type": "WorkflowStep",
              "name": "Revoke Exposures",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "revoke_permission",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.item.path }}",
                  "permission_id": "{{ (vars.item.exposures | selectattr('exposure', 'in', ['anonymous_link', 'organization_link']) | first).id }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Revoke Permission",
                "step_variables": [],
                "pickFromTenant": false,
                "for_each": {
                  "item": "{{ vars.steps.Audit_Sharing.data.findings }}",
                  "parallel": false,
                  "condition": "{{ vars.item.exposures | selectattr('exposure', 'in', ['anonymous_link', 'organization_link']) | list | length > 0 }}"
                }
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "f01ab27a-d646-58a4-b85d-55bdb4612fe9"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Revocations",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint oversharing review: {{ vars.input.params.folder_path }}",
                  "description": "Audited {{ vars.steps.Audit_Sharing.data.audited_count }} files under {{ vars.input.params.folder_path }}; {{ vars.steps.Audit_Sharing.data.findings_count }} exposed; anonymous and organisation links revoked for those files."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "f0330c1f-4f28-5264-8c40-e7a246a1946b"
            },
            {
              "@type": "WorkflowStep",
              "name": "Notify Owners",
              "description": null,
              "arguments": {
                "connector": "smtp",
                "operation": "send_email",
                "params": {
                  "to": [
                    "{{ vars.input.params.notify_to }}"
                  ],
                  "subject": "Sharing links revoked in {{ vars.input.params.folder_path }}",
                  "body": "The SharePoint oversharing review revoked anonymous and organisation links on: {{ vars.steps.Audit_Sharing.data.findings | map(attribute='path') | join(', ') }}. Files stay in place; re-share with a named audience if access is still needed."
                },
                "version": "2.6.0",
                "name": "SMTP",
                "operationTitle": "Send Email",
                "step_variables": [],
                "pickFromTenant": false,
                "config": ""
              },
              "status": null,
              "top": "770",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/4c0019b2-055c-44d0-968c-678a0c2d762e",
              "group": null,
              "uuid": "c7be8008-5416-5762-9a1a-72d6c5cde566"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Clean Result",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint oversharing review: {{ vars.input.params.folder_path }} (clean)",
                  "description": "Audited {{ vars.steps.Audit_Sharing.data.audited_count }} files under {{ vars.input.params.folder_path }}; nothing exposed."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "a490fbf3-0fb3-5756-9eae-2876ca1a20e3"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "900",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "7b9347e9-f256-5752-b01a-20b617271324"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Audit Sharing",
              "targetStep": "/api/3/workflow_steps/cebf9404-01a4-5af6-af89-0ace7f617a02",
              "sourceStep": "/api/3/workflow_steps/7db38637-657c-546d-b01e-16b4ad1c43f9",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "e8de2a0d-08b6-55c0-8505-d329e7185464"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Audit Sharing -> Any Exposure",
              "targetStep": "/api/3/workflow_steps/376ca860-6b84-5d0e-9a5e-7750f4a11a72",
              "sourceStep": "/api/3/workflow_steps/cebf9404-01a4-5af6-af89-0ace7f617a02",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "a6f507f3-6032-5ad0-9821-91f023608bbb"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Exposure -> Revoke Exposures",
              "targetStep": "/api/3/workflow_steps/f01ab27a-d646-58a4-b85d-55bdb4612fe9",
              "sourceStep": "/api/3/workflow_steps/376ca860-6b84-5d0e-9a5e-7750f4a11a72",
              "label": "exposed files found",
              "isExecuted": false,
              "group": null,
              "uuid": "bcb94b72-1671-541c-9870-8089a32f98b3"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Exposure -> Log Clean Result",
              "targetStep": "/api/3/workflow_steps/a490fbf3-0fb3-5756-9eae-2876ca1a20e3",
              "sourceStep": "/api/3/workflow_steps/376ca860-6b84-5d0e-9a5e-7750f4a11a72",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "7a797808-c790-5c8e-9a02-d1989fa217db"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Revoke Exposures -> Log Revocations",
              "targetStep": "/api/3/workflow_steps/f0330c1f-4f28-5264-8c40-e7a246a1946b",
              "sourceStep": "/api/3/workflow_steps/f01ab27a-d646-58a4-b85d-55bdb4612fe9",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "1dfb5a5e-ec8e-544c-9858-ad5993273ddc"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Revocations -> Notify Owners",
              "targetStep": "/api/3/workflow_steps/c7be8008-5416-5762-9a1a-72d6c5cde566",
              "sourceStep": "/api/3/workflow_steps/f0330c1f-4f28-5264-8c40-e7a246a1946b",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "0e0f4d33-12f8-5fda-9be2-93d2404ba5f6"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Notify Owners -> End",
              "targetStep": "/api/3/workflow_steps/7b9347e9-f256-5752-b01a-20b617271324",
              "sourceStep": "/api/3/workflow_steps/c7be8008-5416-5762-9a1a-72d6c5cde566",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "d8ced17e-e699-5800-95aa-d82c3cd82621"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Clean Result -> End",
              "targetStep": "/api/3/workflow_steps/7b9347e9-f256-5752-b01a-20b617271324",
              "sourceStep": "/api/3/workflow_steps/a490fbf3-0fb3-5756-9eae-2876ca1a20e3",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "f238f1da-7627-5463-8d60-f4a97419f22b"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "8a62d503-7e07-5296-83bb-e42ff5a89667",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "SharePoint - Anonymous link sweep",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Anonymous links only. Audit a folder; for each file with an anonymous (\"anyone with the link\") link, revoke it. Organisation-wide links and guest grants are left as they are (use Oversharing review for those). Notifies the owner. Logs one alert record.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "folder_path",
            "notify_to"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/fe6a4a7f-395a-51a0-94fd-1e978d29285f",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "folder_path"
                  },
                  {
                    "name": "notify_to"
                  }
                ],
                "title": "SharePoint - Anonymous link sweep",
                "resources": [
                  "alerts"
                ],
                "route": "36bd5020-f022-552b-a0df-6e75224323fc",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "folder_path": "{{vars.request.data[\"folder_path\"]}}",
                      "notify_to": "{{vars.request.data[\"notify_to\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "fe6a4a7f-395a-51a0-94fd-1e978d29285f"
            },
            {
              "@type": "WorkflowStep",
              "name": "Audit Sharing",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "audit_sharing",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "folder_path": "{{ vars.input.params.folder_path }}",
                  "recursive": true,
                  "max_items": 200
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Audit Sharing",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "51192915-5267-585c-bda4-a8840c981dae"
            },
            {
              "@type": "WorkflowStep",
              "name": "Any Exposure",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "exposed files found",
                    "condition": "{{ vars.steps.Audit_Sharing.data.findings | map(attribute='exposures') | map('selectattr', 'exposure', 'equalto', 'anonymous_link') | map('list') | map('length') | sum > 0 }}",
                    "step_iri": "/api/3/workflow_steps/d2b91fe7-2c59-5330-aa91-52379f1851ad",
                    "step_name": "Revoke Exposures"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/26797412-a16b-585b-917b-3308b7537555",
                    "step_name": "Log Clean Result"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "c715d35b-feac-567f-a551-44fc97ad0019"
            },
            {
              "@type": "WorkflowStep",
              "name": "Revoke Exposures",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "revoke_permission",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.item.path }}",
                  "permission_id": "{{ (vars.item.exposures | selectattr('exposure', 'in', ['anonymous_link']) | first).id }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Revoke Permission",
                "step_variables": [],
                "pickFromTenant": false,
                "for_each": {
                  "item": "{{ vars.steps.Audit_Sharing.data.findings }}",
                  "parallel": false,
                  "condition": "{{ vars.item.exposures | selectattr('exposure', 'in', ['anonymous_link']) | list | length > 0 }}"
                }
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "d2b91fe7-2c59-5330-aa91-52379f1851ad"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Revocations",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint anonymous sweep: {{ vars.input.params.folder_path }}",
                  "description": "Audited {{ vars.steps.Audit_Sharing.data.audited_count }} files under {{ vars.input.params.folder_path }}; {{ vars.steps.Audit_Sharing.data.findings_count }} exposed; anonymous links revoked for those files."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "4c31d183-fdea-597f-8c55-5bbb97e961c6"
            },
            {
              "@type": "WorkflowStep",
              "name": "Notify Owners",
              "description": null,
              "arguments": {
                "connector": "smtp",
                "operation": "send_email",
                "params": {
                  "to": [
                    "{{ vars.input.params.notify_to }}"
                  ],
                  "subject": "Anonymous links revoked in {{ vars.input.params.folder_path }}",
                  "body": "The SharePoint oversharing review revoked anonymous and organisation links on: {{ vars.steps.Audit_Sharing.data.findings | map(attribute='path') | join(', ') }}. Files stay in place; re-share with a named audience if access is still needed."
                },
                "version": "2.6.0",
                "name": "SMTP",
                "operationTitle": "Send Email",
                "step_variables": [],
                "pickFromTenant": false,
                "config": ""
              },
              "status": null,
              "top": "770",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/4c0019b2-055c-44d0-968c-678a0c2d762e",
              "group": null,
              "uuid": "bbbb4e70-2ad2-55fa-811c-1b2ab061b658"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Clean Result",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint anonymous sweep: {{ vars.input.params.folder_path }} (clean)",
                  "description": "Audited {{ vars.steps.Audit_Sharing.data.audited_count }} files under {{ vars.input.params.folder_path }}; nothing exposed."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "26797412-a16b-585b-917b-3308b7537555"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "900",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "a2a69396-cdbb-5c98-9100-7633552c2054"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Audit Sharing",
              "targetStep": "/api/3/workflow_steps/51192915-5267-585c-bda4-a8840c981dae",
              "sourceStep": "/api/3/workflow_steps/fe6a4a7f-395a-51a0-94fd-1e978d29285f",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "9146737e-bf6e-583b-bba6-ba0796cf8b07"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Audit Sharing -> Any Exposure",
              "targetStep": "/api/3/workflow_steps/c715d35b-feac-567f-a551-44fc97ad0019",
              "sourceStep": "/api/3/workflow_steps/51192915-5267-585c-bda4-a8840c981dae",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "fcddc4ea-c811-5818-a62a-924a74a997d8"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Exposure -> Revoke Exposures",
              "targetStep": "/api/3/workflow_steps/d2b91fe7-2c59-5330-aa91-52379f1851ad",
              "sourceStep": "/api/3/workflow_steps/c715d35b-feac-567f-a551-44fc97ad0019",
              "label": "exposed files found",
              "isExecuted": false,
              "group": null,
              "uuid": "2cf97cda-afd6-5b2f-8795-da9acac82a05"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Exposure -> Log Clean Result",
              "targetStep": "/api/3/workflow_steps/26797412-a16b-585b-917b-3308b7537555",
              "sourceStep": "/api/3/workflow_steps/c715d35b-feac-567f-a551-44fc97ad0019",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "99b5fa04-6d98-5ca0-ac12-d6579bbd1b81"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Revoke Exposures -> Log Revocations",
              "targetStep": "/api/3/workflow_steps/4c31d183-fdea-597f-8c55-5bbb97e961c6",
              "sourceStep": "/api/3/workflow_steps/d2b91fe7-2c59-5330-aa91-52379f1851ad",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "30b57c7b-a5ae-54cd-b2f3-fba5e5ad30ac"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Revocations -> Notify Owners",
              "targetStep": "/api/3/workflow_steps/bbbb4e70-2ad2-55fa-811c-1b2ab061b658",
              "sourceStep": "/api/3/workflow_steps/4c31d183-fdea-597f-8c55-5bbb97e961c6",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "dcee6880-f600-5fde-9d86-ed3939120718"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Notify Owners -> End",
              "targetStep": "/api/3/workflow_steps/a2a69396-cdbb-5c98-9100-7633552c2054",
              "sourceStep": "/api/3/workflow_steps/bbbb4e70-2ad2-55fa-811c-1b2ab061b658",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "9a61e388-ddcf-5cfe-9ff8-9b1cd4c6827f"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Clean Result -> End",
              "targetStep": "/api/3/workflow_steps/a2a69396-cdbb-5c98-9100-7633552c2054",
              "sourceStep": "/api/3/workflow_steps/26797412-a16b-585b-917b-3308b7537555",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "fa88f57f-a778-5c89-91d0-ade713baac79"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "57486873-aa9d-5f98-a442-771e195326ad",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "SharePoint - Malicious document quarantine",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "For a document reported as malicious: confirm it exists, save a copy to FortiSOAR as evidence, snapshot who could reach it, revoke every anonymous or organisation link, then delete it (it goes to the site recycle bin, so a site owner can restore it). Logs one alert record.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "file_path"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/7b98fd94-4a6a-5965-afc3-b81f209925f7",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "file_path"
                  }
                ],
                "title": "SharePoint - Quarantine document",
                "resources": [
                  "alerts"
                ],
                "route": "5a0e6829-cacb-5e62-a225-5dd1f6a9a03a",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "file_path": "{{vars.request.data[\"file_path\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "7b98fd94-4a6a-5965-afc3-b81f209925f7"
            },
            {
              "@type": "WorkflowStep",
              "name": "Get Metadata",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "get_file_metadata",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.file_path }}"
                },
                "ignore_errors": true,
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Get File Metadata",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "a75cc709-ba1b-5863-a637-575bbfe24865"
            },
            {
              "@type": "WorkflowStep",
              "name": "Is Present",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "file found",
                    "condition": "{{ (vars.steps.Get_Metadata.data | default({})).id is defined }}",
                    "step_iri": "/api/3/workflow_steps/aa126537-7169-5d98-9d00-a8a005428a5c",
                    "step_name": "Preserve Evidence"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/19f06b1f-9c15-5343-af5e-7ca47e7dfc5f",
                    "step_name": "Record Not Found"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "1a4a204a-456f-5521-9365-28010e54d4d8"
            },
            {
              "@type": "WorkflowStep",
              "name": "Record Not Found",
              "description": null,
              "arguments": {
                "outcome": "not_found"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/04d0cf46-b6a8-42c4-8683-60a7eaa69e8f",
              "group": null,
              "uuid": "19f06b1f-9c15-5343-af5e-7ca47e7dfc5f"
            },
            {
              "@type": "WorkflowStep",
              "name": "Preserve Evidence",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "read_file_content",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.file_path }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Download File",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "aa126537-7169-5d98-9d00-a8a005428a5c"
            },
            {
              "@type": "WorkflowStep",
              "name": "Snapshot Permissions",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "list_permissions",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.file_path }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "List Permissions",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "2c334805-a84c-52e3-ad58-e7cbdee7886b"
            },
            {
              "@type": "WorkflowStep",
              "name": "Revoke Links",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "revoke_permission",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.file_path }}",
                  "permission_id": "{{ vars.item.id }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Revoke Permission",
                "step_variables": [],
                "pickFromTenant": false,
                "for_each": {
                  "item": "{{ vars.steps.Snapshot_Permissions.data['items'] }}",
                  "parallel": false,
                  "condition": "{{ vars.item.exposure in ['anonymous_link', 'organization_link'] }}"
                }
              },
              "status": null,
              "top": "770",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "b27466e1-23cf-5b93-aa32-bd26dc8006f4"
            },
            {
              "@type": "WorkflowStep",
              "name": "Quarantine File",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "delete_file",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.file_path }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Delete File",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "900",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "67668b87-04f5-5b5a-8307-7582b922f1b9"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Quarantine",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint quarantine: {{ vars.input.params.file_path }}",
                  "description": "Evidence copy: {{ vars.steps.Preserve_Evidence.data.attachment.name }}. Permissions before quarantine: {{ vars.steps.Snapshot_Permissions.data.count }}. File moved to the site recycle bin."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "1030",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "43d00fd8-1af8-5fac-828e-4513651c7356"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "1160",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "93fa2009-64ce-5f0f-908a-92d2bdf09cd8"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Get Metadata",
              "targetStep": "/api/3/workflow_steps/a75cc709-ba1b-5863-a637-575bbfe24865",
              "sourceStep": "/api/3/workflow_steps/7b98fd94-4a6a-5965-afc3-b81f209925f7",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "dbb9936e-d055-5f36-be92-5b497546c404"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Get Metadata -> Is Present",
              "targetStep": "/api/3/workflow_steps/1a4a204a-456f-5521-9365-28010e54d4d8",
              "sourceStep": "/api/3/workflow_steps/a75cc709-ba1b-5863-a637-575bbfe24865",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "e230c3f2-1a4d-5832-8e5a-0b698706a794"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Is Present -> Preserve Evidence",
              "targetStep": "/api/3/workflow_steps/aa126537-7169-5d98-9d00-a8a005428a5c",
              "sourceStep": "/api/3/workflow_steps/1a4a204a-456f-5521-9365-28010e54d4d8",
              "label": "file found",
              "isExecuted": false,
              "group": null,
              "uuid": "e73ddc0f-c683-533d-b7fa-3f2ef898b79e"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Is Present -> Record Not Found",
              "targetStep": "/api/3/workflow_steps/19f06b1f-9c15-5343-af5e-7ca47e7dfc5f",
              "sourceStep": "/api/3/workflow_steps/1a4a204a-456f-5521-9365-28010e54d4d8",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "6c1250ba-4e6c-5bad-9d70-d9bc5f95614b"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Record Not Found -> End",
              "targetStep": "/api/3/workflow_steps/93fa2009-64ce-5f0f-908a-92d2bdf09cd8",
              "sourceStep": "/api/3/workflow_steps/19f06b1f-9c15-5343-af5e-7ca47e7dfc5f",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "f37be074-b2d8-57ba-840a-8bacd05d11a5"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Preserve Evidence -> Snapshot Permissions",
              "targetStep": "/api/3/workflow_steps/2c334805-a84c-52e3-ad58-e7cbdee7886b",
              "sourceStep": "/api/3/workflow_steps/aa126537-7169-5d98-9d00-a8a005428a5c",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "8e89bf4c-4e12-59b8-8f9a-08f07d44944c"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Snapshot Permissions -> Revoke Links",
              "targetStep": "/api/3/workflow_steps/b27466e1-23cf-5b93-aa32-bd26dc8006f4",
              "sourceStep": "/api/3/workflow_steps/2c334805-a84c-52e3-ad58-e7cbdee7886b",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "ca6d2f67-01f0-5990-b82e-8cf790c5360d"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Revoke Links -> Quarantine File",
              "targetStep": "/api/3/workflow_steps/67668b87-04f5-5b5a-8307-7582b922f1b9",
              "sourceStep": "/api/3/workflow_steps/b27466e1-23cf-5b93-aa32-bd26dc8006f4",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "22179bdb-325c-5c24-b7be-8fbac03ef801"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Quarantine File -> Log Quarantine",
              "targetStep": "/api/3/workflow_steps/43d00fd8-1af8-5fac-828e-4513651c7356",
              "sourceStep": "/api/3/workflow_steps/67668b87-04f5-5b5a-8307-7582b922f1b9",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "48263104-748b-5837-8ed0-ff87374e41af"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Quarantine -> End",
              "targetStep": "/api/3/workflow_steps/93fa2009-64ce-5f0f-908a-92d2bdf09cd8",
              "sourceStep": "/api/3/workflow_steps/43d00fd8-1af8-5fac-828e-4513651c7356",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "8f19ad8f-82ee-552d-98ed-335af528db97"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "e686b2b0-0816-5a2d-9220-e61f9e6daaee",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "SharePoint - Permission drift baseline and remediation",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Snapshot a folder's sharing. First run stores the baseline. Later runs diff against it: no drift refreshes the baseline; drift pauses at an analyst gate. Approve revokes the added link permissions, re-snapshots and refreshes the baseline. Reject records the drift and keeps the old baseline.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "folder_path"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/85de6bf2-35a2-51c8-afa5-947eaaa4d35c",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "folder_path"
                  }
                ],
                "title": "SharePoint - Permission drift check",
                "resources": [
                  "alerts"
                ],
                "route": "3d81ae15-86cc-5550-a005-9b033618049d",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "folder_path": "{{vars.request.data[\"folder_path\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "85de6bf2-35a2-51c8-afa5-947eaaa4d35c"
            },
            {
              "@type": "WorkflowStep",
              "name": "Take Snapshot",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "sharing_snapshot",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "folder_path": "{{ vars.input.params.folder_path }}",
                  "recursive": true,
                  "max_items": 200
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Sharing Snapshot",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "f270792a-f21e-5dbf-ac13-aa5ea02f215c"
            },
            {
              "@type": "WorkflowStep",
              "name": "Find Baseline",
              "description": null,
              "arguments": {
                "module": "alerts?$limit=5",
                "query": {
                  "sort": [],
                  "limit": 5,
                  "logic": "AND",
                  "filters": [
                    {
                      "type": "primitive",
                      "field": "name",
                      "value": "SharePoint sharing baseline: {{ vars.input.params.folder_path }}",
                      "operator": "eq",
                      "_operator": "eq"
                    }
                  ]
                },
                "checkboxFields": false
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/b593663d-7d13-40ce-a3a3-96dece928770",
              "group": null,
              "uuid": "e68d9ab9-c434-5e79-9f1b-e03de3a544f0"
            },
            {
              "@type": "WorkflowStep",
              "name": "Has Baseline",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "baseline exists",
                    "condition": "{{ vars.steps.Find_Baseline | length > 0 }}",
                    "step_iri": "/api/3/workflow_steps/2fa6effd-7477-5d44-a1a0-f6d062479c75",
                    "step_name": "Diff Snapshot"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/8f3d79eb-d7fa-52fe-a261-387b94266bf6",
                    "step_name": "Create Baseline"
                  }
                ]
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "9c042542-5011-5011-8e45-5da22058f0d4"
            },
            {
              "@type": "WorkflowStep",
              "name": "Create Baseline",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint sharing baseline: {{ vars.input.params.folder_path }}",
                  "description": "{{ vars.steps.Take_Snapshot.data.snapshot_b64 }}"
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "8f3d79eb-d7fa-52fe-a261-387b94266bf6"
            },
            {
              "@type": "WorkflowStep",
              "name": "Diff Snapshot",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "diff_sharing_snapshot",
                "config": "",
                "params": {
                  "previous": "{{ vars.steps.Find_Baseline[0].description }}",
                  "current": "{{ vars.steps.Take_Snapshot.data.snapshot_b64 }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Diff Sharing Snapshot",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "2fa6effd-7477-5d44-a1a0-f6d062479c75"
            },
            {
              "@type": "WorkflowStep",
              "name": "Any Drift",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "drift found",
                    "condition": "{{ vars.steps.Diff_Snapshot.data.drift_count > 0 }}",
                    "step_iri": "/api/3/workflow_steps/d66d855d-1abf-59a9-bef1-fc397a4c594f",
                    "step_name": "Analyst Gate"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/a95ad9a5-d508-5a63-9548-2a47ec10c906",
                    "step_name": "Refresh Baseline"
                  }
                ]
              },
              "status": null,
              "top": "770",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "60a54970-3f45-585a-bda0-9c1ffd646505"
            },
            {
              "@type": "WorkflowStep",
              "name": "Refresh Baseline",
              "description": null,
              "arguments": {
                "resource": {
                  "description": "{{ vars.steps.Take_Snapshot.data.snapshot_b64 }}"
                },
                "collectionType": "/api/3/alerts",
                "collection": "{{ vars.steps.Find_Baseline[0]['@id'] }}"
              },
              "status": null,
              "top": "900",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/b593663d-7d13-40ce-a3a3-96dece928722",
              "group": null,
              "uuid": "a95ad9a5-d508-5a63-9548-2a47ec10c906"
            },
            {
              "@type": "WorkflowStep",
              "name": "Analyst Gate",
              "description": "{{ vars.steps.Diff_Snapshot.data.remediable_count }} new link permission(s) can be revoked; {{ vars.steps.Diff_Snapshot.data.guest_added | length }} file(s) gained a guest grant (reported only, not removed). Approve revokes the new links.",
              "arguments": {
                "is_approval": true,
                "type": "InputBased",
                "input": {
                  "schema": {
                    "title": "Sharing drift in {{ vars.input.params.folder_path }}",
                    "description": "{{ vars.steps.Diff_Snapshot.data.remediable_count }} new link permission(s) can be revoked; {{ vars.steps.Diff_Snapshot.data.guest_added | length }} file(s) gained a guest grant (reported only, not removed). Approve revokes the new links.",
                    "inputVariables": [
                      {
                        "name": "comment",
                        "type": "string",
                        "label": "Comment",
                        "title": "Text Area",
                        "usable": true,
                        "tooltip": "",
                        "dataType": "text",
                        "formType": "textarea",
                        "required": false,
                        "_expanded": true,
                        "templateUrl": "app/components/form/fields/textarea.html",
                        "defaultValue": null,
                        "_previousName": "",
                        "playbookField": true,
                        "jinjaExpressionView": true,
                        "useRecordFieldDefault": false,
                        "requiredCondition": "notrequired",
                        "_addRequiredConditions": true
                      }
                    ]
                  }
                },
                "record": "",
                "isRecordLinked": false,
                "owner_detail": {
                  "isAssigned": false
                },
                "step_variables": [],
                "response_mapping": {
                  "options": [
                    {
                      "option": "Approve revocation",
                      "primary": true,
                      "step_iri": "/api/3/workflow_steps/63989197-51ae-5267-8801-92447e722006"
                    },
                    {
                      "option": "Reject, keep baseline",
                      "step_iri": "/api/3/workflow_steps/8687660b-b652-59d7-807a-b12bb833cfb5"
                    }
                  ],
                  "duplicateOption": false,
                  "customSuccessMessage": "Awaiting Playbook resumed successfully."
                },
                "email_notification": {
                  "enabled": false,
                  "smtpParameters": []
                },
                "inline_channel_list": [],
                "external_channel_list": [],
                "unauthenticated_input": false
              },
              "status": null,
              "top": "900",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/a19333c2-c822-11ed-afa1-0242ac120002",
              "group": null,
              "uuid": "d66d855d-1abf-59a9-bef1-fc397a4c594f"
            },
            {
              "@type": "WorkflowStep",
              "name": "Revoke Drift Links",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "revoke_permission",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.item.path }}",
                  "permission_id": "{{ vars.item.permission_id }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Revoke Permission",
                "step_variables": [],
                "pickFromTenant": false,
                "for_each": {
                  "item": "{{ vars.steps.Diff_Snapshot.data['remediable'] }}",
                  "parallel": false,
                  "condition": ""
                }
              },
              "status": null,
              "top": "1030",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "63989197-51ae-5267-8801-92447e722006"
            },
            {
              "@type": "WorkflowStep",
              "name": "Resnapshot After Revoke",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "sharing_snapshot",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "folder_path": "{{ vars.input.params.folder_path }}",
                  "recursive": true,
                  "max_items": 200
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Sharing Snapshot",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "1160",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "46f7b645-31d8-5630-97a3-bf7d19e42abc"
            },
            {
              "@type": "WorkflowStep",
              "name": "Refresh Baseline After Revoke",
              "description": null,
              "arguments": {
                "resource": {
                  "description": "{{ vars.steps.Resnapshot_After_Revoke.data.snapshot_b64 }}"
                },
                "collectionType": "/api/3/alerts",
                "collection": "{{ vars.steps.Find_Baseline[0]['@id'] }}"
              },
              "status": null,
              "top": "1290",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/b593663d-7d13-40ce-a3a3-96dece928722",
              "group": null,
              "uuid": "c46d0f88-ff7d-5054-8a6c-14cc24a2f334"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Drift Report",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint drift report: {{ vars.input.params.folder_path }}",
                  "description": "Drift count {{ vars.steps.Diff_Snapshot.data.drift_count }}; remediable {{ vars.steps.Diff_Snapshot.data.remediable_count }}; guest grants added {{ vars.steps.Diff_Snapshot.data.guest_added | length }}. Analyst gate result recorded on the playbook run."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "1420",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "8687660b-b652-59d7-807a-b12bb833cfb5"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "1550",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "9b01565d-e85a-549a-ac69-bf26aabcf4ed"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Take Snapshot",
              "targetStep": "/api/3/workflow_steps/f270792a-f21e-5dbf-ac13-aa5ea02f215c",
              "sourceStep": "/api/3/workflow_steps/85de6bf2-35a2-51c8-afa5-947eaaa4d35c",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "58ef70fc-7022-5405-8f31-e3d299a9e2eb"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Take Snapshot -> Find Baseline",
              "targetStep": "/api/3/workflow_steps/e68d9ab9-c434-5e79-9f1b-e03de3a544f0",
              "sourceStep": "/api/3/workflow_steps/f270792a-f21e-5dbf-ac13-aa5ea02f215c",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "50762a4f-ece1-5edc-b72f-8a63b388a880"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Find Baseline -> Has Baseline",
              "targetStep": "/api/3/workflow_steps/9c042542-5011-5011-8e45-5da22058f0d4",
              "sourceStep": "/api/3/workflow_steps/e68d9ab9-c434-5e79-9f1b-e03de3a544f0",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "052b0573-cc16-5387-8fca-60603202600f"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Has Baseline -> Diff Snapshot",
              "targetStep": "/api/3/workflow_steps/2fa6effd-7477-5d44-a1a0-f6d062479c75",
              "sourceStep": "/api/3/workflow_steps/9c042542-5011-5011-8e45-5da22058f0d4",
              "label": "baseline exists",
              "isExecuted": false,
              "group": null,
              "uuid": "f2ea3107-0ade-51f8-886e-b3226898475e"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Has Baseline -> Create Baseline",
              "targetStep": "/api/3/workflow_steps/8f3d79eb-d7fa-52fe-a261-387b94266bf6",
              "sourceStep": "/api/3/workflow_steps/9c042542-5011-5011-8e45-5da22058f0d4",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "3b872020-4c06-5b92-b925-39610e6948e6"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Create Baseline -> End",
              "targetStep": "/api/3/workflow_steps/9b01565d-e85a-549a-ac69-bf26aabcf4ed",
              "sourceStep": "/api/3/workflow_steps/8f3d79eb-d7fa-52fe-a261-387b94266bf6",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "71064a71-197d-5152-b48b-d9038ec1826d"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Diff Snapshot -> Any Drift",
              "targetStep": "/api/3/workflow_steps/60a54970-3f45-585a-bda0-9c1ffd646505",
              "sourceStep": "/api/3/workflow_steps/2fa6effd-7477-5d44-a1a0-f6d062479c75",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "4c772c91-9487-558d-bd45-29cbe7408918"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Drift -> Analyst Gate",
              "targetStep": "/api/3/workflow_steps/d66d855d-1abf-59a9-bef1-fc397a4c594f",
              "sourceStep": "/api/3/workflow_steps/60a54970-3f45-585a-bda0-9c1ffd646505",
              "label": "drift found",
              "isExecuted": false,
              "group": null,
              "uuid": "a1bdb6d1-f6e7-5111-879e-8193ac8da68a"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Drift -> Refresh Baseline",
              "targetStep": "/api/3/workflow_steps/a95ad9a5-d508-5a63-9548-2a47ec10c906",
              "sourceStep": "/api/3/workflow_steps/60a54970-3f45-585a-bda0-9c1ffd646505",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "4ade2ac4-6b7c-5364-b53b-48d8da6c6911"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Refresh Baseline -> End",
              "targetStep": "/api/3/workflow_steps/9b01565d-e85a-549a-ac69-bf26aabcf4ed",
              "sourceStep": "/api/3/workflow_steps/a95ad9a5-d508-5a63-9548-2a47ec10c906",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "0e684866-7c6a-5954-bc97-b19038e2b4c8"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Analyst Gate -> Revoke Drift Links",
              "targetStep": "/api/3/workflow_steps/63989197-51ae-5267-8801-92447e722006",
              "sourceStep": "/api/3/workflow_steps/d66d855d-1abf-59a9-bef1-fc397a4c594f",
              "label": "Approve revocation",
              "isExecuted": false,
              "group": null,
              "uuid": "8910ff13-3fd8-52dc-bdaf-3064ec833d3f"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Analyst Gate -> Log Drift Report",
              "targetStep": "/api/3/workflow_steps/8687660b-b652-59d7-807a-b12bb833cfb5",
              "sourceStep": "/api/3/workflow_steps/d66d855d-1abf-59a9-bef1-fc397a4c594f",
              "label": "Reject, keep baseline",
              "isExecuted": false,
              "group": null,
              "uuid": "d493416f-d9aa-5e78-bedb-891ce51c1775"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Revoke Drift Links -> Resnapshot After Revoke",
              "targetStep": "/api/3/workflow_steps/46f7b645-31d8-5630-97a3-bf7d19e42abc",
              "sourceStep": "/api/3/workflow_steps/63989197-51ae-5267-8801-92447e722006",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "dd778119-581e-5b75-821c-3f4b8b664cd4"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Resnapshot After Revoke -> Refresh Baseline After Revoke",
              "targetStep": "/api/3/workflow_steps/c46d0f88-ff7d-5054-8a6c-14cc24a2f334",
              "sourceStep": "/api/3/workflow_steps/46f7b645-31d8-5630-97a3-bf7d19e42abc",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "bed7ca84-fafd-5a13-9c25-1b6bc34298da"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Refresh Baseline After Revoke -> Log Drift Report",
              "targetStep": "/api/3/workflow_steps/8687660b-b652-59d7-807a-b12bb833cfb5",
              "sourceStep": "/api/3/workflow_steps/c46d0f88-ff7d-5054-8a6c-14cc24a2f334",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "efe8ee65-f7cb-5be0-bffd-0d7114a74a9e"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Drift Report -> End",
              "targetStep": "/api/3/workflow_steps/9b01565d-e85a-549a-ac69-bf26aabcf4ed",
              "sourceStep": "/api/3/workflow_steps/8687660b-b652-59d7-807a-b12bb833cfb5",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "e6c018ea-9fde-59cf-a2c1-ea7dcbeccee3"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "dbb00584-96c1-53af-a128-9431281e54a8",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "SharePoint - Site governance check",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Check one new Microsoft 365 group (and its SharePoint site) against policy: owner present, visibility Private, display name with the required prefix. A missing owner is added automatically. A Public group waits for an analyst before it is made Private. A bad name notifies the owner by graph-mail.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "group_id",
            "naming_prefix",
            "owner_upn",
            "notify_to"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/9e9a7da5-58ac-5335-920b-a29eb7ef98ae",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "group_id"
                  },
                  {
                    "name": "naming_prefix"
                  },
                  {
                    "name": "owner_upn"
                  },
                  {
                    "name": "notify_to"
                  }
                ],
                "title": "SharePoint - Site governance check",
                "resources": [
                  "alerts"
                ],
                "route": "87c540e5-88fb-591a-9fbc-2e20c3a1d33f",
                "step_variables": {
                  "input": {
                    "params": {
                      "group_id": "{{vars.request.data[\"group_id\"]}}",
                      "naming_prefix": "{{vars.request.data[\"naming_prefix\"]}}",
                      "owner_upn": "{{vars.request.data[\"owner_upn\"]}}",
                      "notify_to": "{{vars.request.data[\"notify_to\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "9e9a7da5-58ac-5335-920b-a29eb7ef98ae"
            },
            {
              "@type": "WorkflowStep",
              "name": "Get Governance",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "get_site_governance",
                "config": "",
                "params": {
                  "group_id": "{{ vars.input.params.group_id }}",
                  "naming_prefix": "{{ vars.input.params.naming_prefix }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Get Site Governance",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "9a9258df-3f39-5a88-9edd-3f4266eff8ce"
            },
            {
              "@type": "WorkflowStep",
              "name": "Owner Check",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "no owner",
                    "condition": "{{ vars.steps.Get_Governance.data.owner_count == 0 }}",
                    "step_iri": "/api/3/workflow_steps/b819f8cb-5a4b-552a-b53f-e1d2e0638902",
                    "step_name": "Add Owner"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/7a955a08-0c8f-5cf1-b762-06f8ca734cb2",
                    "step_name": "Visibility Check"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "095c6ad1-9606-59be-b9ab-dd0376547198"
            },
            {
              "@type": "WorkflowStep",
              "name": "Add Owner",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "add_group_owner",
                "config": "",
                "params": {
                  "group_id": "{{ vars.input.params.group_id }}",
                  "owner_upn": "{{ vars.input.params.owner_upn }}",
                  "attempts": 6
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Add Group Owner",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "b819f8cb-5a4b-552a-b53f-e1d2e0638902"
            },
            {
              "@type": "WorkflowStep",
              "name": "Visibility Check",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "public group",
                    "condition": "{{ vars.steps.Get_Governance.data.visibility == 'Public' }}",
                    "step_iri": "/api/3/workflow_steps/272f8ccc-41d8-5407-9244-9e1107979db9",
                    "step_name": "Visibility Gate"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/94208bff-3667-5909-b345-abd11847954d",
                    "step_name": "Name Check"
                  }
                ]
              },
              "status": null,
              "top": "640",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "7a955a08-0c8f-5cf1-b762-06f8ca734cb2"
            },
            {
              "@type": "WorkflowStep",
              "name": "Visibility Gate",
              "description": "This Microsoft 365 group is Public, so anyone in the tenant can find it and join. Approve makes it Private (members keep access; outside users lose visibility). Reject leaves it Public and only the owner is notified.",
              "arguments": {
                "is_approval": true,
                "type": "InputBased",
                "input": {
                  "schema": {
                    "title": "Public group {{ vars.steps.Get_Governance.data.display_name }}",
                    "description": "This Microsoft 365 group is Public, so anyone in the tenant can find it and join. Approve makes it Private (members keep access; outside users lose visibility). Reject leaves it Public and only the owner is notified.",
                    "inputVariables": [
                      {
                        "name": "comment",
                        "type": "string",
                        "label": "Comment",
                        "title": "Text Area",
                        "usable": true,
                        "tooltip": "",
                        "dataType": "text",
                        "formType": "textarea",
                        "required": false,
                        "_expanded": true,
                        "templateUrl": "app/components/form/fields/textarea.html",
                        "defaultValue": null,
                        "_previousName": "",
                        "playbookField": true,
                        "jinjaExpressionView": true,
                        "useRecordFieldDefault": false,
                        "requiredCondition": "notrequired",
                        "_addRequiredConditions": true
                      }
                    ]
                  }
                },
                "record": "",
                "isRecordLinked": false,
                "owner_detail": {
                  "isAssigned": false
                },
                "step_variables": [],
                "response_mapping": {
                  "options": [
                    {
                      "option": "Approve, make Private",
                      "primary": true,
                      "step_iri": "/api/3/workflow_steps/567a0768-5dc1-5b94-8c48-edc5b6f73539"
                    },
                    {
                      "option": "Reject, keep Public",
                      "step_iri": "/api/3/workflow_steps/94208bff-3667-5909-b345-abd11847954d"
                    }
                  ],
                  "duplicateOption": false,
                  "customSuccessMessage": "Awaiting Playbook resumed successfully."
                },
                "email_notification": {
                  "enabled": false,
                  "smtpParameters": []
                },
                "inline_channel_list": [],
                "external_channel_list": [],
                "unauthenticated_input": false
              },
              "status": null,
              "top": "770",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/a19333c2-c822-11ed-afa1-0242ac120002",
              "group": null,
              "uuid": "272f8ccc-41d8-5407-9244-9e1107979db9"
            },
            {
              "@type": "WorkflowStep",
              "name": "Set Private",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "set_group_visibility",
                "config": "",
                "params": {
                  "group_id": "{{ vars.input.params.group_id }}",
                  "visibility": "Private"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Set Group Visibility",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "900",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "567a0768-5dc1-5b94-8c48-edc5b6f73539"
            },
            {
              "@type": "WorkflowStep",
              "name": "Name Check",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "bad name",
                    "condition": "{{ vars.steps.Get_Governance.data.name_ok == false }}",
                    "step_iri": "/api/3/workflow_steps/8b80134d-b6f2-59f1-9f60-9e63e8952b5c",
                    "step_name": "Notify Owner"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/50458aa9-9aef-56db-ac9d-0f7db65b2ca0",
                    "step_name": "Log Result"
                  }
                ]
              },
              "status": null,
              "top": "1030",
              "left": "880",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "94208bff-3667-5909-b345-abd11847954d"
            },
            {
              "@type": "WorkflowStep",
              "name": "Notify Owner",
              "description": null,
              "arguments": {
                "connector": "microsoft-graph-mail-v2",
                "operation": "send_email",
                "config": "",
                "params": {
                  "from": "{{ vars.input.params.owner_upn }}",
                  "body_type": "Rich Text",
                  "to_recipients": "{{ vars.steps.Get_Governance.data.owners[0] if vars.steps.Get_Governance.data.owners else vars.input.params.notify_to }}",
                  "subject": "New Microsoft 365 group needs a name change: {{ vars.steps.Get_Governance.data.display_name }}",
                  "body": "The group {{ vars.steps.Get_Governance.data.display_name }} does not start with {{ vars.input.params.naming_prefix }}. Rename it so the site follows the naming standard."
                },
                "version": "3.0.1",
                "name": "Microsoft Graph Mail v2",
                "operationTitle": "Send Email",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "1160",
              "left": "880",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "8b80134d-b6f2-59f1-9f60-9e63e8952b5c"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Result",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "Site governance: {{ vars.steps.Get_Governance.data.display_name }}",
                  "description": "Verdict {{ vars.steps.Get_Governance.data.verdict }}; findings {{ vars.steps.Get_Governance.data.findings | join(', ') }}."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "1290",
              "left": "1220",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "50458aa9-9aef-56db-ac9d-0f7db65b2ca0"
            },
            {
              "@type": "WorkflowStep",
              "name": "Export Verdict",
              "description": null,
              "arguments": {
                "verdict": "{{ vars.steps.Get_Governance.data.verdict }}",
                "group_id": "{{ vars.input.params.group_id }}"
              },
              "status": null,
              "top": "1420",
              "left": "1220",
              "stepType": "/api/3/workflow_step_types/04d0cf46-b6a8-42c4-8683-60a7eaa69e8f",
              "group": null,
              "uuid": "e5e3823d-5d5e-55ae-92a9-d3a5d6f86155"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "1550",
              "left": "1220",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "34f24ee4-1855-5354-9ba9-c06a15aa381e"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Get Governance",
              "targetStep": "/api/3/workflow_steps/9a9258df-3f39-5a88-9edd-3f4266eff8ce",
              "sourceStep": "/api/3/workflow_steps/9e9a7da5-58ac-5335-920b-a29eb7ef98ae",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "e54d0d14-2818-5921-b8ea-1dba0d1a80c6"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Get Governance -> Owner Check",
              "targetStep": "/api/3/workflow_steps/095c6ad1-9606-59be-b9ab-dd0376547198",
              "sourceStep": "/api/3/workflow_steps/9a9258df-3f39-5a88-9edd-3f4266eff8ce",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "f428c6cb-9fc1-59d8-b551-bc833d47e7b4"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Owner Check -> Add Owner",
              "targetStep": "/api/3/workflow_steps/b819f8cb-5a4b-552a-b53f-e1d2e0638902",
              "sourceStep": "/api/3/workflow_steps/095c6ad1-9606-59be-b9ab-dd0376547198",
              "label": "no owner",
              "isExecuted": false,
              "group": null,
              "uuid": "1424533b-c0ef-533a-9eb0-ea9ee37bf788"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Owner Check -> Visibility Check",
              "targetStep": "/api/3/workflow_steps/7a955a08-0c8f-5cf1-b762-06f8ca734cb2",
              "sourceStep": "/api/3/workflow_steps/095c6ad1-9606-59be-b9ab-dd0376547198",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "758e9c00-a25b-5321-a008-fcdc776eaf3c"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Add Owner -> Visibility Check",
              "targetStep": "/api/3/workflow_steps/7a955a08-0c8f-5cf1-b762-06f8ca734cb2",
              "sourceStep": "/api/3/workflow_steps/b819f8cb-5a4b-552a-b53f-e1d2e0638902",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "340e5f74-63ff-5216-a1fc-da05301a99ce"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Visibility Check -> Visibility Gate",
              "targetStep": "/api/3/workflow_steps/272f8ccc-41d8-5407-9244-9e1107979db9",
              "sourceStep": "/api/3/workflow_steps/7a955a08-0c8f-5cf1-b762-06f8ca734cb2",
              "label": "public group",
              "isExecuted": false,
              "group": null,
              "uuid": "d3c8cc01-8159-5e21-ad26-24c5132e7528"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Visibility Check -> Name Check",
              "targetStep": "/api/3/workflow_steps/94208bff-3667-5909-b345-abd11847954d",
              "sourceStep": "/api/3/workflow_steps/7a955a08-0c8f-5cf1-b762-06f8ca734cb2",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "9d2f4727-1270-56f4-a776-c6c1d15281f5"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Visibility Gate -> Set Private",
              "targetStep": "/api/3/workflow_steps/567a0768-5dc1-5b94-8c48-edc5b6f73539",
              "sourceStep": "/api/3/workflow_steps/272f8ccc-41d8-5407-9244-9e1107979db9",
              "label": "Approve, make Private",
              "isExecuted": false,
              "group": null,
              "uuid": "47d22acd-23a2-55be-98ff-951127d80722"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Visibility Gate -> Name Check",
              "targetStep": "/api/3/workflow_steps/94208bff-3667-5909-b345-abd11847954d",
              "sourceStep": "/api/3/workflow_steps/272f8ccc-41d8-5407-9244-9e1107979db9",
              "label": "Reject, keep Public",
              "isExecuted": false,
              "group": null,
              "uuid": "31520559-b9cb-5a81-92bb-bb030f012e96"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Set Private -> Name Check",
              "targetStep": "/api/3/workflow_steps/94208bff-3667-5909-b345-abd11847954d",
              "sourceStep": "/api/3/workflow_steps/567a0768-5dc1-5b94-8c48-edc5b6f73539",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "e22d1367-7438-5af4-af37-3b1f52126a63"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Name Check -> Notify Owner",
              "targetStep": "/api/3/workflow_steps/8b80134d-b6f2-59f1-9f60-9e63e8952b5c",
              "sourceStep": "/api/3/workflow_steps/94208bff-3667-5909-b345-abd11847954d",
              "label": "bad name",
              "isExecuted": false,
              "group": null,
              "uuid": "e7f2555f-ae47-5aa9-83fd-1671449ca238"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Name Check -> Log Result",
              "targetStep": "/api/3/workflow_steps/50458aa9-9aef-56db-ac9d-0f7db65b2ca0",
              "sourceStep": "/api/3/workflow_steps/94208bff-3667-5909-b345-abd11847954d",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "2e94ee3c-88eb-5e2c-ad03-dfb3164d7670"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Notify Owner -> Log Result",
              "targetStep": "/api/3/workflow_steps/50458aa9-9aef-56db-ac9d-0f7db65b2ca0",
              "sourceStep": "/api/3/workflow_steps/8b80134d-b6f2-59f1-9f60-9e63e8952b5c",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "6faba540-f0b2-5de8-9ab5-db1606fc320b"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Result -> Export Verdict",
              "targetStep": "/api/3/workflow_steps/e5e3823d-5d5e-55ae-92a9-d3a5d6f86155",
              "sourceStep": "/api/3/workflow_steps/50458aa9-9aef-56db-ac9d-0f7db65b2ca0",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "a2ec753d-6006-50f2-ad12-ace78f672750"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Export Verdict -> End",
              "targetStep": "/api/3/workflow_steps/34f24ee4-1855-5354-9ba9-c06a15aa381e",
              "sourceStep": "/api/3/workflow_steps/e5e3823d-5d5e-55ae-92a9-d3a5d6f86155",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "3efc20f0-f2a0-510a-8ed2-aa3f9fee42f0"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "866e2a05-4c52-5482-930f-9da9070c4530",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "SharePoint - New site governance",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Scheduled (or run by hand): list Microsoft 365 groups created since a time, and run the site governance check on each one. Logs a summary alert when no new sites are found.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "created_after",
            "naming_prefix",
            "owner_upn",
            "notify_to"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/5b39f04f-1987-5eb6-a799-b2aab99ef57d",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "created_after"
                  },
                  {
                    "name": "naming_prefix"
                  },
                  {
                    "name": "owner_upn"
                  },
                  {
                    "name": "notify_to"
                  }
                ],
                "title": "SharePoint - New site governance",
                "resources": [
                  "alerts"
                ],
                "route": "ca7706ec-b912-50e3-b7a3-d8f030b16af8",
                "step_variables": {
                  "input": {
                    "params": {
                      "created_after": "{{vars.request.data[\"created_after\"]}}",
                      "naming_prefix": "{{vars.request.data[\"naming_prefix\"]}}",
                      "owner_upn": "{{vars.request.data[\"owner_upn\"]}}",
                      "notify_to": "{{vars.request.data[\"notify_to\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "5b39f04f-1987-5eb6-a799-b2aab99ef57d"
            },
            {
              "@type": "WorkflowStep",
              "name": "List Recent Sites",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "list_recent_sites",
                "config": "",
                "params": {
                  "created_after": "{{ vars.input.params.created_after }}",
                  "limit": 100
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "List Recent Sites",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "87a42196-0c83-5384-ad22-71ccd96c25b6"
            },
            {
              "@type": "WorkflowStep",
              "name": "Any Sites",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "sites found",
                    "condition": "{{ vars.steps.List_Recent_Sites.data.count > 0 }}",
                    "step_iri": "/api/3/workflow_steps/196a06ed-6f88-5123-aafe-fdff6cd4ec7c",
                    "step_name": "Check Each Site"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/6f66db82-d6ae-58dd-a663-6a7c4a1b8324",
                    "step_name": "Log Empty"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "a5c382ca-bc36-5a21-bd40-e0cf02c1d331"
            },
            {
              "@type": "WorkflowStep",
              "name": "Check Each Site",
              "description": null,
              "arguments": {
                "apply_async": false,
                "pass_parent_env": false,
                "pass_input_record": false,
                "arguments": {
                  "group_id": "{{ vars.item.group_id }}",
                  "naming_prefix": "{{ vars.input.params.naming_prefix }}",
                  "owner_upn": "{{ vars.input.params.owner_upn }}",
                  "notify_to": "{{ vars.input.params.notify_to }}"
                },
                "workflowReference": "/api/3/workflows/866e2a05-4c52-5482-930f-9da9070c4530",
                "for_each": {
                  "item": "{{ vars.steps.List_Recent_Sites.data.sites }}",
                  "parallel": false,
                  "condition": ""
                }
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/74932bdc-b8b6-4d24-88c4-1a4dfbc524f3",
              "group": null,
              "uuid": "196a06ed-6f88-5123-aafe-fdff6cd4ec7c"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Run",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "New site governance run since {{ vars.input.params.created_after }}",
                  "description": "Checked {{ vars.steps.List_Recent_Sites.data.count }} new site(s) for policy."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "144ecf9a-8b80-50e8-9fd4-b3f30f420eec"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Empty",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "New site governance run since {{ vars.input.params.created_after }} (nothing new)",
                  "description": "No Microsoft 365 groups were created in the window."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "6f66db82-d6ae-58dd-a663-6a7c4a1b8324"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "770",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "9071568a-8fa4-52fc-8dcb-6f0fdbd1b254"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> List Recent Sites",
              "targetStep": "/api/3/workflow_steps/87a42196-0c83-5384-ad22-71ccd96c25b6",
              "sourceStep": "/api/3/workflow_steps/5b39f04f-1987-5eb6-a799-b2aab99ef57d",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "3387fdfe-0ad8-56fe-9723-e26870364c65"
            },
            {
              "@type": "WorkflowRoute",
              "name": "List Recent Sites -> Any Sites",
              "targetStep": "/api/3/workflow_steps/a5c382ca-bc36-5a21-bd40-e0cf02c1d331",
              "sourceStep": "/api/3/workflow_steps/87a42196-0c83-5384-ad22-71ccd96c25b6",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "8b54a3dd-a82c-5578-a326-ca75fb349a0f"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Sites -> Check Each Site",
              "targetStep": "/api/3/workflow_steps/196a06ed-6f88-5123-aafe-fdff6cd4ec7c",
              "sourceStep": "/api/3/workflow_steps/a5c382ca-bc36-5a21-bd40-e0cf02c1d331",
              "label": "sites found",
              "isExecuted": false,
              "group": null,
              "uuid": "2373df4b-731c-569a-a163-2e7a6c7a8036"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Sites -> Log Empty",
              "targetStep": "/api/3/workflow_steps/6f66db82-d6ae-58dd-a663-6a7c4a1b8324",
              "sourceStep": "/api/3/workflow_steps/a5c382ca-bc36-5a21-bd40-e0cf02c1d331",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "043456ef-9dd0-5478-aaad-5015e168597f"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Check Each Site -> Log Run",
              "targetStep": "/api/3/workflow_steps/144ecf9a-8b80-50e8-9fd4-b3f30f420eec",
              "sourceStep": "/api/3/workflow_steps/196a06ed-6f88-5123-aafe-fdff6cd4ec7c",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "7379ffa3-ca3d-505a-a48d-ebca98c25adb"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Run -> End",
              "targetStep": "/api/3/workflow_steps/9071568a-8fa4-52fc-8dcb-6f0fdbd1b254",
              "sourceStep": "/api/3/workflow_steps/144ecf9a-8b80-50e8-9fd4-b3f30f420eec",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "b3ab621f-c529-5be7-bc7a-26921bd78eed"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Empty -> End",
              "targetStep": "/api/3/workflow_steps/9071568a-8fa4-52fc-8dcb-6f0fdbd1b254",
              "sourceStep": "/api/3/workflow_steps/6f66db82-d6ae-58dd-a663-6a7c4a1b8324",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "ad8dc05f-a8fa-5906-8bc9-f8c40af1f0ce"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "b552ddd6-9d7e-5a02-8454-28db44c3be2e",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "SharePoint - File quarantine round trip",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Upload an alert attachment to a quarantine folder, read it back and compare SHA-256 with the expected hash. Match: create an organisation link, revoke it and delete the copy. Mismatch: keep the copy and log it. Upload failure: log it.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "folder_path",
            "file_name",
            "attachment_id",
            "expected_sha256"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/de6a23b4-0b95-541d-a707-0045e22bb57b",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "folder_path"
                  },
                  {
                    "name": "file_name"
                  },
                  {
                    "name": "attachment_id"
                  },
                  {
                    "name": "expected_sha256"
                  }
                ],
                "title": "SharePoint - Quarantine round trip",
                "resources": [
                  "alerts"
                ],
                "route": "48515276-1ab0-5872-afc1-870bf649ad1b",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "folder_path": "{{vars.request.data[\"folder_path\"]}}",
                      "file_name": "{{vars.request.data[\"file_name\"]}}",
                      "attachment_id": "{{vars.request.data[\"attachment_id\"]}}",
                      "expected_sha256": "{{vars.request.data[\"expected_sha256\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "de6a23b4-0b95-541d-a707-0045e22bb57b"
            },
            {
              "@type": "WorkflowStep",
              "name": "Upload To Quarantine",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "upload_file",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "folder_path": "{{ vars.input.params.folder_path }}",
                  "file_name": "{{ vars.input.params.file_name }}",
                  "attachment_id": "{{ vars.input.params.attachment_id }}"
                },
                "ignore_errors": true,
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Upload File",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "f83bb082-28f3-5dd1-9f74-aaa6784e7bc7"
            },
            {
              "@type": "WorkflowStep",
              "name": "Upload Ok",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "upload succeeded",
                    "condition": "{{ (vars.steps.Upload_To_Quarantine.data | default({})).id is defined }}",
                    "step_iri": "/api/3/workflow_steps/400acf8c-a535-5bd2-9049-8626fbe96ef7",
                    "step_name": "Read Back"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/5a143652-4f67-54e4-a447-b15b77b86376",
                    "step_name": "Log Upload Failed"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "c4978701-523b-5491-8bd6-8d2f7af53f6e"
            },
            {
              "@type": "WorkflowStep",
              "name": "Read Back",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "read_file_content",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.folder_path }}/{{ vars.input.params.file_name }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Download File",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "400acf8c-a535-5bd2-9049-8626fbe96ef7"
            },
            {
              "@type": "WorkflowStep",
              "name": "Hash Match",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "read-back SHA-256 equals the expected hash",
                    "condition": "{{ (vars.steps.Read_Back.data.sha256 | lower) == (vars.input.params.expected_sha256 | lower) }}",
                    "step_iri": "/api/3/workflow_steps/7f75c309-7cbf-5efa-901d-f268ae145fb8",
                    "step_name": "Create Link"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/a76e0f54-bb98-5ce4-a3de-5e4004ae4788",
                    "step_name": "Log Mismatch"
                  }
                ]
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "c739f869-06ab-5cb1-98f3-cf82c43abc9b"
            },
            {
              "@type": "WorkflowStep",
              "name": "Create Link",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "create_sharing_link",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.folder_path }}/{{ vars.input.params.file_name }}",
                  "link_type": "view",
                  "scope": "organization"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Create Sharing Link",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "770",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "7f75c309-7cbf-5efa-901d-f268ae145fb8"
            },
            {
              "@type": "WorkflowStep",
              "name": "Revoke Link",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "revoke_permission",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.folder_path }}/{{ vars.input.params.file_name }}",
                  "permission_id": "{{ vars.steps.Create_Link.data.id }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Revoke Permission",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "900",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "03e11349-f929-5a1d-b18a-33b3898215b9"
            },
            {
              "@type": "WorkflowStep",
              "name": "Delete Copy",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "delete_file",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "file_path": "{{ vars.input.params.folder_path }}/{{ vars.input.params.file_name }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Delete File",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "1030",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "6ee06418-9b82-5360-97da-7b66969df67b"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Round Trip",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint quarantine round trip verified: {{ vars.input.params.file_name }}",
                  "description": "SHA-256 matched ({{ vars.steps.Read_Back.data.sha256 }}). Link {{ vars.steps.Create_Link.data.id }} created and revoked. Copy deleted to the site recycle bin."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "1160",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "901fb522-3694-5fea-a1d1-5c727d423c73"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Mismatch",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint quarantine INTEGRITY MISMATCH: {{ vars.input.params.file_name }}",
                  "description": "Read-back SHA-256 {{ vars.steps.Read_Back.data.sha256 }} does not match the expected {{ vars.input.params.expected_sha256 }}. The copy is kept in the quarantine folder for an analyst; no link was created."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "770",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "a76e0f54-bb98-5ce4-a3de-5e4004ae4788"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Upload Failed",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "SharePoint quarantine upload failed: {{ vars.input.params.file_name }}",
                  "description": "The attachment could not be uploaded to {{ vars.input.params.folder_path }}. Nothing was deleted or shared."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "5a143652-4f67-54e4-a447-b15b77b86376"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "1290",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "50cb4060-2f2e-512c-9f9d-5303fbab55cb"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Upload To Quarantine",
              "targetStep": "/api/3/workflow_steps/f83bb082-28f3-5dd1-9f74-aaa6784e7bc7",
              "sourceStep": "/api/3/workflow_steps/de6a23b4-0b95-541d-a707-0045e22bb57b",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "88214b46-04b9-595e-b608-d9a10dfcc14c"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Upload To Quarantine -> Upload Ok",
              "targetStep": "/api/3/workflow_steps/c4978701-523b-5491-8bd6-8d2f7af53f6e",
              "sourceStep": "/api/3/workflow_steps/f83bb082-28f3-5dd1-9f74-aaa6784e7bc7",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "0805ea15-a1bf-5d4d-8b4c-9b113d2ae742"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Upload Ok -> Read Back",
              "targetStep": "/api/3/workflow_steps/400acf8c-a535-5bd2-9049-8626fbe96ef7",
              "sourceStep": "/api/3/workflow_steps/c4978701-523b-5491-8bd6-8d2f7af53f6e",
              "label": "upload succeeded",
              "isExecuted": false,
              "group": null,
              "uuid": "4e6df35e-cb3d-55cf-af6c-00d673d96574"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Upload Ok -> Log Upload Failed",
              "targetStep": "/api/3/workflow_steps/5a143652-4f67-54e4-a447-b15b77b86376",
              "sourceStep": "/api/3/workflow_steps/c4978701-523b-5491-8bd6-8d2f7af53f6e",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "92bb2761-9635-5df7-841c-eefd40c3d929"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Read Back -> Hash Match",
              "targetStep": "/api/3/workflow_steps/c739f869-06ab-5cb1-98f3-cf82c43abc9b",
              "sourceStep": "/api/3/workflow_steps/400acf8c-a535-5bd2-9049-8626fbe96ef7",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "4caed93e-5b6d-59dc-b443-6ef92ab2a340"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Hash Match -> Create Link",
              "targetStep": "/api/3/workflow_steps/7f75c309-7cbf-5efa-901d-f268ae145fb8",
              "sourceStep": "/api/3/workflow_steps/c739f869-06ab-5cb1-98f3-cf82c43abc9b",
              "label": "read-back SHA-256 equals the expected hash",
              "isExecuted": false,
              "group": null,
              "uuid": "64387688-4fe8-51e9-8a9a-0f0e26761d2a"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Hash Match -> Log Mismatch",
              "targetStep": "/api/3/workflow_steps/a76e0f54-bb98-5ce4-a3de-5e4004ae4788",
              "sourceStep": "/api/3/workflow_steps/c739f869-06ab-5cb1-98f3-cf82c43abc9b",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "19343fc4-99eb-56d9-b31e-81f4fd7e936c"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Create Link -> Revoke Link",
              "targetStep": "/api/3/workflow_steps/03e11349-f929-5a1d-b18a-33b3898215b9",
              "sourceStep": "/api/3/workflow_steps/7f75c309-7cbf-5efa-901d-f268ae145fb8",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "79a76049-8334-5e58-b032-268896eff291"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Revoke Link -> Delete Copy",
              "targetStep": "/api/3/workflow_steps/6ee06418-9b82-5360-97da-7b66969df67b",
              "sourceStep": "/api/3/workflow_steps/03e11349-f929-5a1d-b18a-33b3898215b9",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "8bb86037-babb-5fa0-9e6d-343e834bdc7a"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Delete Copy -> Log Round Trip",
              "targetStep": "/api/3/workflow_steps/901fb522-3694-5fea-a1d1-5c727d423c73",
              "sourceStep": "/api/3/workflow_steps/6ee06418-9b82-5360-97da-7b66969df67b",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "6cf44eca-2c99-5dc1-b5e7-6dafb6989376"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Round Trip -> End",
              "targetStep": "/api/3/workflow_steps/50cb4060-2f2e-512c-9f9d-5303fbab55cb",
              "sourceStep": "/api/3/workflow_steps/901fb522-3694-5fea-a1d1-5c727d423c73",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "d709b520-ec20-52e0-afd6-0ad90ab2781f"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Mismatch -> End",
              "targetStep": "/api/3/workflow_steps/50cb4060-2f2e-512c-9f9d-5303fbab55cb",
              "sourceStep": "/api/3/workflow_steps/a76e0f54-bb98-5ce4-a3de-5e4004ae4788",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "186aecfe-f768-59ed-9db3-939e83add34d"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Upload Failed -> End",
              "targetStep": "/api/3/workflow_steps/50cb4060-2f2e-512c-9f9d-5303fbab55cb",
              "sourceStep": "/api/3/workflow_steps/5a143652-4f67-54e4-a447-b15b77b86376",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "9320cee0-6004-572c-8e17-3524304edff7"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "b27a9cc4-6793-5268-93ed-3fc5791e311a",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "OneDrive - Departing user handoff",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "List the source folder (a personal OneDrive when src_user_id is set, otherwise a SharePoint library when src_site_url is set); for each file (folders are skipped) copy it to the destination library folder; log one alert with the count. Empty source: log and stop.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "src_user_id",
            "src_site_url",
            "src_folder",
            "dst_site_url",
            "dst_folder"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/71506bb2-b5e5-5fa5-8c47-990d05b2b23a",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "src_user_id"
                  },
                  {
                    "name": "src_site_url"
                  },
                  {
                    "name": "src_folder"
                  },
                  {
                    "name": "dst_site_url"
                  },
                  {
                    "name": "dst_folder"
                  }
                ],
                "title": "OneDrive - Departing user handoff",
                "resources": [
                  "alerts"
                ],
                "route": "cc4a9ed2-44fb-5d1b-a6d5-1589762becd2",
                "step_variables": {
                  "input": {
                    "params": {
                      "src_user_id": "{{vars.request.data[\"src_user_id\"]}}",
                      "src_site_url": "{{vars.request.data[\"src_site_url\"]}}",
                      "src_folder": "{{vars.request.data[\"src_folder\"]}}",
                      "dst_site_url": "{{vars.request.data[\"dst_site_url\"]}}",
                      "dst_folder": "{{vars.request.data[\"dst_folder\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "71506bb2-b5e5-5fa5-8c47-990d05b2b23a"
            },
            {
              "@type": "WorkflowStep",
              "name": "List Source",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "list_folder",
                "config": "",
                "params": {
                  "user_id": "{{ vars.input.params.src_user_id }}",
                  "site_url": "{{ vars.input.params.src_site_url }}",
                  "folder_path": "{{ vars.input.params.src_folder }}",
                  "limit": 500
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "List Folder",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "783f20da-5791-5f7b-b3ba-fe7194382202"
            },
            {
              "@type": "WorkflowStep",
              "name": "Any Files",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "files to hand over",
                    "condition": "{{ vars.steps.List_Source.data['items'] | selectattr('isFolder', 'equalto', false) | list | length > 0 }}",
                    "step_iri": "/api/3/workflow_steps/d86e62d9-c3d4-5ed9-8fbb-c4e7ebd3d08f",
                    "step_name": "Copy Files"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/d16faa2c-76b2-5ca5-bf51-f7596515b4c5",
                    "step_name": "Log Empty Source"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "4f56e3d6-eaf7-57ef-b538-ef310c1e540d"
            },
            {
              "@type": "WorkflowStep",
              "name": "Copy Files",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "copy_item",
                "config": "",
                "params": {
                  "user_id": "{{ vars.input.params.src_user_id }}",
                  "site_url": "{{ vars.input.params.src_site_url }}",
                  "file_path": "{{ vars.item.path }}",
                  "dst_site_url": "{{ vars.input.params.dst_site_url }}",
                  "destination_folder_path": "{{ vars.input.params.dst_folder }}",
                  "wait": true
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Copy File",
                "step_variables": [],
                "pickFromTenant": false,
                "for_each": {
                  "item": "{{ vars.steps.List_Source.data['items'] | selectattr('isFolder', 'equalto', false) | list }}",
                  "parallel": false,
                  "condition": ""
                }
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "d86e62d9-c3d4-5ed9-8fbb-c4e7ebd3d08f"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Handoff",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive handoff: {{ vars.input.params.src_folder }} to {{ vars.input.params.dst_folder }}",
                  "description": "Copied {{ vars.steps.List_Source.data['items'] | selectattr('isFolder', 'equalto', false) | list | length }} files from {{ vars.input.params.src_folder }} to {{ vars.input.params.dst_folder }}. Source: {{ vars.input.params.src_user_id or vars.input.params.src_site_url }}."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "3ee9b2cd-d5fa-5690-96c7-3ad697aa563e"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Empty Source",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive handoff: {{ vars.input.params.src_folder }} (nothing to copy)",
                  "description": "No files found in {{ vars.input.params.src_folder }}; nothing copied."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "d16faa2c-76b2-5ca5-bf51-f7596515b4c5"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "770",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "44b1ff1c-ce43-54f2-a46b-f39493f0ae6b"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> List Source",
              "targetStep": "/api/3/workflow_steps/783f20da-5791-5f7b-b3ba-fe7194382202",
              "sourceStep": "/api/3/workflow_steps/71506bb2-b5e5-5fa5-8c47-990d05b2b23a",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "0c6f9ef7-6965-5886-b2b1-54547f3af328"
            },
            {
              "@type": "WorkflowRoute",
              "name": "List Source -> Any Files",
              "targetStep": "/api/3/workflow_steps/4f56e3d6-eaf7-57ef-b538-ef310c1e540d",
              "sourceStep": "/api/3/workflow_steps/783f20da-5791-5f7b-b3ba-fe7194382202",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "3b3ade58-091f-5695-a183-099170622556"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Files -> Copy Files",
              "targetStep": "/api/3/workflow_steps/d86e62d9-c3d4-5ed9-8fbb-c4e7ebd3d08f",
              "sourceStep": "/api/3/workflow_steps/4f56e3d6-eaf7-57ef-b538-ef310c1e540d",
              "label": "files to hand over",
              "isExecuted": false,
              "group": null,
              "uuid": "20de9707-ad0a-5222-add5-aa248958aec5"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Files -> Log Empty Source",
              "targetStep": "/api/3/workflow_steps/d16faa2c-76b2-5ca5-bf51-f7596515b4c5",
              "sourceStep": "/api/3/workflow_steps/4f56e3d6-eaf7-57ef-b538-ef310c1e540d",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "a21787bd-461a-5aec-aa2b-779338353ecb"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Copy Files -> Log Handoff",
              "targetStep": "/api/3/workflow_steps/3ee9b2cd-d5fa-5690-96c7-3ad697aa563e",
              "sourceStep": "/api/3/workflow_steps/d86e62d9-c3d4-5ed9-8fbb-c4e7ebd3d08f",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "4aedc155-b6e0-56fc-a773-f24b6aa59c78"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Handoff -> End",
              "targetStep": "/api/3/workflow_steps/44b1ff1c-ce43-54f2-a46b-f39493f0ae6b",
              "sourceStep": "/api/3/workflow_steps/3ee9b2cd-d5fa-5690-96c7-3ad697aa563e",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "e880445d-66c2-591f-897d-9271803b8ec7"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Empty Source -> End",
              "targetStep": "/api/3/workflow_steps/44b1ff1c-ce43-54f2-a46b-f39493f0ae6b",
              "sourceStep": "/api/3/workflow_steps/d16faa2c-76b2-5ca5-bf51-f7596515b4c5",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "f943f357-c4d8-5047-842e-6ad5b5f7d7e1"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "e9595669-397a-52b9-950b-00408cf0cdf3",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "OneDrive - Sharing exposure response",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "List the sharing links and grants on one file. If any sharing link exists, revoke every link (direct grants are left alone) and log an alert; otherwise log a clean result.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "library",
            "file_path"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/2ff95a90-e322-5a85-a6f9-ec143f15b2ee",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "library"
                  },
                  {
                    "name": "file_path"
                  }
                ],
                "title": "OneDrive - Sharing exposure response",
                "resources": [
                  "alerts"
                ],
                "route": "11738d6f-c83d-5d17-a4be-1597154a9830",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "library": "{{vars.request.data[\"library\"]}}",
                      "file_path": "{{vars.request.data[\"file_path\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "2ff95a90-e322-5a85-a6f9-ec143f15b2ee"
            },
            {
              "@type": "WorkflowStep",
              "name": "Check Permissions",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "list_permissions",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "library": "{{ vars.input.params.library }}",
                  "file_path": "{{ vars.input.params.file_path }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "List Permissions",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "52e89a68-be74-55a0-a991-100355f9a514"
            },
            {
              "@type": "WorkflowStep",
              "name": "Any Links",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "sharing links to revoke",
                    "condition": "{{ vars.steps.Check_Permissions.data['items'] | selectattr('linkScope') | list | length > 0 }}",
                    "step_iri": "/api/3/workflow_steps/bc6a7730-6508-522a-b5ec-28f059ed7470",
                    "step_name": "Revoke Links"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/225a1879-5206-5cbb-b91b-c70cd5739685",
                    "step_name": "Log Clean Result"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "57d271e9-5830-584d-a465-a6af92fb2634"
            },
            {
              "@type": "WorkflowStep",
              "name": "Revoke Links",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "revoke_permission",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "library": "{{ vars.input.params.library }}",
                  "file_path": "{{ vars.input.params.file_path }}",
                  "permission_id": "{{ vars.item.id }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Revoke Permission",
                "step_variables": [],
                "pickFromTenant": false,
                "for_each": {
                  "item": "{{ vars.steps.Check_Permissions.data['items'] | selectattr('linkScope') | list }}",
                  "parallel": false,
                  "condition": ""
                }
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "bc6a7730-6508-522a-b5ec-28f059ed7470"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Revocation",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive sharing revoked: {{ vars.input.params.file_path }}",
                  "description": "Revoked {{ vars.steps.Check_Permissions.data['items'] | selectattr('linkScope') | list | length }} sharing link(s) on {{ vars.input.params.file_path }} in {{ vars.input.params.library }}. Direct grants were left alone."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "faa79f72-343b-5f94-8207-bc1328312b3c"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Clean Result",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive sharing clean: {{ vars.input.params.file_path }}",
                  "description": "No sharing links on {{ vars.input.params.file_path }} in {{ vars.input.params.library }}; nothing revoked."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "225a1879-5206-5cbb-b91b-c70cd5739685"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "770",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "c9a49d79-3d73-5ed8-bb56-74325dda3642"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Check Permissions",
              "targetStep": "/api/3/workflow_steps/52e89a68-be74-55a0-a991-100355f9a514",
              "sourceStep": "/api/3/workflow_steps/2ff95a90-e322-5a85-a6f9-ec143f15b2ee",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "acba0abe-99da-57c6-beb8-86dcd58ffff9"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Check Permissions -> Any Links",
              "targetStep": "/api/3/workflow_steps/57d271e9-5830-584d-a465-a6af92fb2634",
              "sourceStep": "/api/3/workflow_steps/52e89a68-be74-55a0-a991-100355f9a514",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "1d4bdac5-4198-5a24-a66d-58299452b9b1"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Links -> Revoke Links",
              "targetStep": "/api/3/workflow_steps/bc6a7730-6508-522a-b5ec-28f059ed7470",
              "sourceStep": "/api/3/workflow_steps/57d271e9-5830-584d-a465-a6af92fb2634",
              "label": "sharing links to revoke",
              "isExecuted": false,
              "group": null,
              "uuid": "8e70ebd2-5cdc-5bfa-b73d-9129f22f48c6"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Links -> Log Clean Result",
              "targetStep": "/api/3/workflow_steps/225a1879-5206-5cbb-b91b-c70cd5739685",
              "sourceStep": "/api/3/workflow_steps/57d271e9-5830-584d-a465-a6af92fb2634",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "cf57198c-1445-5c35-9cfd-ec6535593bf4"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Revoke Links -> Log Revocation",
              "targetStep": "/api/3/workflow_steps/faa79f72-343b-5f94-8207-bc1328312b3c",
              "sourceStep": "/api/3/workflow_steps/bc6a7730-6508-522a-b5ec-28f059ed7470",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "a9bf78c4-8e25-5506-8571-889ecb129f63"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Revocation -> End",
              "targetStep": "/api/3/workflow_steps/c9a49d79-3d73-5ed8-bb56-74325dda3642",
              "sourceStep": "/api/3/workflow_steps/faa79f72-343b-5f94-8207-bc1328312b3c",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "6b756a72-16cc-5345-9288-34930392bc4e"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Clean Result -> End",
              "targetStep": "/api/3/workflow_steps/c9a49d79-3d73-5ed8-bb56-74325dda3642",
              "sourceStep": "/api/3/workflow_steps/225a1879-5206-5cbb-b91b-c70cd5739685",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "14ba00d3-6a45-5fb9-871a-2389bf64dbfa"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "5034e34d-cc46-587a-8abb-50071bcdf0c5",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "OneDrive - Version rollback",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "List the version history of one file. If an earlier version exists, restore it as the current version and log an alert; otherwise log that there was nothing to restore.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "library",
            "file_path"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/e1e7d627-4ecb-55bb-b0af-5285e23b4cdd",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "library"
                  },
                  {
                    "name": "file_path"
                  }
                ],
                "title": "OneDrive - Version rollback",
                "resources": [
                  "alerts"
                ],
                "route": "0939c9b9-6d78-5ed9-b37d-53e5d125c07d",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "library": "{{vars.request.data[\"library\"]}}",
                      "file_path": "{{vars.request.data[\"file_path\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "e1e7d627-4ecb-55bb-b0af-5285e23b4cdd"
            },
            {
              "@type": "WorkflowStep",
              "name": "List Versions",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "list_versions",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "library": "{{ vars.input.params.library }}",
                  "file_path": "{{ vars.input.params.file_path }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "List File Versions",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "e2291c12-5203-5433-b425-20459b2a4687"
            },
            {
              "@type": "WorkflowStep",
              "name": "Has Prior Version",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "an earlier version exists",
                    "condition": "{{ vars.steps.List_Versions.data['items'] | length > 1 }}",
                    "step_iri": "/api/3/workflow_steps/280a60bf-ed34-5cea-927e-447f569949b3",
                    "step_name": "Restore Previous Version"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/0c6947e9-b0d8-5fc3-a458-3f77b90999b0",
                    "step_name": "Log No Prior Version"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "b05a6cec-7d7c-5a94-81f8-8b4be5c42f4d"
            },
            {
              "@type": "WorkflowStep",
              "name": "Restore Previous Version",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "restore_version",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "library": "{{ vars.input.params.library }}",
                  "file_path": "{{ vars.input.params.file_path }}",
                  "version_id": "{{ vars.steps.List_Versions.data['items'][1]['id'] }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Restore File Version",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "280a60bf-ed34-5cea-927e-447f569949b3"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Restored",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive version restored: {{ vars.input.params.file_path }}",
                  "description": "Restored the previous version of {{ vars.input.params.file_path }} in {{ vars.input.params.library }} (version {{ vars.steps.List_Versions.data['items'][1]['id'] }}). The version it replaced is kept in the history."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "9dd63f07-5786-5efa-b317-dec2de26e1d9"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log No Prior Version",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive version rollback skipped: {{ vars.input.params.file_path }}",
                  "description": "{{ vars.input.params.file_path }} in {{ vars.input.params.library }} has no earlier version; nothing restored."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "0c6947e9-b0d8-5fc3-a458-3f77b90999b0"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "770",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "da8e4810-361d-5150-ac97-794d4e3bf9a1"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> List Versions",
              "targetStep": "/api/3/workflow_steps/e2291c12-5203-5433-b425-20459b2a4687",
              "sourceStep": "/api/3/workflow_steps/e1e7d627-4ecb-55bb-b0af-5285e23b4cdd",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "6e7d57c9-714c-5761-8d29-093662102e07"
            },
            {
              "@type": "WorkflowRoute",
              "name": "List Versions -> Has Prior Version",
              "targetStep": "/api/3/workflow_steps/b05a6cec-7d7c-5a94-81f8-8b4be5c42f4d",
              "sourceStep": "/api/3/workflow_steps/e2291c12-5203-5433-b425-20459b2a4687",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "19b739a2-d44c-5c03-8ef7-51082f9aef9d"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Has Prior Version -> Restore Previous Version",
              "targetStep": "/api/3/workflow_steps/280a60bf-ed34-5cea-927e-447f569949b3",
              "sourceStep": "/api/3/workflow_steps/b05a6cec-7d7c-5a94-81f8-8b4be5c42f4d",
              "label": "an earlier version exists",
              "isExecuted": false,
              "group": null,
              "uuid": "11b91198-fef5-5e6c-95c3-4c49f32983f8"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Has Prior Version -> Log No Prior Version",
              "targetStep": "/api/3/workflow_steps/0c6947e9-b0d8-5fc3-a458-3f77b90999b0",
              "sourceStep": "/api/3/workflow_steps/b05a6cec-7d7c-5a94-81f8-8b4be5c42f4d",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "63925bb9-f765-5f73-b807-30b815511443"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Restore Previous Version -> Log Restored",
              "targetStep": "/api/3/workflow_steps/9dd63f07-5786-5efa-b317-dec2de26e1d9",
              "sourceStep": "/api/3/workflow_steps/280a60bf-ed34-5cea-927e-447f569949b3",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "4313482d-4671-5199-a807-ce802ad3d4a4"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Restored -> End",
              "targetStep": "/api/3/workflow_steps/da8e4810-361d-5150-ac97-794d4e3bf9a1",
              "sourceStep": "/api/3/workflow_steps/9dd63f07-5786-5efa-b317-dec2de26e1d9",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "77dc420b-6703-5037-98a7-6392ee1d52fc"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log No Prior Version -> End",
              "targetStep": "/api/3/workflow_steps/da8e4810-361d-5150-ac97-794d4e3bf9a1",
              "sourceStep": "/api/3/workflow_steps/0c6947e9-b0d8-5fc3-a458-3f77b90999b0",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "dfd9b82d-b2c2-5455-9a97-749715c1bdad"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "b9bdad7d-ff23-5b51-b36f-5f656f36cc8c",
          "isPrivate": false
        },
        {
          "@type": "Workflow",
          "name": "OneDrive - Search and archive",
          "aliasName": null,
          "tag": "",
          "recordTags": [],
          "description": "Search one library for files matching a query. Every matching file (folders are skipped) moves to the archive folder, then an alert records the count. No matches: log and stop.",
          "isActive": false,
          "debug": false,
          "singleRecordExecution": false,
          "remoteExecutableFlag": 0,
          "parameters": [
            "site_url",
            "library",
            "query",
            "archive_folder"
          ],
          "synchronous": false,
          "triggerStep": "/api/3/workflow_steps/eddf3e39-4e32-5233-b0fb-af442947024c",
          "steps": [
            {
              "@type": "WorkflowStep",
              "name": "Start",
              "description": null,
              "arguments": {
                "inputVariables": [
                  {
                    "name": "site_url"
                  },
                  {
                    "name": "library"
                  },
                  {
                    "name": "query"
                  },
                  {
                    "name": "archive_folder"
                  }
                ],
                "title": "OneDrive - Search and archive",
                "resources": [
                  "alerts"
                ],
                "route": "55e0b9a7-e966-597c-8a18-c644827d4d40",
                "step_variables": {
                  "input": {
                    "params": {
                      "site_url": "{{vars.request.data[\"site_url\"]}}",
                      "library": "{{vars.request.data[\"library\"]}}",
                      "query": "{{vars.request.data[\"query\"]}}",
                      "archive_folder": "{{vars.request.data[\"archive_folder\"]}}"
                    },
                    "records": "{{vars.input.records}}"
                  }
                },
                "triggerOnSource": true,
                "triggerOnReplicate": false,
                "noRecordExecution": true,
                "singleRecordExecution": false,
                "__triggerLimit": true,
                "executeButtonText": "Execute",
                "showToasterMessage": {
                  "visible": false,
                  "messageVisible": true
                },
                "displayConditions": {
                  "alerts": {
                    "sort": [],
                    "limit": 30,
                    "logic": "AND",
                    "filters": []
                  }
                }
              },
              "status": null,
              "top": "120",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/f414d039-bb0d-4e59-9c39-a8f1e880b18a",
              "group": null,
              "uuid": "eddf3e39-4e32-5233-b0fb-af442947024c"
            },
            {
              "@type": "WorkflowStep",
              "name": "Search Files",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "search_files",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "library": "{{ vars.input.params.library }}",
                  "query": "{{ vars.input.params.query }}",
                  "limit": 50
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Search Files",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "250",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "3f57f018-fa90-5bfc-b43a-b9fa74c1402d"
            },
            {
              "@type": "WorkflowStep",
              "name": "Any Files",
              "description": null,
              "arguments": {
                "conditions": [
                  {
                    "option": "files to archive",
                    "condition": "{{ vars.steps.Search_Files.data['items'] | selectattr('isFolder', 'equalto', false) | list | length > 0 }}",
                    "step_iri": "/api/3/workflow_steps/72104b7f-840b-5460-8f00-f37f1aa9c6db",
                    "step_name": "Archive Files"
                  },
                  {
                    "option": "Else",
                    "default": true,
                    "step_iri": "/api/3/workflow_steps/f9060a86-6782-5799-abb4-e8b5108e4dea",
                    "step_name": "Log No Matches"
                  }
                ]
              },
              "status": null,
              "top": "380",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/12254cf5-5db7-4b1a-8cb1-3af081924b28",
              "group": null,
              "uuid": "c3423978-975e-5467-b649-ca07a9a31bfd"
            },
            {
              "@type": "WorkflowStep",
              "name": "Archive Files",
              "description": null,
              "arguments": {
                "connector": "microsoft-sharepoint-v2",
                "operation": "move_item",
                "config": "",
                "params": {
                  "site_url": "{{ vars.input.params.site_url }}",
                  "library": "{{ vars.input.params.library }}",
                  "file_path": "{{ vars.item.path }}",
                  "destination_folder_path": "{{ vars.input.params.archive_folder }}"
                },
                "version": "4.0.3",
                "name": "Microsoft SharePoint and OneDrive v2",
                "operationTitle": "Move Item",
                "step_variables": [],
                "pickFromTenant": false,
                "for_each": {
                  "item": "{{ vars.steps.Search_Files.data['items'] | selectattr('isFolder', 'equalto', false) | list }}",
                  "parallel": false,
                  "condition": ""
                }
              },
              "status": null,
              "top": "510",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "72104b7f-840b-5460-8f00-f37f1aa9c6db"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log Archived",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive archive: {{ vars.input.params.query }}",
                  "description": "Moved {{ vars.steps.Search_Files.data['items'] | selectattr('isFolder', 'equalto', false) | list | length }} file(s) matching '{{ vars.input.params.query }}' to {{ vars.input.params.archive_folder }}."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "640",
              "left": "200",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "a9f7495c-5d08-5ed5-8cdf-096b4640f450"
            },
            {
              "@type": "WorkflowStep",
              "name": "Log No Matches",
              "description": null,
              "arguments": {
                "resource": {
                  "name": "OneDrive archive: no matches for {{ vars.input.params.query }}",
                  "description": "No files matched '{{ vars.input.params.query }}' in {{ vars.input.params.library }}; nothing archived."
                },
                "collection": "/api/3/alerts"
              },
              "status": null,
              "top": "510",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/2597053c-e718-44b4-8394-4d40fe26d357",
              "group": null,
              "uuid": "f9060a86-6782-5799-abb4-e8b5108e4dea"
            },
            {
              "@type": "WorkflowStep",
              "name": "End",
              "description": null,
              "arguments": {
                "connector": "cyops_utilities",
                "operation": "no_op",
                "config": "",
                "params": {},
                "version": "3.7.3",
                "name": "Utilities",
                "operationTitle": "Utils: No Operation",
                "step_variables": [],
                "pickFromTenant": false
              },
              "status": null,
              "top": "770",
              "left": "540",
              "stepType": "/api/3/workflow_step_types/0bfed618-0316-11e7-93ae-92361f002671",
              "group": null,
              "uuid": "f7339c03-91da-5ca6-8a77-b2541280e05d"
            }
          ],
          "routes": [
            {
              "@type": "WorkflowRoute",
              "name": "Start -> Search Files",
              "targetStep": "/api/3/workflow_steps/3f57f018-fa90-5bfc-b43a-b9fa74c1402d",
              "sourceStep": "/api/3/workflow_steps/eddf3e39-4e32-5233-b0fb-af442947024c",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "4d321bca-9aff-5fec-a354-79c5a9a1306b"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Search Files -> Any Files",
              "targetStep": "/api/3/workflow_steps/c3423978-975e-5467-b649-ca07a9a31bfd",
              "sourceStep": "/api/3/workflow_steps/3f57f018-fa90-5bfc-b43a-b9fa74c1402d",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "fffc7f95-01a6-5436-b9d2-605d431fb30a"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Files -> Archive Files",
              "targetStep": "/api/3/workflow_steps/72104b7f-840b-5460-8f00-f37f1aa9c6db",
              "sourceStep": "/api/3/workflow_steps/c3423978-975e-5467-b649-ca07a9a31bfd",
              "label": "files to archive",
              "isExecuted": false,
              "group": null,
              "uuid": "9976481b-9ecc-5d6d-ac22-2a0a6d53bd14"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Any Files -> Log No Matches",
              "targetStep": "/api/3/workflow_steps/f9060a86-6782-5799-abb4-e8b5108e4dea",
              "sourceStep": "/api/3/workflow_steps/c3423978-975e-5467-b649-ca07a9a31bfd",
              "label": "Else",
              "isExecuted": false,
              "group": null,
              "uuid": "72981e75-13e6-57bc-aae7-8f0fc4e23565"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Archive Files -> Log Archived",
              "targetStep": "/api/3/workflow_steps/a9f7495c-5d08-5ed5-8cdf-096b4640f450",
              "sourceStep": "/api/3/workflow_steps/72104b7f-840b-5460-8f00-f37f1aa9c6db",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "766fb7e8-c872-50af-a0b5-487690379a01"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log Archived -> End",
              "targetStep": "/api/3/workflow_steps/f7339c03-91da-5ca6-8a77-b2541280e05d",
              "sourceStep": "/api/3/workflow_steps/a9f7495c-5d08-5ed5-8cdf-096b4640f450",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "1562e5d0-7b88-58fb-9665-0ec536142550"
            },
            {
              "@type": "WorkflowRoute",
              "name": "Log No Matches -> End",
              "targetStep": "/api/3/workflow_steps/f7339c03-91da-5ca6-8a77-b2541280e05d",
              "sourceStep": "/api/3/workflow_steps/f9060a86-6782-5799-abb4-e8b5108e4dea",
              "label": null,
              "isExecuted": false,
              "group": null,
              "uuid": "09012113-bdc3-505a-88ea-79bbda00a8f2"
            }
          ],
          "groups": [],
          "priority": "/api/3/picklists/9e8d41e4-8ada-4a2c-bd02-07f62c6d0a00",
          "isEditable": true,
          "uuid": "b0c8349a-05b7-5a33-b5f9-2bced95b00cf",
          "isPrivate": false
        }
      ]
    }
  ]
}
