Skip to main content

Triage AWS security misconfigurations with GPT-4.1 Mini and send alerts to Gmail

Workflow preview

Workflow preview
100%
Triage AWS security misconfigurations with GPT-4.1 Mini and send alerts to Gmail preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 Nor...

Best for

  • SecOps automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.gmail, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.airtable, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.httprequest

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Calistus Christian.

Original n8n.io source

1.1 Workflow description

Title
Triage AWS security misconfigurations with GPT-4.1 Mini and send alerts to Gmail
Workflow name
Triage AWS security misconfigurations with GPT-4.1 Mini and send alerts to Gmail

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)

  • Normalizes incoming findings (S3 / Security Groups / IAM / RDS) into a consistent JSON.

  • Uses an LLM to assign a priority (P0–P3) with rationale and remediation steps.

  • Upserts the finding into Airtable (avoids duplicates).

  • Emails a compact incident summary to your inbox. This can be swapped for Microsoft Teams or Slack, etc.

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

  • An n8n instance reachable over HTTP.

  • AWS account (one region) with permissions to create SNS topics and EventBridge rules.

  • Security Hub enabled (or AWS Config rules that emit compliance events).

  • n8n credentials: OpenAI, Airtable, Gmail.


Nodes used

  • Webhook (POST /aws-misconfig)

  • Code: SNS Handler (token check, confirm/unwrap)

  • IF: route mode === "confirm" vs notification

  • HTTP Request: SNS SubscriptionConfirmation (GET)

  • Code: Normalize Finding

  • Message a model: AI Prioritizer (JSON out)

  • Airtable: Create/Upsert

  • Gmail: Send message

  • Edit Fields: final JSON response


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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 2 - Normalize Finding

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Send a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 4 - AI Prioritizer

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 5 - Airtable - Create Record

Type / Role
n8n-nodes-base.airtable - airtable
Config choices
Version 2.1

Block 6 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - SNS Handler

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - SNS Confirm

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 10 - Edit Fields1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Triage AWS security misconfigurations with GPT-4.1 Mini and send alerts to Gmail
Complexity intermediate
Nodes 12
Categories SecOps, Multimodal AI
Author Calistus Christian
Published 09 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7202/7202.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Triage AWS security misconfigurations with GPT-4.1 Mini and send alerts to Gmail do?

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 Nor...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your SecOps, Multimodal AI use case.