Convert GitHub commits into review-ready pull requests with Google Gemini
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs when an MCP client calls one of its tools (plus 1 other trigger). Along the way it connects Google Gemini Chat Model and GitHub.
How it runs
Trigger: When an MCP client calls one of its tools (plus 1 other trigger).
- Extract Repo & Branch Context (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; output parser: Structured Output Parser
- Repo or Branch Validation (HTTP Request): calls an HTTP API
- Check for Repository error (If): checks a condition and branches into true / false
- Prepare PR Payload (Edit Fields (Set)): sets 5 fields: owner, repo, branch_name…
- Build Error Response (Edit Fields (Set)): sets 1 field: result
- Aggregate Commit Messages (Summarize): summarizes / groups the items
- Generate PR Title & Description (Basic LLM Chain): sends a prompt to an LLM, with model: LLM PR Writer Model
- Create Pull Request (HTTP Request): calls an HTTP API (POST)
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 (12)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - MCP Server Trigger
@n8n/n8n-nodes-langchain.mcpTrigger - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Github Tool
n8n-nodes-base.githubTool - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Summarize
n8n-nodes-base.summarize
From the author
Description Categories Developer Automation, AI Agents, GitHub Automation, DevOps Productivity --- Build an AI-Driven GitHub Pull Request Automation with n8n + MCP This workflow creates an AI-powered GitHub automation that turns raw commit history into a…