Review new npm dependencies in GitHub pull requests with OpenAI, OSV and Slack
Ready for 3.0What this workflow does
This AI workflow has 27 nodes and runs on Github events (pull request) (plus 1 other trigger). Along the way it connects GitHub, OpenAI Chat Model, HTTP Request and Slack. It also calls api.osv.dev over HTTP.
How it runs
Trigger: On Github events (pull request) (plus 1 other trigger).
- Only Opened or Updated PRs (Filter): keeps only the items that match a condition
- Alert Slack That the Check Failed (Slack): post (message)
- Set Review Settings (Edit Fields (Set)): sets 10 fields: trustedPackages, minWeeklyDownloads, minAgeDays…
- List Changed Files (HTTP Request): calls an HTTP API (GET)
- Keep package.json Files (Filter): keeps only the items that match a condition
- Read Added Dependencies (Edit Fields (Set)): sets 1 field: newDeps
- One Item per Dependency (Split Out): splits a list into separate items
- Drop Repeats (Remove Duplicates): removes duplicate items
- Skip Trusted Packages (Filter): keeps only the items that match a condition
- Review the Dependency (AI Agent): runs an AI agent, with model: Reviewer Model; 6 tools (Think, npm Package Info, Source Repository, npm Install Scripts…); output parser: Verdict Format
…plus 7 more steps. See the full node list below.
Services it uses
Other OpenAI + Slack templates (979) · Other GitHub + Slack templates (68) · Other GitHub + OpenAI templates (49)
HTTP calls to: api.osv.dev
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (15)
- Github Trigger
n8n-nodes-base.githubTrigger - Filter
n8n-nodes-base.filter - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Split Out
n8n-nodes-base.splitOut - Remove Duplicates
n8n-nodes-base.removeDuplicates - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Http Request Tool
n8n-nodes-base.httpRequestTool - Think Tool
@n8n/n8n-nodes-langchain.toolThink - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Aggregate
n8n-nodes-base.aggregate - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Error Trigger
n8n-nodes-base.errorTrigger
From the author
Quick overview This workflow monitors GitHub pull requests for new npm dependencies, checks each added package using OpenAI plus npm, OSV, and GitHub metadata, and reports results back to the PR and to Slack when a dependency is blocked. How it works 1.…