Skip to main content

Run weekly security audits via the n8n API, Data Tables, and Telegram

Workflow preview

Workflow preview
100%
Run weekly security audits via the n8n API, Data Tables, and Telegram preview
Open on n8n.io

1. Workflow Overview

Quick overview The native n8n security audit misses tokens pasted into node parameters, active workflows without an error handler, plain http:// calls and leftover pinned data. This workflow runs t...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.n8n, n8n-nodes-base.code, n8n-nodes-base.datatable, n8n-nodes-base.set, n8n-nodes-base.telegram

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Run weekly security audits via the n8n API, Data Tables, and Telegram
Workflow name
Run weekly security audits via the n8n API, Data Tables, and Telegram

Quick overview

The native n8n security audit misses tokens pasted into node parameters, active workflows without an error handler, plain http:// calls and leftover pinned data. This workflow runs the native audit plus five custom checks weekly, scores the result 0-100 and reports what changed to Telegram.

How it works

  1. A weekly Schedule Trigger starts the run.
  2. The n8n node generates the native security audit and lists every workflow over the n8n API.
  3. Five chained Code nodes scan all workflows for hardcoded secrets, unauthenticated webhooks, plain http:// URLs, missing error workflows and pinned data.
  4. Findings from the native audit and custom checks merge into a 0-100 score with a severity summary.
  5. A Data Table snapshot of the previous run gives new findings, fixed findings and the score delta.
  6. The current snapshot is saved back and the report goes to Telegram: totals by severity, new, fixed and all current findings.

Setup

  1. Create an API key with the securityAudit:generate and workflow:list scopes, save it as an n8n API credential and select it in both n8n nodes.
  2. Create a Data Table named security_audit_history with columns runAt (string), score (number), summary (string) and findings (string), and select it in both Data Table nodes.
  3. Set your Telegram credential and the target chat ID.
  4. Pick the weekday and hour, run once manually to seed the history, then activate.

Requirements

  • n8n 1.113 or newer (Data Tables)
  • An n8n API key for your own instance
  • A Telegram bot and a chat ID

Customization

  • Reword or reorder the report in the Compose message node - it is a plain template, no code changes
  • Separate subject and text fields make the Telegram node swap for Slack, email or a webhook
  • Disable any check node you do not need - the chain keeps working
  • Adjust severity weights in the Score the audit node

Additional info

Built for admins of self-hosted n8n instances and anyone keeping a shared instance clean. Everything runs inside n8n - no external storage, no AI calls - only the report message leaves your instance.

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 - Sticky Note

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

Block 2 - Sticky Note1

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note3

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

Block 5 - Sticky Note4

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

Block 6 - Sticky Note5

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

Block 7 - Sticky Note6

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

Block 8 - Sticky Note7

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

Block 9 - Sticky Note8

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

Block 10 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 11 - Generate a security audit

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

Block 12 - Get all workflows

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

Block 13 - Check 2: unauthenticated webhooks

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

Block 14 - Check 3: insecure HTTP URLs

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

Block 15 - Check 4: missing error workflows

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

Block 16 - Check 5: pinned data

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

Block 17 - Score the audit

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

Block 18 - Get previous snapshot

Type / Role
n8n-nodes-base.dataTable - dataTable
Config choices
Version 1.1

Block 19 - Diff vs last snapshot

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

Block 20 - Save snapshot

Type / Role
n8n-nodes-base.dataTable - dataTable
Config choices
Version 1.1

Block 21 - Prepare report fields

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

Block 22 - Compose message

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

Block 23 - Send report to Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 24 - Check 1: hardcoded secrets

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

3. Summary Table

Workflow Run weekly security audits via the n8n API, Data Tables, and Telegram
Complexity advanced
Nodes 24
Categories SecOps, AI Summarization
Author Serhii Bondarenko
Published 07 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16164/16164.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 Run weekly security audits via the n8n API, Data Tables, and Telegram do?

Quick overview The native n8n security audit misses tokens pasted into node parameters, active workflows without an error handler, plain http:// calls and leftover pinned data. This workflow runs t...

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.