Skip to main content

AI-Powered NPM Package Intelligence Agent

Workflow preview

Workflow preview
100%
AI-Powered NPM Package Intelligence Agent preview
Open on n8n.io

1. Workflow Overview

Before adding a new npm package as a dependency, you should know if it's actively maintained, widely used, and safe to build on. This workflow does that analysis automatically. Enter any package na...

Best for

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

Tools used

n8n-nodes-base.set, @mendable/n8n-nodes-firecrawl.firecrawltool, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.formtrigger, @mendable/n8n-nodes-firecrawl.firecrawl, n8n-nodes-base.merge, n8n-nodes-base.code

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
AI-Powered NPM Package Intelligence Agent
Workflow name
AI-Powered NPM Package Intelligence Agent

Before adding a new npm package as a dependency, you should know if it's actively maintained, widely used, and safe to build on. This workflow does that analysis automatically.

Enter any package name, and the agent uses Firecrawl to find the right npm and GitHub pages, pulls live stats from the GitHub and npm APIs, then runs an AI analysis to generate a risk score and a clear recommendation: Use, Consider, or Avoid.


What problem is it solving?

Adding an unmaintained or poorly-supported npm package can create long-term technical debt such as security vulnerabilities, broken updates, or abandoned dependencies, that are hard to replace later. But manually checking npm downloads, GitHub stars, open issues, last commit date, and license type across multiple pages takes time and is easy to skip.

This workflow makes due diligence effortless. In seconds, you get a structured report with all the signals that matter, plus an AI-generated recommendation you can act on immediately.


What this workflow does

  1. Triggers via a simple form — enter any npm package name
  2. Normalises the input for consistent processing
  3. Uses Firecrawl to dynamically discover the correct npm page and GitHub repository URL (avoiding hardcoded assumptions)
  4. Cleans and validates the discovered URLs — filters out noise, adds fallbacks if npm page isn't found
  5. Fetches real-time data via APIs:
  • GitHub API: stars, open issues, license, last commit date
  • npm API: weekly download count
  1. Computes health metrics: issue-to-star ratio, activity status (active vs stale), package validity
  2. Handles errors gracefully — returns a safe default and explanation if the package isn't found or APIs fail
  3. Runs an AI Analysis Engine with a structured output parser to generate:
  • Risk score: Low / Medium / High
  • Adoption and health insights
  • Final recommendation: Use / Consider / Avoid
  1. Sends a Slack report with the full analysis

Setup

  1. Connect Firecrawl credentials — used to discover npm and GitHub URLs
  2. Connect OpenAI credentials (or OpenRouter — both are wired in) — used for AI analysis and structured output
  3. Connect GitHub credentials — used for the GitHub API node to fetch repo stats
  4. Connect Slack credentials — set the channel where reports should be posted in the Slack nodes
  5. Run — open the form trigger URL, enter a package name, and the report will appear in Slack within seconds

How to customize this workflow to your needs

  • Change the output channel — swap the Slack nodes for email, a Notion database entry, or a webhook to your internal tooling
  • Switch AI providers — the workflow includes both OpenAI and OpenRouter nodes; use whichever you have access to and disable the other
  • Adjust the risk scoring logic — modify the Compute Health Metrics node to change what thresholds define Low / Medium / High risk
  • Add more data sources — extend the data collection phase with additional APIs (e.g. Snyk for security advisories, Bundlephobia for bundle size)
  • Batch mode — wrap the form trigger in a schedule and feed it a list of packages from a spreadsheet to audit your entire dependency list at once
  • Embed in CI — trigger the workflow via webhook from your CI pipeline to automatically flag risky new dependencies before they're merged

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 - Commit deatils

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

Block 2 - Github details

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

Block 3 - /search in Firecrawl

Type / Role
@mendable/n8n-nodes-firecrawl.firecrawlTool - firecrawlTool
Config choices
Version 1

Block 4 - /scrape in Firecrawl

Type / Role
@mendable/n8n-nodes-firecrawl.firecrawlTool - firecrawlTool
Config choices
Version 1

Block 5 - Sticky Note

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

Block 6 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 7 - Enter Package Name

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.5

Block 8 - Normalize Input

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

Block 9 - Search NPM URL

Type / Role
@mendable/n8n-nodes-firecrawl.firecrawl - firecrawl
Config choices
Version 1

Block 10 - Search GitHub Repo

Type / Role
@mendable/n8n-nodes-firecrawl.firecrawl - firecrawl
Config choices
Version 1

Block 11 - Merge Search Results

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 12 - Extract Clean URLs

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

Block 13 - Fetch GitHub Stats

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

Block 14 - Fetch Last Commit

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 15 - Fetch NPM Downloads

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 16 - Merge All Metrics

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 17 - Compute Health Metrics

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

Block 18 - Check Package Valid

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 19 - Package Not Found Handler

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

Block 20 - AI Analysis Engine

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 21 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 22 - Send Slack Report

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 23 - Send Slack Report_01

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 24 - Sticky Note1

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

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow AI-Powered NPM Package Intelligence Agent
Complexity advanced
Nodes 31
Categories Market Research, AI Summarization
Author Divyanshu Gupta
Published 30 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15410/15410.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 AI-Powered NPM Package Intelligence Agent do?

Before adding a new npm package as a dependency, you should know if it's actively maintained, widely used, and safe to build on. This workflow does that analysis automatically. Enter any package na...

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 Market Research, AI Summarization use case.