Library / Security & Compliance
Security & Compliance
Audit n8n workflows for security drift and email new findings via SMTP
Runs weekly and read-only through the n8n API to check workflows for hardcoded secrets, unauthenticated webhooks and other risks, then emails only findings new since the last run.
What it does
## Detect security drift in n8n workflows and email new findings Weekly read-only audit of all workflows on your instance. You get an email with only the findings that are new since the last run. ### How it works 1. Loads all workflows through the n8n API. Archived ones are skipped. 2. Checks for hardcoded secrets (also in inactive workflows), webhooks without authentication, active test or temp workflows, missing or broken error workflows, lowered execution-data protection, MCP access switched back on, webhook auth headers stored in the log, dead branches and ignored nested parameters. 3. Compares the result with the last run and emails the new findings. 4. Writes the baseline only after the email went out, so nothing gets lost if sending fails. ### Setup 1. Create an n8n API key (Settings > n8n API) and add it as an n8n API credential in *Fetch All Workflows*. 2. Add an SMTP credential to *Dispatch Alert Email*. 3. Fill in notifyTo and notifyFrom in *Set Configuration Values*. 4. Set your error workflow in the workflow settings. 5. Run once manually, then activate. n8n saves the baseline (static data) only in production runs. The first scheduled run reports everything once. ### Customization - acceptedKeys: paste a finding key from the email to accept it on purpose. - testNamePattern: regex for names of test or temp workflows. - Change the schedule in *Weekly Monday Trigger*.
The steps
- Weekly Monday Trigger
- Set Configuration Values
- Manual Start Trigger
- Fetch All Workflows
- Execute Baseline Security Checks
- Identify New Findings
- Check for New Findings
- Dispatch Alert Email
- Store Baseline Data
Similar automations