Skip to content
agentusehub

Review GitHub pull requests automatically

An n8n AI agent triggers on each new PR, fetches diffs, calls an LLM for a review, and posts comments and labels back on the PR.

Time saved
Not reported
Setup time
Not reported
Running cost
Not reported
Cost range
Not reported

Use case overview

An n8n AI agent triggers on each new PR, fetches diffs, calls an LLM for a review, and posts comments and labels back on the PR.

Reported experience

  1. What they did

    A GitHub Trigger node in n8n fires when a PR is opened. An HTTP Request node calls GitHub's pull request files API, and a Code node merges each filename and diff into a prompt that casts the model as a senior iOS developer. The agent runs on an OpenAI chat model and reads a Google Sheet of team Swift best practices as a tool. GitHub nodes then post the comment and add a ReviewedByAI label.

  2. How it went

    In a test PR adding iota cryptocurrency support, the agent posted a comment and applied the label. The comment was one general comment, not line-level. Reviews were often too verbose and could miss the core problems.

  3. Worth knowing

    Validate each node's output as you build it. Inline comments would need a loop over each file's diff and line numbers, which the author lists as a next step and did not build.

Example prompts

Try with n8n
Build an n8n workflow triggered when a new pull request opens in my GitHub repo [owner/repo]. It should fetch the diff, ask an AI model to review it for bugs, readability and missing tests, then post the review as a comment and add a label such as [label names]. You're done when a test PR gets a useful review comment; pause and show me the comment and label before anything is posted to GitHub.
Sales · Beginner
  1. Form submit
  2. Fetch company site
  3. Claude scores fit

Auto-qualify inbound leads before a rep sees them

Score every demo request against your ICP, update HubSpot and ping the right rep in Slack within a minute of the form submit.

n8n · Claude · HubSpot · Slack
Customer Support · Intermediate
  1. New ticket webhook
  2. Claude classifies
  3. Draft from help docs

Triage support tickets and draft first replies

Every new Zendesk ticket gets a category, priority and sentiment tag plus a draft reply in an internal note before an agent opens it.

Zendesk · n8n · Claude
Content · Advanced
  1. Monthly schedule
  2. Find declining posts
  3. Research changes

Refresh blog posts that are losing search traffic

Each month, find posts whose search clicks dropped, research what changed with Perplexity, and get a Claude-written refresh brief for each one.

n8n · Perplexity · Claude · Google Sheets