CORTEXFLOW · FREE FOREVER

Automation

n8n Security Advisory Triage

↓ Download workflow JSON

Import in n8n: Workflows → ⋯ → Import from file, then add your credentials. Free download with a free account.

How it works

Your daily security guard for self-hosted n8n. In October 2026 GitHub published the largest single batch of n8n security advisories to date — 10 High + 4 Medium GHSA items, fixed in n8n 2.41.4 / 2.42.1. Miss those and your instance stays exposed. This workflow watches the GitHub Advisory Database and tells you within hours whether YOUR version is affected:

  1. STEP 1 — Daily trigger + fetch GitHub advisories — a 7 AM schedule trigger pulls the latest n8n advisories from the GitHub Advisory Database (npm ecosystem). No auth needed.
  2. STEP 2 — Dedupe vs seen IDs + log NEW — the workflow reads the GHSA IDs already in your Google Sheet, keeps only genuinely fresh advisories, and appends them with status NEW. On quiet days you just get a short all-clear Telegram message.
  3. STEP 3 — AI impact assessment vs YOUR version — an AI Agent compares each advisory’s vulnerable version range against your configured n8n version and returns a structured verdict (severity, is_my_version_affected, patch_action, one-line summary) via a Structured Output Parser. The sheet flips to ASSESSED.
  4. STEP 4 — Urgent alerts + daily digest — advisories that affect your version AND are high or critical severity fire an instant 🚨 Telegram alert with the patch action and advisory link, and the sheet flips to NOTIFIED_URGENT. Both branches then merge into one daily digest on Telegram: new advisories triaged plus the urgent ones worth patching now.

Status flow in Sheets: NEW → ASSESSED → NOTIFIED_URGENT

Set up steps

You’ll need:

  • n8n (self-hosted or cloud)
  • An OpenAI API key — platform.openai.com → API keys
  • A Google Sheets OAuth2 credential — n8n Credentials → New → Google Sheets OAuth2 (Google account sign-in)
  • A Telegram bot — message @BotFather, send /newbot, copy the token; get your chat ID from @userinfobot
  • Your n8n version — in n8n: Settings → About

Steps:

  1. Import the workflow — in n8n, Workflows → Import from File → select n8n-security-advisory-triage.json.
  2. CONFIG — Instance — open the Set node and fill in:
    • n8n_version — e.g. 2.41.6 (find it in n8n under Settings → About). This is what the AI compares against every advisory’s vulnerable range.
    • github_token — optional, leave empty. Only add a token (generate one at github.com/settings/tokens) if you ever hit GitHub’s unauthenticated rate limit.
  3. CONFIG — Google Sheets — create a Google Sheet with a tab named Advisories and headers: GHSA ID | Published | Severity | Affected Versions | My Version Affected | Patch Action | Status. Paste the spreadsheet ID into spreadsheet_id. Then select your Google Sheets credential in the four Sheets nodes.
  4. OpenAI — select your OpenAI credential in the OpenAI Chat Model — Assessment node (gpt-4o-mini is the default; plenty for this task).
  5. CONFIG — Notifications — paste your Telegram chat ID, select your Telegram credential, and activate the workflow. The first run fires at 7 AM the next morning (use “Execute workflow” to test immediately).

Customize it

  • Watch more than n8n — change the affects query param in the Fetch n8n Advisories HTTP node (e.g. affects=langchain, or drop the filter and post-filter by ecosystem in the Filter New Advisories code node).
  • Lower the urgency bar — in Compute Urgency, add "moderate" to the severity list so medium advisories affecting your version also fire instant alerts.
  • Add Slack alongside Telegram — clone the Telegram — URGENT Security Alert node, swap in an n8n-nodes-base.slack node, and connect it to the same TRUE branch of IF — Urgent?.
  • Run hourly during active incident windows — change the Schedule Trigger from daily 7 AM to hourly; the GHSA-ID dedupe keeps it safe at any cadence (GitHub allows 60 unauthenticated requests/hour, plenty for hourly polling).
  • Track patching — add a Patched column to the sheet and flip NOTIFIED_URGENT rows manually after upgrading, so your history doubles as a patch log.

Workflow nodes

This workflow is built from 21 nodes. Here's what each one does:

#NodeTypeWhat it does
1 Daily 7AM Advisory Check Schedule Trigger Starts the workflow automatically on a schedule.
2 CONFIG — Instance Set Holds editable configuration values — fill in your own settings here before activating.
3 CONFIG — Google Sheets Set Holds editable configuration values — fill in your own settings here before activating.
4 Read Seen Advisory IDs Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
5 Fetch n8n Advisories HTTP Request Calls an external API or webhook endpoint.
6 Filter New Advisories Code Runs custom JavaScript to transform, filter, or compute data between steps.
7 IF — New Advisories? IF Splits the flow into branches based on a condition.
8 Telegram — All Clear Telegram Sends you a Telegram message or alert.
9 Log Advisory — NEW Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
10 AI Agent — Assess Impact on My Version AI Agent The AI brain — reasons over the task and calls tools to get it done.
11 OpenAI Chat Model — Assessment OpenAI Chat Model The language model powering the AI agent.
12 Structured Output Parser — Impact Structured Output Parser Forces the AI to return clean, structured JSON instead of free text.
13 Compute Urgency Code Runs custom JavaScript to transform, filter, or compute data between steps.
14 Update Sheet — ASSESSED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
15 IF — Urgent? IF Splits the flow into branches based on a condition.
16 Telegram — URGENT Security Alert Telegram Sends you a Telegram message or alert.
17 Update Sheet — NOTIFIED_URGENT Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
18 Merge — Combine Branches Merge Combines the outputs of two or more branches back into one flow.
19 Build Daily Digest Code Runs custom JavaScript to transform, filter, or compute data between steps.
20 CONFIG — Notifications Set Holds editable configuration values — fill in your own settings here before activating.
21 Telegram — Send Digest Telegram Sends you a Telegram message or alert.

Setup instructions

1. Add your credentials

In n8n go to Credentials → New, create each credential below, then open the named node and select it:

NodeCredential to add
Read Seen Advisory IDs Google Sheets OAuth2
Telegram — All Clear Telegram Bot API
Log Advisory — NEW Google Sheets OAuth2
OpenAI Chat Model — Assessment OpenAI API
Update Sheet — ASSESSED Google Sheets OAuth2
Telegram — URGENT Security Alert Telegram Bot API
Update Sheet — NOTIFIED_URGENT Google Sheets OAuth2
Telegram — Send Digest Telegram Bot API

2. Fill in your config values

Open the config node listed below and replace each placeholder with your own value before activating the workflow:

NodeFieldWhat to paste
CONFIG — Instance n8n_version PASTE_YOUR_N8N_VERSION
Your n8n version
CONFIG — Instance github_token PASTE_YOUR_GITHUB_TOKEN_OR_EMPTY
Your github token or empty
CONFIG — Google Sheets spreadsheet_id PASTE_YOUR_SPREADSHEET_ID
Your spreadsheet id
CONFIG — Notifications telegram_chat_id PASTE_YOUR_TELEGRAM_CHAT_ID
Your telegram chat id

How this workflow starts

  • Schedule Trigger: Runs every hours.

Use cases

If you self-host n8n, your instance holds the keys to everything your workflows touch — CRMs, inboxes, payment tools. When a batch of advisories drops, the question is never whether vulnerabilities exist, it is whether your version is affected and how fast you find out. This template checks the GitHub Advisory Database every morning at 7 AM, dedupes against the GHSA IDs it has already seen, and has an AI agent compare each advisory's vulnerable version range against your configured n8n version. High or critical issues affecting your version fire an instant Telegram alert with the patch action; everything else is folded into a daily digest, and quiet days get a short all-clear message.

The freelancer hosting a dozen client workflows

Priya runs client automations from a single self-hosted n8n, which makes her instance a single point of failure for twelve businesses. She puts her version in the CONFIG — Instance node, and every morning the Fetch n8n Advisories node pulls the latest npm-ecosystem advisories without any auth. The AI assessment returns a structured verdict — severity, whether her version is affected, the patch action, and a one-line summary — and only genuinely urgent items wake her up. Practical tip: on first run, use Execute Workflow to test immediately instead of waiting for 7 AM, and confirm the sheet logs the advisory as NEW, then ASSESSED, then NOTIFIED_URGENT for anything urgent.

The automation agency with four client instances

An agency managing several client n8n servers can clone this workflow per instance, each with its own n8n_version in the config and its own Telegram chat. The GHSA-ID dedupe in Filter New Advisories means polling is safe at any cadence — a quiet day just appends nothing and sends the all-clear. Practical tip: during an active incident window, switch the Schedule Trigger from daily to hourly; GitHub allows 60 unauthenticated requests per hour, so hourly polling stays well within limits, and you can add a github_token in the config only if you ever hit the rate limit.

The MSP that needs an audit trail

A managed service provider with compliance-conscious clients cannot just patch — it has to prove it knew, assessed, and acted. The Advisories sheet is that paper trail: every advisory lands as NEW, flips to ASSESSED after the AI verdict, and becomes NOTIFIED_URGENT when an alert fires, with the affected versions and patch action stored alongside. Practical tip: add a Patched column to the sheet and flip urgent rows manually after upgrading, so the same tab doubles as your patch log for client audits and security reviews.

The team that also worries about its AI stack

n8n instances rarely run alone — they sit next to LangChain apps, vector databases, and custom APIs. The Fetch n8n Advisories node queries the advisory database with an affects parameter, so watching more than n8n is a one-line change: point it at langchain or drop the filter and post-filter by ecosystem in the Filter New Advisories code node. Practical tip: if medium-severity issues keep you up at night too, edit the Compute Urgency node to include moderate in the severity list, and mediums affecting your version will fire instant alerts just like the criticals.

The solo self-hoster who wants Slack too

Not everyone lives in Telegram. The urgent branch is a simple IF gate, so adding Slack is a matter of cloning the Telegram urgent node and wiring an n8n Slack node to the same TRUE branch. Both branches merge back into the daily digest builder either way. Practical tip: keep the Telegram all-clear message even after adding Slack — a daily "nothing new" note is how you know the scan actually ran, which is the whole point of a watchdog.

← All templates