Skip to main content

AI-powered security analysis for n8n with Google Gemini and n8n audit API

Workflow preview

Workflow preview
100%
AI-powered security analysis for n8n with Google Gemini and n8n audit API preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Generate a security audit report from an n8n instance to a web form This workflow provides a deep dive security assessment of an n8n instance using the native Audit API and AI analysis. Who’s it fo...

Best for

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

Tools used

n8n-nodes-base.code, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.formtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote, n8n-nodes-base.form

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
AI-powered security analysis for n8n with Google Gemini and n8n audit API
Workflow name
AI-powered security analysis for n8n with Google Gemini and n8n audit API

Generate a security audit report from an n8n instance to a web form

This workflow provides a deep-dive security assessment of an n8n instance using the native Audit API and AI analysis.

Who’s it for

  • This template is for n8n administrators and DevSecOps engineers who need to maintain a high security standard across their automation infrastructure.
  • It is particularly useful for teams managing self-hosted instances with multiple users.

How it works

  • The workflow triggers via an n8n Form where you provide your instance URL and API key.
  • It calls the official n8n Audit API to scan for five categories of risk: instance settings, credentials, database (SQL injection), nodes, and filesystem access.
  • A Code node parses this data, which is then analyzed by Google Gemini to create a prioritized remediation plan.

Requirements

  • n8n version v1.0 or higher.
  • A Google Gemini API Key.
  • An n8n API Key with 'Audit' scope permissions.

How to set up

  1. Create a Google Gemini API credential in n8n.
  2. Ensure your n8n API key has the correct scopes.
  3. Execute the workflow and enter your credentials into the trigger form.

How to customize the workflow

  • You can easily swap the Google Gemini node for OpenAI or Anthropic.
  • You can also add a 'Send Email' or 'Slack' node at the end to automatically route the report to your security channel instead of just viewing it in the browser.

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 - Prepare Audit Data

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

Block 2 - AI Report Generator

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.4

Block 3 - Format Report Output

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

Block 4 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 5 - gemini-2.f-flash

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 6 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.3

Block 7 - Get Audit Data

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

Block 8 - Code Explanation

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

Block 9 - Stage 1

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

Block 10 - Stage 3

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

Block 11 - Workflow Documentation

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

Block 12 - Display Final Audit Report

Type / Role
n8n-nodes-base.form - form
Config choices
Version 2.3

3. Summary Table

Workflow AI-powered security analysis for n8n with Google Gemini and n8n audit API
Complexity intermediate
Nodes 12
Categories SecOps, AI Summarization
Author Hatem Gifaeeri
Published 19 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11975/11975.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 AI-powered security analysis for n8n with Google Gemini and n8n audit API do?

Generate a security audit report from an n8n instance to a web form This workflow provides a deep dive security assessment of an n8n instance using the native Audit API and AI analysis. Who’s it fo...

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, AI Summarization use case.