AutomationFlowsAI & RAG › Security Audit Bot

Security Audit Bot

Security Audit Bot. Uses googleGemini. Event-driven trigger; 5 nodes.

Event trigger★★★★☆ complexityAI-powered5 nodesGoogle Gemini
AI & RAG Trigger: Event Nodes: 5 Complexity: ★★★★☆ AI nodes: yes Added:

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": "Security Audit Bot",
  "nodes": [
    {
      "parameters": {},
      "id": "trigger",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        160,
        240
      ]
    },
    {
      "parameters": {
        "jsCode": "// \u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u304b\u3089\u8aad\u307f\u8fbc\u3093\u3060\u300c\u30a2\u30ab\u30a6\u30f3\u30c8\u53f0\u5e33\u300d\u306e\u30e2\u30c3\u30af\u30c7\u30fc\u30bf\nreturn [\n  {\n    json: {\n      accounts: [\n        { \"\u6c0f\u540d\": \"\u5c71\u7530\u592a\u90ce\", \"\u30e1\u30fc\u30eb\": \"yamada@example.com\", \"\u6700\u7d42\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u65e5\": \"2025-10-15\", \"\u72b6\u614b\": \"\u6709\u52b9\" },\n        { \"\u6c0f\u540d\": \"\u9234\u6728\u82b1\u5b50\", \"\u30e1\u30fc\u30eb\": \"suzuki@example.com\", \"\u6700\u7d42\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u65e5\": \"2026-02-10\", \"\u72b6\u614b\": \"\u6709\u52b9\" },\n        { \"\u6c0f\u540d\": \"\u4f50\u85e4\u6b21\u90ce\", \"\u30e1\u30fc\u30eb\": \"sato@example.com\", \"\u6700\u7d42\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u65e5\": \"2025-08-20\", \"\u72b6\u614b\": \"\u6709\u52b9\" }\n      ]\n    }\n  }\n];"
      },
      "id": "mock-data",
      "name": "Mock Account Data",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        380,
        240
      ]
    },
    {
      "parameters": {
        "jsCode": "const accounts = $input.first().json.accounts;\nconst today = new Date(); // \u5b9f\u884c\u65e5\u306e\u65e5\u4ed8\nconst targetUsers = [];\n\n// \u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u65e5\u304b\u308990\u65e5\u4ee5\u4e0a\u7d4c\u904e\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u62bd\u51fa\nfor (const acc of accounts) {\n  if (acc['\u72b6\u614b'] === '\u6709\u52b9') {\n    const lastChange = new Date(acc['\u6700\u7d42\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u65e5']);\n    const diffTime = Math.abs(today - lastChange);\n    const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n    \n    if (diffDays > 90) {\n      targetUsers.push(`${acc['\u6c0f\u540d']} (${diffDays}\u65e5\u7d4c\u904e)`);\n    }\n  }\n}\n\n// \u62bd\u51fa\u7d50\u679c\u3092\u6b21\u306e\u30ce\u30fc\u30c9\u3078\u6e21\u3059\nreturn [{ json: { targetUsers: targetUsers.join(', '), count: targetUsers.length } }];"
      },
      "id": "filter-node",
      "name": "Filter > 90 Days",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        600,
        240
      ]
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.5-flash",
          "mode": "list",
          "cachedResultName": "models/gemini-2.5-flash"
        },
        "messages": {
          "values": [
            {
              "content": "=\u3042\u306a\u305f\u306f\u793e\u5185\u306e\u60c5\u5831\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7ba1\u7406\u8005\u3067\u3059\u3002\n\u4ee5\u4e0b\u306e\u5bfe\u8c61\u8005\u306b\u5bfe\u3057\u3066\u3001\u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\uff08Teams/Slack\uff09\u3067\u9001\u4fe1\u3059\u308b\u300c\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u306e\u304a\u9858\u3044\u300d\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n[\u5bfe\u8c61\u8005]\n{{ $json.targetUsers }}\n\n[\u8981\u4ef6]\n1. \u6bce\u6708\u540c\u3058\u6587\u9762\u3060\u3068\u73fe\u5834\u306b\u7121\u8996\u3055\u308c\u308b\u305f\u3081\u3001\u5192\u982d\u306b\u300c\u4eca\u6708\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fb\u30d7\u30c1\u8c46\u77e5\u8b58\uff08\u4f8b\uff1a\u6700\u8fd1\u306e\u30d5\u30a3\u30c3\u30b7\u30f3\u30b0\u8a50\u6b3a\u306e\u624b\u53e3\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u4f7f\u3044\u56de\u3057\u306e\u5371\u967a\u6027\u306a\u3069\uff09\u300d\u30921\u301c2\u6587\u3067\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002\n2. \u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u304b\u308990\u65e5\u4ee5\u4e0a\u7d4c\u904e\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u901f\u3084\u304b\u306b\u5909\u66f4\u3059\u308b\u3088\u3046\u4fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n3. \u5168\u4f53\u7684\u306b\u4e01\u5be7\u304b\u3064\u3001\u5c11\u3057\u89aa\u3057\u307f\u3084\u3059\u3044\u30c8\u30fc\u30f3\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n4. Markdown\u306e\u88c5\u98fe\uff08\u592a\u5b57\u306a\u3069\uff09\u3092\u4f7f\u3063\u3066\u8aad\u307f\u3084\u3059\u304f\u3057\u3066\u304f\u3060\u3055\u3044\u3002"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        820,
        240
      ],
      "id": "gemini-msg",
      "name": "Gemini: Generate Message",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const message = $input.item.json.content.parts[0].text;\nconst targetCount = $('Filter > 90 Days').first().json.count;\nconst today = new Date().toISOString().split('T')[0];\n\n// \u6700\u7d42\u7684\u306bTeams\u7b49\u3078\u9001\u308b\u30c6\u30ad\u30b9\u30c8\u3068\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u300c\u76e3\u67fb\u30a8\u30d3\u30c7\u30f3\u30b9\u300d\u3068\u3057\u3066\u6b8b\u3059\u30c7\u30fc\u30bf\u3092\u51fa\u529b\nreturn [\n  {\n    json: {\n      \"Teams\u901a\u77e5\u7528\u30e1\u30c3\u30bb\u30fc\u30b8\": message,\n      \"\u76e3\u67fb\u30ed\u30b0\u8a18\u9332\u7528\u30c7\u30fc\u30bf\": {\n        \"\u76e3\u67fb\u65e5\": today,\n        \"\u5bfe\u8c61\u8005\u6570\": targetCount,\n        \"\u30b9\u30c6\u30fc\u30bf\u30b9\": \"\u5b8c\u4e86\"\n      }\n    }\n  }\n];"
      },
      "id": "format-output",
      "name": "Format Output",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1040,
        240
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Mock Account Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mock Account Data": {
      "main": [
        [
          {
            "node": "Filter > 90 Days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter > 90 Days": {
      "main": [
        [
          {
            "node": "Gemini: Generate Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini: Generate Message": {
      "main": [
        [
          {
            "node": "Format Output",
            "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

Security Audit Bot. Uses googleGemini. Event-driven trigger; 5 nodes.

Source: https://github.com/alternativescom/n8n-automation-workflows/blob/main/24-security-audit-bot/workflow.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Automacao_PrecoDistribuidoraV8. Uses telegramTrigger, telegram, postgres, googleGemini. Event-driven trigger; 54 nodes.

Telegram Trigger, Telegram, Postgres +1
AI & RAG

Most expense tracker apps (like Money Lover, Spendee, or Wallet) have a common friction point: Data Entry. You have to unlock your phone, find the app, wait for it to load, navigate menus, and manuall

Google Sheets, Google Gemini, Telegram +2
AI & RAG

This workflow helps you repurpose your YouTube videos across multiple social media platforms with zero manual effort. It’s designed for creators, businesses, and marketers who want to maximize reach w

HTTP Request, RSS Feed Read, Discord +4
AI & RAG

Sales Lead Qualifier. Uses telegramTrigger, googleSheets, telegram, googleGemini. Event-driven trigger; 41 nodes.

Telegram Trigger, Google Sheets, Telegram +3
AI & RAG

This workflow empowers marketing teams, agencies and solopreneurs to instantly generate on-brand, platform-optimized social media ads — without designers or complex setup. Running performance marketin

Form Trigger, HTTP Request, Slack +1