πŸ”’ Triage AWS security misconfigurations with GPT-4.1 Mini and send alerts to Gmail

⚑ 368 views Β· πŸ”’ SecOps & Security Automation

Description

What this workflow does

Automatically triages risky AWS misconfigurations and alerts your team.

Pipeline: Security Hub or AWS Config -> EventBridge rules -> SNS (HTTP) -> n8n Webhook -> Normalize -> AI Prioritizer -> Airtable (log) -> Gmail (email)

Category: Security / Cloud / Alerting
Time to set up: ~10–15 minutes
Difficulty: Beginner–Intermediate
Cost: Mostly free (n8n CE + AWS SNS/EventBridge; OpenAI + Airtable/Gmail as used)


What you’ll need


Nodes used


Setup steps

  1. Import and activate the workflow in n8n.

    • Webhook Respond: When Last Node Finishes -> First Entry JSON.

    • Append a shared secret to the URL, e.g. ?token=MY_SUPER_TOKEN, and keep the check in the SNS Handler code node.

  2. Create an SNS topic (e.g., misconfig-events) in the same region as your EventBridge rules.

  3. Create EventBridge rules targeting the SNS topic:

    • Rule A (Security Hub): source = aws.securityhub, detail-type = Security Hub Findings - Imported

    • Rule B (AWS Config): source = aws.config, detail-type = Config Rules Compliance Change

  4. Create an SNS subscription with Protocol = HTTP and Endpoint = your production webhook URL:
    http://YOUR_HOST:5678/webhook/aws-misconfig?token=MY_SUPER_TOKEN
    (The workflow auto-confirms the subscription on first POST.)

  5. Configure Airtable (Upsert on Finding ID) and Gmail recipients.

πŸ”— Nodes Used

Airtable, HTTP Request, Webhook, Gmail, OpenAI

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup