Automated GitHub Release Notes Generation using AI Comparison - n8n Workflow

Automate the creation of structured GitHub release notes and changelogs using an n8n workflow. Compares version tags and uses AI agents to summarize code differences.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Software Development Teams

  • DevOps Engineers looking for release automation

  • Technical Writers needing automated documentation drafts

  • Users deploying custom n8n workflow solutions

  • Anyone seeking to generate accurate, categorized changelogs quickly.

Overview

This sophisticated n8n workflow solves the crucial, yet often manual, problem of compiling accurate changelogs after a software release. By leveraging the GitHub API and integrating advanced large language models (via the OpenRouter/LangChain n8n node), this n8n template automatically tracks the differences between two published Git tags. When a new release event is detected by the n8n trigger, the workflow efficiently fetches detailed commits and files changed. This raw data is fed into a series of AI agents which categorize the changes into features, bug fixes, and improvements. The final output is a clean, SEO-friendly, markdown-formatted release note, ready for immediate publication, drastically accelerating the documentation pipeline for any development team relying on n8n.

How it Works


  1. Triggering the n8n Workflow: The automation starts with the Github Trigger n8n trigger, configured to listen specifically for new release events within the specified GitHub repository.

  2. Identifying Release Details: A combination of Code and Set n8n node steps (Fetch the latest release body and Set Repo & Owner) extracts the repository owner, name, and the current tag from the webhook payload, standardizing variables for downstream nodes.

  3. Fetching Comparison Tags: A subsequent Get the last two releases GitHub n8n node fetches the recent release history. The Get the last two release tags Code n8n node then executes critical logic to correctly identify the currentTag and the previousTag necessary for comparison.

  4. Executing the Diff: An HTTP Request n8n node calls the vital GitHub Compare API endpoint (using the URL .../compare/{{previousTag}}...{{currentTag}}). This API request fetches the complete detailed diff, including commit messages and file patches.

  5. Pre-processing Data: The Confirm diff Code n8n node processes this complex JSON diff payload. It simplifies commit and file data, determines if actual changes occurred (hasChanges), and creates a clean JSON structure optimized for AI consumption.

  6. AI Summary and Generation: The cleaned diff is passed to the AI stages:

The Summarize release differences LangChain Agent n8n node (using an OpenRouter model) categorizes the technical changes into high-level groups (e.g., New features, Bug fixes).
The Generate latest release notes LangChain Agent n8n node takes this summarized data and generates the final, polished Markdown release notes, strictly adhering to the output format defined in the n8n node prompt. This robust n8n workflow ensures high-quality content generation.

Installation Guide


  1. Import the n8n Template: Copy the provided JSON and import it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Set up GitHub Credentials: You must configure a GitHub OAuth2 credential. This credential needs read access to your repository releases and must be linked to the Github Trigger, the Get the last two releases GitHub n8n node, and the Fetch release details from last two releases HTTP Request n8n node.

  3. Set up OpenRouter Credentials: Configure an OpenRouter API key credential and link it to the OpenRouter Chat Model and OpenRouter Chat Model1 n8n node instances, ensuring the AI can process the requests.

  4. Configure the Trigger: In the Github Trigger n8n trigger, specify the correct Repository Owner and Repository Name for the project you wish to automate.

  5. Activate and Test: Save the n8n workflow, activate it, and trigger a new release in your target GitHub repository to test the end-to-end automation.

Node Details

Github Trigger (n8n trigger): Sets up a webhook to initiate the n8n workflow specifically when a new release event is published in the configured GitHub repository.
Get the last two releases (GitHub n8n node): Executes a release: getAll operation, limited to the two most recent releases, essential for establishing the comparison window.
Get the last two release tags (Code n8n node): Contains custom JavaScript logic to safely extract and validate the currentTag and previousTag from the fetched releases.
Fetch release details from last two releases (HTTP Request n8n node): Performs the critical API call to GitHub's Compare endpoint, using dynamic expressions to include the owner, repo, and the two comparison tags, retrieving the full code diff.
Confirm diff (Code n8n node): Cleans and simplifies the large GitHub diff payload, restructuring the commit and file change data into a format optimally consumable by the subsequent AI LangChain n8n node.
Summarize release differences (LangChain Agent n8n node): Uses a powerful prompt and the OpenRouter connection to analyze the structured diff data, grouping technical changes into user-friendly summary sections (e.g., Features, Bug fixes).


  • Generate latest release notes (LangChain Agent n8n node): The final AI n8n node, responsible for generating the complete, properly formatted Markdown release notes using the categorized summary and specific version tags.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Developer Relations Engineer with over a decade of experience in the software industry and a drive to automate tasks that otherwise often result in miscommunication.

Featured*