AutomationFlowsEmail & Gmail › Send Formatted Security Incident Reports From Google Forms with Gmail and…

Send Formatted Security Incident Reports From Google Forms with Gmail and…

Original n8n title: Send Formatted Security Incident Reports From Google Forms with Gmail and Google Sheets

Bynexum @nexum on n8n.io

This workflow watches a Google Forms responses spreadsheet, formats each new security incident into a clean report, emails it via Gmail to a manager, and appends the incident data to an archive sheet in Google Sheets. Triggers when a new row is added to the Google Sheets tab…

Event trigger★★★★☆ complexity12 nodesGoogle Sheets TriggerGoogle SheetsGmail
Email & Gmail Trigger: Event Nodes: 12 Complexity: ★★★★☆ Added:

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

This workflow follows the Gmail → Google Sheets 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
{
  "name": "Automate security incident reports from Google Forms to Gmail and Sheets",
  "nodes": [
    {
      "id": "b701eaf0-9e95-43f5-8926-2e3c104d6d88",
      "name": "New Form Response",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        0,
        260
      ],
      "parameters": {
        "event": "rowAdded",
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultName": "R\u00e9ponses"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_SHEET_ID_HERE"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9eb16ce2-4c62-4acf-ad7f-a9ff33758ae7",
      "name": "Configure",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        260
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "c1",
              "name": "managerEmail",
              "type": "string",
              "value": "user@example.com"
            },
            {
              "id": "c2",
              "name": "directorEmail",
              "type": "string",
              "value": "user@example.com"
            },
            {
              "id": "c3",
              "name": "companyName",
              "type": "string",
              "value": "Your Security Company"
            },
            {
              "id": "c4",
              "name": "sheetUrl",
              "type": "string",
              "value": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit"
            },
            {
              "id": "c5",
              "name": "highSeverityLevels",
              "type": "string",
              "value": "Haute,Critique"
            }
          ]
        },
        "includeOtherFields": false
      },
      "typeVersion": 3.4
    },
    {
      "id": "b23d2d41-5515-4d13-978a-28633e6efc09",
      "name": "Prepare Report",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        260
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "p0",
              "name": "incidentId",
              "type": "string",
              "value": "=INC-{{ $now.toFormat('yyyyLLdd-HHmmss') }}"
            },
            {
              "id": "p1",
              "name": "date",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Date'] }}"
            },
            {
              "id": "p2",
              "name": "site",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Site / client'] }}"
            },
            {
              "id": "p3",
              "name": "agent_nom",
              "type": "string",
              "value": "={{ $('New Form Response').item.json[\"Nom de l'agent\"] }}"
            },
            {
              "id": "p4",
              "name": "agent_email",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Email agent'] }}"
            },
            {
              "id": "p5",
              "name": "heure_debut",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Heure de debut'] }}"
            },
            {
              "id": "p6",
              "name": "heure_fin",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Heure de fin'] }}"
            },
            {
              "id": "p7",
              "name": "type_intervention",
              "type": "string",
              "value": "={{ $('New Form Response').item.json[\"Type d'intervention\"] }}"
            },
            {
              "id": "p8",
              "name": "description",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Description'] }}"
            },
            {
              "id": "p9",
              "name": "suite_donnee",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Suite donnee'] }}"
            },
            {
              "id": "p10",
              "name": "severity",
              "type": "string",
              "value": "={{ $('New Form Response').item.json['Gravit\u00e9'] || 'Non pr\u00e9cis\u00e9e' }}"
            },
            {
              "id": "p11",
              "name": "duration_min",
              "type": "number",
              "value": "={{ (Math.round(DateTime.fromFormat(String($('New Form Response').item.json['Heure de fin']), 'HH:mm').diff(DateTime.fromFormat(String($('New Form Response').item.json['Heure de debut']), 'HH:mm'), 'minutes').minutes) || 0) }}"
            },
            {
              "id": "p12",
              "name": "isHighSeverity",
              "type": "boolean",
              "value": "={{ $('Configure').first().json.highSeverityLevels.toLowerCase().split(',').map(s => s.trim()).includes(String($('New Form Response').item.json['Gravit\u00e9'] || '').toLowerCase().trim()) }}"
            },
            {
              "id": "p13",
              "name": "received_at",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            },
            {
              "id": "p14",
              "name": "status",
              "type": "string",
              "value": "Reported"
            }
          ]
        },
        "includeOtherFields": false
      },
      "typeVersion": 3.4
    },
    {
      "id": "ef4a0d5c-ec76-46dd-b7ce-a376fe07941f",
      "name": "Archive Intervention",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1200,
        0
      ],
      "parameters": {
        "columns": {
          "mappingMode": "autoMapInputData",
          "matchingColumns": []
        },
        "options": {},
        "resource": "sheet",
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "0",
          "cachedResultName": "Archive"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('Configure').first().json.sheetUrl }}"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "4a032093-9144-4928-be47-efdceec81f79",
      "name": "Check Severity",
      "type": "n8n-nodes-base.if",
      "position": [
        1200,
        520
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "sev1",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.isHighSeverity }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "ea7f9fe3-4f14-4c24-9452-83b8f128f4d3",
      "name": "Send Urgent Escalation",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1600,
        260
      ],
      "parameters": {
        "sendTo": "={{ $('Configure').first().json.directorEmail }}",
        "message": "=<div style=\"font-family:Arial,sans-serif;max-width:640px\"><div style=\"background:#c0392b;color:#ffffff;padding:12px 16px;font-weight:bold;border-radius:6px 6px 0 0\">INCIDENT PRIORITAIRE \u2014 {{ $('Prepare Report').item.json.severity }}</div><div style=\"border:1px solid #eee;border-top:none;padding:16px;border-radius:0 0 6px 6px\"><p>Un incident de gravit\u00e9 <strong>{{ $('Prepare Report').item.json.severity }}</strong> vient d'\u00eatre signal\u00e9 et requiert une attention imm\u00e9diate.</p><table border=\"1\" cellpadding=\"8\" cellspacing=\"0\" style=\"border-collapse:collapse;width:100%;font-size:14px\"><tr><td><strong>Date</strong></td><td>{{ $('Prepare Report').item.json.date }}</td></tr><tr><td><strong>Site / Client</strong></td><td>{{ $('Prepare Report').item.json.site }}</td></tr><tr><td><strong>Agent</strong></td><td>{{ $('Prepare Report').item.json.agent_nom }}</td></tr><tr><td><strong>Gravit\u00e9</strong></td><td>{{ $('Prepare Report').item.json.severity }}</td></tr><tr><td><strong>Type d'intervention</strong></td><td>{{ $('Prepare Report').item.json.type_intervention }}</td></tr><tr><td><strong>D\u00e9but \u2192 Fin</strong></td><td>{{ $('Prepare Report').item.json.heure_debut }} \u2192 {{ $('Prepare Report').item.json.heure_fin }} ({{ $('Prepare Report').item.json.duration_min }} min)</td></tr><tr><td><strong>Description</strong></td><td>{{ $('Prepare Report').item.json.description }}</td></tr><tr><td><strong>Suite donn\u00e9e</strong></td><td>{{ $('Prepare Report').item.json.suite_donnee }}</td></tr></table><p style=\"color:#888;font-size:12px;margin-top:16px\">R\u00e9f. {{ $('Prepare Report').item.json.incidentId }} \u00b7 Re\u00e7u le {{ $('Prepare Report').item.json.received_at }} \u00b7 {{ $('Configure').first().json.companyName }}</p></div></div>",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ '[URGENT \u2014 ' + $('Prepare Report').item.json.severity + '] Incident ' + $('Prepare Report').item.json.site + ' \u2014 ' + $('Prepare Report').item.json.incidentId }}",
        "resource": "message",
        "emailType": "html",
        "operation": "send"
      },
      "typeVersion": 2.2
    },
    {
      "id": "6d1dee43-272e-48b7-8029-298f83a23532",
      "name": "Send Standard Report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1600,
        780
      ],
      "parameters": {
        "sendTo": "={{ $('Configure').first().json.managerEmail }}",
        "message": "=<div style=\"font-family:Arial,sans-serif;max-width:640px\"><h2 style=\"color:#2c3e50\">Rapport d'intervention \u2014 {{ $('Configure').first().json.companyName }}</h2><table border=\"1\" cellpadding=\"8\" cellspacing=\"0\" style=\"border-collapse:collapse;width:100%;font-size:14px\"><tr><td><strong>Date</strong></td><td>{{ $('Prepare Report').item.json.date }}</td></tr><tr><td><strong>Site / Client</strong></td><td>{{ $('Prepare Report').item.json.site }}</td></tr><tr><td><strong>Agent</strong></td><td>{{ $('Prepare Report').item.json.agent_nom }}</td></tr><tr><td><strong>Gravit\u00e9</strong></td><td>{{ $('Prepare Report').item.json.severity }}</td></tr><tr><td><strong>Type d'intervention</strong></td><td>{{ $('Prepare Report').item.json.type_intervention }}</td></tr><tr><td><strong>D\u00e9but \u2192 Fin</strong></td><td>{{ $('Prepare Report').item.json.heure_debut }} \u2192 {{ $('Prepare Report').item.json.heure_fin }} ({{ $('Prepare Report').item.json.duration_min }} min)</td></tr><tr><td><strong>Description</strong></td><td>{{ $('Prepare Report').item.json.description }}</td></tr><tr><td><strong>Suite donn\u00e9e</strong></td><td>{{ $('Prepare Report').item.json.suite_donnee }}</td></tr></table><p style=\"color:#888;font-size:12px;margin-top:16px\">R\u00e9f. {{ $('Prepare Report').item.json.incidentId }} \u00b7 Re\u00e7u le {{ $('Prepare Report').item.json.received_at }}</p></div>",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ '[Rapport] ' + $('Prepare Report').item.json.site + ' \u2014 ' + $('Prepare Report').item.json.date + ' \u2014 ' + $('Prepare Report').item.json.agent_nom }}",
        "resource": "message",
        "emailType": "html",
        "operation": "send"
      },
      "typeVersion": 2.2
    },
    {
      "id": "7a565c00-388a-4ad8-8a09-59b963d2f812",
      "name": "Acknowledge Agent",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2000,
        520
      ],
      "parameters": {
        "sendTo": "={{ $('Prepare Report').item.json.agent_email }}",
        "message": "=<div style=\"font-family:Arial,sans-serif;max-width:560px\"><p>Bonjour {{ $('Prepare Report').item.json.agent_nom }},</p><p>Votre rapport d'intervention du <strong>{{ $('Prepare Report').item.json.date }}</strong> sur <strong>{{ $('Prepare Report').item.json.site }}</strong> a bien \u00e9t\u00e9 enregistr\u00e9 sous la r\u00e9f\u00e9rence <strong>{{ $('Prepare Report').item.json.incidentId }}</strong>.</p><p>Merci.<br>{{ $('Configure').first().json.companyName }}</p></div>",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ 'Rapport bien re\u00e7u \u2014 ' + $('Prepare Report').item.json.incidentId }}",
        "resource": "message",
        "emailType": "html",
        "operation": "send"
      },
      "typeVersion": 2.2
    },
    {
      "id": "sticky-overview",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -107
      ],
      "parameters": {
        "color": 7,
        "width": 420,
        "height": 1140,
        "content": "## Automate Security Incident Reports (with severity routing)\n\nWhen a security agent submits a Google Form after an incident, this workflow assigns an incident ID, computes the intervention duration, routes the report by severity, archives it in Google Sheets, and sends the agent a receipt.\n\n### How it works\n1. New Form Response fires on each form submission (via the linked Google Sheet).\n2. Configure holds all user settings (emails, company, severity levels).\n3. Prepare Report maps the fields and adds an Incident ID, duration and a severity flag.\n4. Archive Intervention logs the incident with its ID and status.\n5. Check Severity sends high-severity incidents to an urgent escalation (director), the rest to a standard report (manager).\n6. Acknowledge Agent emails the submitting agent a confirmation.\n\n### Setup\n1. Connect your Google Sheets, Google Sheets Trigger and Gmail credentials.\n2. Link your Google Form to a Sheet (Forms > Responses), select it in New Form Response.\n3. Form fields: Date, Site / client, Nom de l agent, Email agent, Heure de debut, Heure de fin, Type d intervention, Description, Suite donnee, Gravite.\n4. In Configure, set manager and director emails, company name, and which Gravite values count as high.\n5. Activate the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-s1",
      "name": "Trigger & Configure",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        153
      ],
      "parameters": {
        "color": 1,
        "width": 720,
        "height": 327,
        "content": "Fires on each new Google Form response. Configure holds every user setting: manager and director emails, company name, and severity levels."
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-s2",
      "name": "Prepare, Archive & Route",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -107
      ],
      "parameters": {
        "color": 1,
        "width": 720,
        "height": 847,
        "content": "Maps the form columns, adds an Incident ID, duration and severity flag. Archives to Sheets on one branch, evaluates severity on the other."
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-s3",
      "name": "Escalate & Acknowledge",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        153
      ],
      "parameters": {
        "color": 1,
        "width": 720,
        "height": 847,
        "content": "High severity goes to an urgent escalation (director), the rest to a standard report (manager). Both then email the agent a receipt."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Configure": {
      "main": [
        [
          {
            "node": "Prepare Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Severity": {
      "main": [
        [
          {
            "node": "Send Urgent Escalation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Standard Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Report": {
      "main": [
        [
          {
            "node": "Archive Intervention",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check Severity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Form Response": {
      "main": [
        [
          {
            "node": "Configure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Standard Report": {
      "main": [
        [
          {
            "node": "Acknowledge Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Urgent Escalation": {
      "main": [
        [
          {
            "node": "Acknowledge Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "description": "On each Google Form incident submission: generates an incident ID, computes duration, routes by severity (urgent escalation to director vs standard report to manager), archives to Sheets, and emails an acknowledgement to the agent."
}
Pro

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

About this workflow

This workflow watches a Google Forms responses spreadsheet, formats each new security incident into a clean report, emails it via Gmail to a manager, and appends the incident data to an archive sheet in Google Sheets. Triggers when a new row is added to the Google Sheets tab…

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

More Email & Gmail workflows → · Browse all categories →

Related workflows

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

Email & Gmail

Automatically processes new orders added to Google Sheets. Small orders are approved instantly; large orders trigger an HTML email with one-click Approve / Reject links — each handled by an independen

Google Sheets Trigger, Google Sheets, Gmail +1
Email & Gmail

General use cases include: Property managers who manage multiple buildings or units. Building owners looking to centralize tenant repair communication. Automation builders who want to learn multi-trig

Google Sheets, Google Drive, Gmail +1
Email & Gmail

FlujoDeReservasUpdated. Uses googleSheetsTrigger, googleSheets, googleCalendar, gmail. Event-driven trigger; 27 nodes.

Google Sheets Trigger, Google Sheets, Google Calendar +1
Email & Gmail

Fluidflow Licensing Framework. Uses httpRequest, xero, googleSheetsTrigger, slack. Event-driven trigger; 25 nodes.

HTTP Request, Xero, Google Sheets Trigger +4
Email & Gmail

This workflow automates the full offer letter lifecycle, from generation to final candidate response tracking. When a new row with a Pending status is added to Google Sheets, it creates a personalized

Google Sheets Trigger, Google Drive, Google Docs +2