Review GitHub pull requests with AI and log results to PostgreSQL and Slack
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This workflow has 10 nodes and runs on Github events (pull request). Along the way it connects GitHub and Postgres.
How it runs
Trigger: On Github events (pull request).
- Fetch Changed Files in PR (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
- Extract Code Diffs (Code): runs custom JavaScript code
- Score Review & Categorize Issues (Code): runs custom JavaScript code
- Route by Review Severity (Switch): routes items into 2 branches
- Post Review to GitHub PR (HTTP Request): calls an HTTP API (POST)
- Store Review Results in PostgreSQL (Postgres): uses Postgres
- Send Summary to Slack (HTTP Request): calls an HTTP API (POST)
- Log Review Completion (Code): runs custom JavaScript code
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 (6)
- Github Trigger
n8n-nodes-base.githubTrigger - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Postgres
n8n-nodes-base.postgres
From the author
Automatically detects new GitHub Pull Requests, analyzes changed code with AI, generates detailed review comments (quality, security, performance, best practices), posts suggestions back to the PR, stores results in a database, and sends notifications. Good…