Review GitHub PR security with DeepSeek and Gmail alerts
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs on Github events (pull request). Along the way it connects GitHub, DeepSeek Chat Model and Gmail.
How it runs
Trigger: On Github events (pull request).
- 2. Filter: Opened/Synchronize Only (If): checks a condition and branches into true / false
- 3. Fetch PR Diff (GitHub): get diff (pull request)
- 4. Format Diff for AI (Code): runs custom JavaScript code
- 5. AI Security Code Review (AI Agent): runs an AI agent, with model: AI Model (DeepSeek); output parser: Output Schema (Verdict, Issues, Summary)
- 6. Post Commit Status Check (HTTP Request): calls an HTTP API (POST)
- 7. Post Summary Comment on PR (GitHub): create comment
- 8. Check: Any Issues Found (If): checks a condition and branches into true / false
- 9. Map Issues to Diff Positions (Code): runs custom JavaScript code
- 11. Route by Verdict (Switch): routes items into 3 branches
- 10. Post Inline Comments on Flagged Lines (HTTP Request): calls an HTTP API (POST)
…plus 3 more steps. See the full node list below.
Services it uses
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 (10)
- Github Trigger
n8n-nodes-base.githubTrigger - If
n8n-nodes-base.if - GitHub
n8n-nodes-base.github - AI Agent
@n8n/n8n-nodes-langchain.agent - DeepSeek Chat Model
@n8n/n8n-nodes-langchain.lmChatDeepSeek - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code
From the author
Quick overview Most teams don't have a security reviewer on every PR. This workflow gives you one: it reads the diff, catches hardcoded secrets and risky code, posts a real GitHub status check, comments inline on the exact flagged line, and emails the…