AutomationFlowsData & Sheets › Compliance Report Collector with Google Form → Drive + Mysql

Compliance Report Collector with Google Form → Drive + Mysql

ByWeblineIndia @weblineindia on n8n.io

This n8n workflow automates the collection and archival of compliance reports submitted via Google Forms. Uploaded documents (PDF, DOCX, etc.) are archived into Google Drive and submission metadata is logged into a MySQL database. It ensures compliance documentation is properly…

Event trigger★★★★☆ complexity8 nodesGoogle Sheets TriggerMySQLGoogle Drive
Data & Sheets Trigger: Event Nodes: 8 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #7765 — we link there as the canonical source.

This workflow follows the Google Drive → Googlesheetstrigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "Un9KXLeARM23XTIQ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Compliance Report Collector",
  "tags": [],
  "nodes": [
    {
      "id": "c1d13027-17a3-485a-b43b-e7fece0612c6",
      "name": "Google Sheets form Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -440,
        60
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "url",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1U4MfFW06VMW0gW3fAkGFDvDnomb1j_0E-0lbEkPlli0",
          "cachedResultUrl": "",
          "cachedResultName": "compliance_report_sheet(Responses)"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "038c1dae-f38c-4a98-ae1d-5376d81e3332",
      "name": "Log to MySQL",
      "type": "n8n-nodes-base.mySql",
      "position": [
        660,
        60
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "name",
          "value": "report_logs"
        },
        "options": {}
      },
      "credentials": {
        "mySql": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d644afd6-ad2e-4931-ba17-42c1d635c3fc",
      "name": "Rename Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        440,
        60
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "=\n{\n  \"reporter\": \"{{$json.reporter}}\",\n  \"category\": \"{{$json.category}}\",\n  \"timestamp\": \"{{$json.timestamp}}\",\n  \"folder_id\": \"{{$json.folder_id}}\",\n  \"file_name\": \"{{$binary.data.fileName}}\",\n  \"mime_type\": \"{{$binary.data.mimeType}}\",\n  \"email\": \"{{$json.email}}\",\n  \"description\": \"{{$json.description}}\"\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "ba6a2d4c-f548-446f-ab24-20c518e06f86",
      "name": "Extract googlesheet data",
      "type": "n8n-nodes-base.function",
      "notes": "Extract metadata for logging",
      "position": [
        -220,
        60
      ],
      "parameters": {
        "functionCode": "// Input: rows from Google Sheets Trigger\nconst rows = $input.all();\nconst out = [];\n\nfor (const item of rows) {\n  const j = item.json;\n\n  const url = j['Upload Report File'] || '';\n  // supports both ?id=... and /d/.../view URLs\n  const m =\n    url.match(/[?&]id=([^&]+)/) ||\n    url.match(/\\/d\\/([a-zA-Z0-9_-]+)/);\n\n  out.push({\n    json: {\n      reporter: j['Reporter Name'] || null,\n      category: j['Report Category'] || null,\n      timestamp: new Date(j['Timestamp']).toISOString(),\n      folder_id: m ? m[1] : null,\n      email: j['Email Address'] || null,\n      description: j['Description'] || null,\n    },\n  });\n}\n\nreturn out;\n"
      },
      "typeVersion": 1
    },
    {
      "id": "efa9cce4-db44-4296-8c76-9bf12ca68d52",
      "name": "Get file uploaded metadata",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        0,
        60
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.folder_id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "6abc9f56-0b24-4e47-840f-72ac8421d90c",
      "name": "Merge sheet & file data",
      "type": "n8n-nodes-base.merge",
      "position": [
        220,
        60
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2,
      "alwaysOutputData": true
    },
    {
      "id": "779477a4-ecac-4cd5-8b5f-e385da6c64fc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -100
      ],
      "parameters": {
        "width": 1400,
        "height": 420,
        "content": "## Compliance Report Collector (Google Form \u2192 Drive + MySQL)\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "071841f7-f553-4637-806a-0db0d27e8de4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        380
      ],
      "parameters": {
        "width": 1420,
        "height": 1240,
        "content": "## Description\n\n### 1. Google Sheets form Trigger\n- Watches the linked Google Sheet for new rows (submitted via Google Form). When a new row is added, it triggers the workflow and passes the form data to the next node.\n\n---\n\n### 2. Extract googlesheet data\n- Parses the Google Sheet row data.  \n- Extracts the Google Drive file ID from the **\"Upload Report File\"** URL.  \n- Keeps key form fields:\n `reporter`\n `category`\n `timestamp`\n `email`\n `description`\n `folder_id`\n\n---\n\n### 3. Get file uploaded metadata\n- Uses the Google Drive node to fetch metadata for the uploaded file by its `folder_id`.  \n- Downloads the binary temporarily so we can extract:\n `fileName`\n `mimeType`\n\n---\n\n### 4. Merge sheet & file data\nCombines:\n- Google Sheet form data\n- Google Drive file metadata  \ninto a single JSON object per submission.  \nEnsures both sets of information are available for insertion into MySQL.\n\n---\n\n### 5. Rename Fields\nNormalizes and renames merged fields to match MySQL column names:\n- `fileName` \u2192 `file_name`\n- `mimeType` \u2192 `mime_type`\n\nRemoves unnecessary fields so only required columns remain.\n\n---\n\n### 6. Log to MySQL\nInserts the cleaned and normalized data into the `report_logs` table in MySQL, storing:\n- Form submission details\n- Uploaded file\u2019s name\n- MIME type\n\n---\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7f30bbf3-aa3d-462b-b69e-7bf403e3c880",
  "connections": {
    "Rename Fields": {
      "main": [
        [
          {
            "node": "Log to MySQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge sheet & file data": {
      "main": [
        [
          {
            "node": "Rename Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract googlesheet data": {
      "main": [
        [
          {
            "node": "Get file uploaded metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get file uploaded metadata": {
      "main": [
        [
          {
            "node": "Merge sheet & file data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets form Trigger": {
      "main": [
        [
          {
            "node": "Extract googlesheet data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow automates the collection and archival of compliance reports submitted via Google Forms. Uploaded documents (PDF, DOCX, etc.) are archived into Google Drive and submission metadata is logged into a MySQL database. It ensures compliance documentation is properly…

Source: https://n8n.io/workflows/7765/ — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

Base Bloqueados a DW. Uses mySql, googleSheetsTrigger. Event-driven trigger; 5 nodes.

MySQL, Google Sheets Trigger
Data & Sheets

Base Comite a DW. Uses mySql, googleSheetsTrigger. Event-driven trigger; 5 nodes.

MySQL, Google Sheets Trigger
Data & Sheets

Base Comite Mora a DW. Uses mySql, googleSheetsTrigger. Event-driven trigger; 5 nodes.

MySQL, Google Sheets Trigger
Data & Sheets

Base Grupos Economicos a DW. Uses mySql, googleSheetsTrigger. Event-driven trigger; 5 nodes.

MySQL, Google Sheets Trigger
Data & Sheets

Base Link a DW. Uses googleSheetsTrigger, mySql. Event-driven trigger; 5 nodes.

Google Sheets Trigger, MySQL