# Automate incident reporting & alerts with forms, Google Sheets and Gmail

## Incident Reporting & Management Workflow (n8n + Webhook + Google Sheets + Email)

## Description

**1. Node: On form submission**  
Recommended Name in n8n:
Form Submission Webhook
Receives incident report data from the Google Form (via webhook trigger).  
This node starts the workflow every time a new form entry is submitted.

**2. Node: Google Sheets (append: sheet)**  
Recommended Name in n8n:
Log Incident to Google Sheet  
Appends each new incident report as a row in the specified Google Sheet.  
Creates a real-time, easily auditable log of all incident submissions.

**3. Node: Gmail (send: message)**  
Recommended Name in n8n:
Send Alert Email to Support Team  
Sends an immediate notification email to the support/response team.  
Includes key incident details (such as message, location, severity, and timestamp) to ensure rapid awareness and response.

## Sample Workflow Description (For Workflow/Group Note)

Incident Reporting & Management Workflow (Google Forms → n8n Webhook → Google Sheets & Email)

## Who’s It For
- Renewable energy operators (solar/wind/green energy).
- Facility and plant managers.
- Environmental, EHS and safety teams.
- Technical support and incident response crews.
- Maintenance & field operations teams.
- Anyone aiming for compliance-ready, audit-friendly digital issue reporting.

## How It Works

1. **Form Submission**: An n8n-powered form (or webhook endpoint) receives incident reports, capturing all key details: reporter info, contact, location, date/time, type, severity, actions taken, photos and more.
2. **Log to Google Sheets**: Each report is instantly appended as a new row in a secure Google Sheet, creating a searchable, timestamped audit trail.
3. **Email Alert (Gmail)**: An automatic email with incident summary and critical details lands in the support team’s inbox seconds after submission—ensuring your response is always prompt.
4. **Workflow Automation**: These nodes are linked in n8n, enabling no-code/low-code back-end automation for complete visibility and control.

## How to Set Up

1. **Import Workflow**: In n8n, use "Import from File" to upload the workflow JSON provided.
2. **Edit Configuration**:
   - Update form fields as needed (label, validations, options for severity/category).
   - Enter your Google Sheet ID and sharing settings.
   - Configure Gmail/SMTP credentials and recipient address (example: `supportteam@mailinator.com` or your own team).
3. **Deploy Webhook**: Copy your n8n webhook URL and connect it to your reporting interface (form, app, device, etc.).
4. **Activate**: Enable the workflow in n8n. Submissions are now handled in real time.
5. **Test**: Submit a sample incident to make sure data logs in Google Sheets and the alert email arrives as expected.

## Requirements

| Tool | Purpose |
| --- | --- |
| n8n Instance | Orchestrates the workflow |
| Google Account | To access/use Google Sheets |
| Gmail/SMTP | For sending incident alerts |
| Incident Source | n8n Form, webhook, app or device |

## How to Customize
- **Form Fields**: Add/remove fields or validations in the n8n form for organization-specific needs (e.g., add photos, custom categories).
- **Alert Routing**: Use IF nodes to send critical alerts via Slack, SMS or escalate to on-call teams based on severity/type.
- **Backend**: Replace Google Sheets with Notion, Airtable, PostgreSQL or other databases.
- **Reporting**: Add PDF nodes to auto-generate and send report summaries.
- **Integrations**: Push incidents to ticketing, asset tracking or calendar scheduling workflows.

## Add‑Ons (Optional Extensions)

| Feature | Description |
| --- | --- |
| Slack Alerts | Instantly notify Slack channels on critical issues |
| Database Logging | Store reports in SQL/NoSQL systems |
| PDF Generation | Email ready-to-use incident reports as PDFs |
| Calendar Events | Schedule follow-ups or deadline reminders |
| AI Categorization | Auto-classify incidents by severity/type |
| Task Creation | Open tickets in Jira, Trello, ClickUp or Asana |

## Use Case Examples
- Field engineers report solar inverter faults with mobile forms.
- Security personnel log site intrusions, with photos and severity.
- IoT sensors auto-post equipment failures as incidents.
- Compliance or EHS teams capture safety observations in real time.
- Technicians submit maintenance or post-repair issues instantly.

## Common Troubleshooting

| Issue | Possible Cause | Solution |
| --- | --- | --- |
| Form not triggering | Webhook URL incorrect | Double-check webhook endpoint and method (POST) |
| Email not delivered | Wrong SMTP/Gmail credentials | Re-enter credentials or verify SMTP access |
| Google Sheets not updated | Sheets ID wrong/missing permissions | Use correct ID, share sheet with service account or make accessible |
| Missing report fields in log | Form field names or types mismatched | Align JSON/form data keys with workflow node mappings |
| Attachments not saved | Field not set for file type | Review form field definitions and adjust as needed |
