{
  "name": "Audit Google Drive file permissions for access control management",
  "nodes": [
    {
      "id": "f8f5a571-c4de-469e-a182-faa60060d06b",
      "name": "Has Shared with External Users",
      "type": "n8n-nodes-base.filter",
      "position": [
        40,
        -220
      ]
    },
    {
      "id": "14b6d453-0403-476a-8537-cdeeace70115",
      "name": "Create New Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -620,
        -220
      ]
    },
    {
      "id": "394b91b3-0c70-40d5-8d48-4df6109780e7",
      "name": "Normalise Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1140,
        -140
      ]
    },
    {
      "id": "74a7ca8b-3ad4-470e-8c4d-b2e3cb721c27",
      "name": "For Each File",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        440,
        -140
      ]
    },
    {
      "id": "da0e4e55-9ffa-4939-acf3-a743ade6b3eb",
      "name": "File Ref",
      "type": "n8n-nodes-base.noOp",
      "position": [
        620,
        -140
      ]
    },
    {
      "id": "26e0f66a-88d7-46df-94e5-127158c47191",
      "name": "Permissions To Items",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        780,
        -140
      ]
    },
    {
      "id": "5ed23aa6-1d9f-486c-ab56-4cb1144cdba9",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1320,
        -60
      ]
    },
    {
      "id": "b7308c98-b50a-42ee-80ae-5a4beea0a654",
      "name": "Flatten Rows",
      "type": "n8n-nodes-base.set",
      "position": [
        1600,
        -280
      ]
    },
    {
      "id": "d18606d0-501e-4f2b-9456-a60497dd5574",
      "name": "Rows to Items",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1800,
        -280
      ]
    },
    {
      "id": "66daa856-b047-4396-8b64-29346bdb08a0",
      "name": "Send Email Report (Execute Once)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2200,
        -280
      ]
    },
    {
      "id": "41c2e73e-17cf-4d31-99fe-9c8c3b3d1a97",
      "name": "Get Recently Active Documents",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -200,
        -220
      ]
    },
    {
      "id": "68d83b74-be18-4b2e-8422-2fc9ec6a4b90",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        -500
      ],
      "parameters": {
        "width": 600,
        "height": 520,
        "content": "## 1. Scheduled Trigger to Audit Everyday\n[Read more about the Scheduled Trigger node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger)\n\nThe Scheduled Trigger is use"
      }
    },
    {
      "id": "c5416a4f-4fae-405d-ac41-35193349d16f",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -860,
        -220
      ]
    },
    {
      "id": "d3009d45-9a5d-445f-ad99-745f28b9f705",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -500
      ],
      "parameters": {
        "width": 680,
        "height": 520,
        "content": "## 2. Identify Documents with Possible Access Control Risks\n[Learn more about Gdrive node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive)\n\nFile Sharing is powerful in G"
      }
    },
    {
      "id": "dff3abeb-7ae1-4038-8a05-75bf7630b63e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        -320
      ],
      "parameters": {
        "width": 1160,
        "height": 500,
        "content": "## 3. Aggregate Results into Rows\n[Read more about the Split Out node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitout)\n\nWith our list, we just need to convert them to rows"
      }
    },
    {
      "id": "c88f5d67-9712-4f08-bd2f-7ea9056b8640",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -480
      ],
      "parameters": {
        "width": 880,
        "height": 460,
        "content": "## 4. Logs Results and Send Audit Report via Email\n[Read more about the Gmail node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/)\n\nFinally, we'll log the identified documen"
      }
    },
    {
      "id": "c9ef29d8-d126-4aff-96a9-26c79483bc16",
      "name": "Filter Out Owner of Document",
      "type": "n8n-nodes-base.filter",
      "position": [
        960,
        -140
      ]
    },
    {
      "id": "1185fbd0-7632-4ea9-8648-7fcba63d1565",
      "name": "Append to New Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2000,
        -280
      ]
    },
    {
      "id": "5755749e-16c1-43b0-ba14-76e593cd3404",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1480,
        -1060
      ],
      "parameters": {
        "width": 440,
        "height": 1260,
        "content": "## Try It Out!\n### This n8n template reviews and audits recently active Google Drive files and reports on files with excessively open permissions. This shows how you can automate simple SecOp tasks fo"
      }
    }
  ],
  "connections": {
    "File Ref": {
      "main": [
        [
          {
            "node": "Permissions To Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "For Each File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flatten Rows": {
      "main": [
        [
          {
            "node": "Rows to Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Each File": {
      "main": [
        [
          {
            "node": "Flatten Rows",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "File Ref",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rows to Items": {
      "main": [
        [
          {
            "node": "Append to New Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create New Sheet": {
      "main": [
        [
          {
            "node": "Get Recently Active Documents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalise Fields": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Create New Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append to New Sheet": {
      "main": [
        [
          {
            "node": "Send Email Report (Execute Once)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Permissions To Items": {
      "main": [
        [
          {
            "node": "Filter Out Owner of Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Out Owner of Document": {
      "main": [
        [
          {
            "node": "Normalise Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Recently Active Documents": {
      "main": [
        [
          {
            "node": "Has Shared with External Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Shared with External Users": {
      "main": [
        [
          {
            "node": "For Each File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}