π AI-powered security analysis for n8n with Google Gemini and n8n audit API
β‘ 244 views Β· π SecOps & Security Automation
Description
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
- Create a Google Gemini API credential in n8n.
- Ensure your n8n API key has the correct scopes.
- 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.
π Nodes Used
HTTP Request, Basic LLM Chain, Structured Output Parser, n8n Form Trigger, Google Gemini Chat Model, n8n Form
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File