n8nCreativeWritingAI score · 84/100AI-assisted edit · no obvious prompt-injection riskn8n.io

Auto-review n8n workflow JSON for risks and best practices with Groq

Webhook receives exported n8n workflow JSON → code node static validation → Groq AI risk assessment → returns structured JSON report

ExperiencedStepsWorkflowPrompt
Who
Automation engineers or platform admins who need to batch-review n8n workflow quality and security risks
You get
Generate a structured assessment report with metrics, risk items, business impact, and fix recommendations for any n8n workflow JSON
You need
n8n

Constraints

Prerequisites: accessible n8n instance (self-hosted or cloud), Groq API key (configured as groqApi credential in the Groq Chat Model node). Caller must be able to POST to the webhook URL. Cost: Groq API usage billed by token; see console.groq.com for rates.

What they did

Template author kanishka-shrivastava built an n8n webhook service that receives external POST requests containing n8n workflow JSON, runs static validation via a Code node (checking orphan nodes, dead ends, missing error handling, placeholder credentials, deprecated nodes, unvalidated code nodes, and missing documentation), then routes valid results to an AI Agent calling Groq llama-3.3-70b-versatile for risk explanation and best-practice recommendations, finally returning unified JSON through a structured output parser.

How it went

The author reports the template can identify seven issue types—orphan nodes, dead-end nodes, missing error handling, placeholder credentials, deprecated nodes, code nodes without input validation, and missing documentation—and produces an assessment report including node count, connection count, trigger count, and AI node count metrics (author_report).

Worth knowing

The validation code excludes LangChain sub-nodes (lm, outputParser, memory, tool, embeddings, vectorStore, document) from orphan/dead-end detection because they connect to the Agent via side channels rather than main connections. If you modify validation logic, sync the Risk Assessment Agent input variables accordingly. The Structured Output Parser schema can be customized to match internal review standards. The default webhook path is workflow; change it for multi-instance deployments to avoid conflicts.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Groq Analysis Chat Model node: connect groqApi credentials.

Configuration to replace

  • Source template is n8n public workflow #16660 (~13 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-25

Steps

  1. Configure Groq credentials and webhook trigger

    Open the template workflow in n8n. Select the Groq Analysis Chat Model node and add a groqApi credential with your API key from console.groq.com. Then select the When Workflow Received (Webhook) node, confirm HTTP Method is POST and Response Mode is responseNode; the default path is workflow—update the caller config if you change it.

  2. Import and activate the workflow

    Import the full workflow.json into your n8n instance (or install directly from the n8n template library). Verify node connections: Webhook → Validate Workflow Data → If Validation Succeeded → true branch to Risk Assessment Agent, false branch to Generate Error Response → both routes finally merge into Send Analysis Response. Click Activate when intact.

    Setup guidance · Editorial suggestion。Setup assistant starter prompt; used to verify import completeness and credential configuration

    Please set up the n8n workflow review service using the provided workflow JSON: after import, verify the webhook path, validation code, AI Agent prompt, and structured output parser schema are intact. Test Groq credential connectivity before activating.
  3. Send workflow JSON to the webhook

    Copy the activated webhook URL from n8n. In your caller (e.g., curl, Postman, or another workflow), construct a POST request with a JSON body containing a top-level workflow field whose value is the exported n8n workflow JSON. Example: {"workflow": {"name": "...", "nodes": [...], "connections": {...}}}.

  4. Review the AI risk assessment result

    After successful validation, the Risk Assessment Agent invokes Groq (llama-3.3-70b-versatile) to analyze metrics and findings, formats through Parse Structured Output, and returns JSON. The response includes score, security, performance, cost, complexity, suggestions. If validation fails, it returns {"success": false, "error": "..."}.

    Execution prompt · Source text。Risk Assessment Agent node text parameter (n8n expression, starts with =)

    =You are a Senior n8n Automation Engineer.
    
    The workflow has already been analyzed.
    
    DO NOT invent issues.
    
    Use the findings below.
    
    Explain
    
    • Why it matters
    
    • Risk
    
    • Business impact
    
    • Best practice
    
    Return ONLY JSON.
    
    Metrics
    
    {{ JSON.stringify($json.metrics,null,2) }}
    
    Findings
    
    {{ JSON.stringify($json.findings,null,2) }}

Prompt you can copy

Setup guidance · Editorial suggestion。Setup assistant starter prompt; used to verify import completeness and credential configuration

This block is the prompt. Ads are never placed here.

Please set up the n8n workflow review service using the provided workflow JSON: after import, verify the webhook path, validation code, AI Agent prompt, and structured output parser schema are intact. Test Groq credential connectivity before activating.

This prompt is for setup-phase verification only, not a runtime node instruction.

Source

Review workflow JSON for risks and best practices with Groq (Llama 3.3) · kanishka-shrivastava · n8n.io · 2026-06-27

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related