This commit is contained in:
nusquama
2025-11-12 12:50:24 +01:00
parent 6f4226c630
commit da57a99ecc
@@ -0,0 +1,318 @@
AI-Powered n8n Release Notes Summary Notifications via Gmail with GPT-5-Mini
https://n8nworkflows.xyz/workflows/ai-powered-n8n-release-notes-summary-notifications-via-gmail-with-gpt-5-mini-10236
# AI-Powered n8n Release Notes Summary Notifications via Gmail with GPT-5-Mini
---
## 1. Workflow Overview
This workflow automates the process of fetching, summarizing, formatting, and emailing the latest n8n release notes to a specified Gmail address on a scheduled basis. It is designed for users who want to stay informed about important updates, features, and bug fixes in n8n without manually checking GitHub releases.
**Target Use Cases:**
- Automatically deliver concise release summaries to team members or stakeholders.
- Reduce manual effort in monitoring n8n updates.
- Leverage AI to extract and simplify release notes for quick understanding.
**Logical Blocks:**
- **1.1 Scheduled Trigger:** Periodically initiates the workflow based on configured timing.
- **1.2 Release Notes Retrieval & Parsing:** Fetches the latest n8n release notes from GitHub, extracts relevant HTML sections, filters releases within the time window, and parses release details including features and bug fixes.
- **1.3 AI Summarization:** Uses OpenAIs GPT-5-Mini model to generate concise summaries of important release features and bug fixes.
- **1.4 Data Formatting:** Prepares structured data for HTML email content.
- **1.5 HTML Email Template Generation:** Builds a styled HTML email presenting the release information attractively.
- **1.6 Email Dispatch:** Sends the formatted summary email via Gmail using OAuth2 credentials.
---
## 2. Block-by-Block Analysis
### 2.1 Scheduled Trigger
**Overview:**
Initiates the workflow automatically at a specified hour daily (default is 08:00). This triggers the entire process of fetching and notifying about new n8n releases.
**Nodes Involved:**
- Schedule Trigger
**Node Details:**
- **Schedule Trigger**
- Type: Trigger node
- Configuration: Runs once every day at 08:00 by default. Interval configurable via hours, days, minutes, etc.
- Key Expressions: None (static schedule)
- Input: None (trigger)
- Output: Starts the workflow by connecting to HTTP Request node
- Edge Cases: Misconfiguration may cause no trigger or multiple triggers; time zone considerations apply.
- Notes: Allows frequency adjustment to control notification timing.
### 2.2 Release Notes Retrieval & Parsing
**Overview:**
Fetches the raw HTML page of n8ns GitHub releases, extracts all release sections, filters releases based on the configured time window from the trigger, and parses out release version, date, link, bug fixes, and features.
**Nodes Involved:**
- Get n8n release notes (HTTP Request)
- Extract HTML for updates (HTML Extract)
- Format Data and Filter based on Trigger (Code)
**Node Details:**
- **Get n8n release notes**
- Type: HTTP Request
- Configuration: GET request to https://github.com/n8n-io/n8n/releases to retrieve the release page HTML.
- Input: Trigger from Schedule Trigger
- Output: Raw HTML content of releases page
- Edge Cases: HTTP failures, rate limiting, or changes in GitHubs HTML structure can break parsing.
- **Extract HTML for updates**
- Type: HTML Extract
- Configuration: Extracts all `<section>` elements from the HTML, returns them as an array of HTML strings. Each section corresponds to a release.
- Input: Raw HTML from HTTP Request
- Output: Array of section HTML snippets
- Edge Cases: Changes in GitHub page markup may cause incorrect extraction or empty data.
- **Format Data and Filter based on Trigger**
- Type: Code (JavaScript)
- Configuration:
- Uses cheerio to parse each sections HTML.
- Reads the release date from `<relative-time datetime="">` tag.
- Filters releases by comparing release date to current time using a dynamic window based on the schedule trigger interval (e.g., last 24 hours).
- Extracts release version (from first h2), release link (GitHub URL), bug fixes, and features from the markdown structure within the release section.
- Returns an array of JSON objects with parsed data.
- Key Expressions: Uses `DateTime` from luxon for date parsing and comparison.
- Input: Array of HTML sections
- Output: Filtered, structured release data
- Edge Cases:
- Missing or malformed datetime attribute.
- Release sections without expected headings or lists.
- Timezone discrepancies.
- Changes in GitHub HTML could break selectors.
- Notes: Dynamic time window adapts to schedule frequency.
### 2.3 AI Summarization
**Overview:**
Uses OpenAI GPT-5-Mini to generate a concise, simplified summary of important release features and bug fixes extracted in the previous step.
**Nodes Involved:**
- OpenAI Chat Model
- Structured Output Parser
- Summarize n8n Update Data
**Node Details:**
- **OpenAI Chat Model**
- Type: AI Language Model node (LangChain integration)
- Configuration: Uses GPT-5-Mini model; no additional options set.
- Input: Release data JSON from filter node.
- Output: Raw AI response text.
- Edge Cases: API key missing or invalid; rate limits; model downtime.
- **Structured Output Parser**
- Type: AI Output Parser
- Configuration: Parses AI output to JSON with schema including arrays `releaseBugFixes` and `releaseFeatures`.
- Input: OpenAI response
- Output: Parsed structured JSON release summaries
- Edge Cases: AI output not matching schema; parsing errors.
- **Summarize n8n Update Data**
- Type: LangChain Agent (advanced AI node)
- Configuration:
- Prompt instructs to summarize important bug fixes and features in simple language, focusing on important releases only.
- Max iterations set to 3 to refine summary.
- Uses structured output parser.
- Input: Parsed release data from previous node or raw structured data.
- Output: Summarized release notes JSON.
- Edge Cases: Oversummarization or missing critical details; prompt failure.
### 2.4 Data Formatting
**Overview:**
Prepares the final structured data by explicitly mapping fields from the AI summary output to expected variables for email generation.
**Nodes Involved:**
- Format Data (Set node)
**Node Details:**
- **Format Data**
- Type: Set node
- Configuration: Assigns releaseVersion, releaseDate, releaseLink, and nested arrays output.releaseFeatures and output.releaseBugFixes from previous node outputs.
- Input: Summarized JSON data
- Output: Clean structured data for email template
- Edge Cases: Empty or missing fields if AI output incomplete.
### 2.5 HTML Email Template Generation
**Overview:**
Generates a styled, responsive HTML email body that clearly presents the release version, date, link, features, and bug fixes for each release.
**Nodes Involved:**
- Generate HTML template (Code node)
**Node Details:**
- **Generate HTML template**
- Type: Code (JavaScript)
- Configuration:
- Reads all releases from input.
- Builds a complete HTML document with inline CSS styling for readability and branding colors.
- Iterates each release to add version, date, GitHub link, feature list, and bug fix list with appropriate icons and fallback text.
- Returns JSON with a single property `html` containing the full email body.
- Input: Structured release data array
- Output: JSON with HTML email body
- Edge Cases: Empty releases input results in minimal content; malformed HTML if input data contains unexpected characters.
### 2.6 Email Dispatch
**Overview:**
Sends the generated HTML email to a configured Gmail recipient, with a subject line containing the current date.
**Nodes Involved:**
- Send a message (Gmail node)
**Node Details:**
- **Send a message**
- Type: Gmail node (OAuth2)
- Configuration:
- Sends email with subject "n8n Updates - [Current Date]" (date formatted as locale date string).
- Email body is the generated HTML.
- Option `appendAttribution` disabled (no footer appended).
- Recipient email address must be set in node parameters (not present in shared JSON).
- Credentials: Requires a valid Gmail OAuth2 credential connected to n8n.
- Input: HTML email from previous node
- Output: Email send response
- Edge Cases: Authentication failure, quota exceeded, invalid recipient address.
---
## 3. Summary Table
| Node Name | Node Type | Functional Role | Input Node(s) | Output Node(s) | Sticky Note |
|---------------------------------|---------------------------------|-----------------------------------|----------------------------------|--------------------------------|----------------------------------------------------------------------------------|
| Schedule Trigger | Trigger | Initiates workflow on schedule | None | Get n8n release notes | Set your preferred frequency. |
| Get n8n release notes | HTTP Request | Fetches GitHub n8n releases page | Schedule Trigger | Extract HTML for updates | ### 2. Get n8n release notes and filter - Get all release notes - Filters releases based on timeframe - Formats data - No configuration needed - it's automatic! |
| Extract HTML for updates | HTML Extract | Extracts release sections HTML | Get n8n release notes | Format Data and Filter based on Trigger | |
| Format Data and Filter based on Trigger | Code | Parses, filters and structures release data | Extract HTML for updates | Summarize n8n Update Data | |
| OpenAI Chat Model | AI Language Model (LangChain) | Calls GPT-5-Mini for summarization | Format Data and Filter based on Trigger | Summarize n8n Update Data | ### AI Summarization - OpenAI analyzes release notes and extracts: - Important bug fixes - New features - ⚠️Setup Required: Add your OpenAI API credentials here or connect a different LLM provider. |
| Structured Output Parser | AI Output Parser | Parses AI output to JSON | OpenAI Chat Model | Summarize n8n Update Data | |
| Summarize n8n Update Data | LangChain Agent | Generates summarized release notes | OpenAI Chat Model, Structured Output Parser | Format Data | |
| Format Data | Set | Maps summarized data for email | Summarize n8n Update Data | Generate HTML template | |
| Generate HTML template | Code | Builds styled HTML email content | Format Data | Send a message | ### Format for Email - Build an HTML template for email. |
| Send a message | Gmail | Sends email via Gmail | Generate HTML template | None | ### Send Email - Send via Gmail. - ⚠️ Setup Required: 1. Add Gmail credentials 2. Set recipient email address in the "To" field |
| Sticky Note | Sticky Note | Documentation and instructions | None | None | ## n8n Release Notifications Workflow - Stay updated with the latest n8n releases automatically! - Runs on a schedule (configurable) - Fetches latest release notes from n8n GitHub - Uses AI to summarize key features and bug fixes - Sends formatted email notifications via Gmail - Setup required: Schedule Trigger, OpenAI credentials, Gmail credentials, Recipient email |
| Sticky Note1 | Sticky Note | Frequency configuration tip | None | None | ### 1. Schedule Trigger - Set your preferred frequency. |
| Sticky Note2 | Sticky Note | Release notes retrieval summary | None | None | ### 2. Get n8n release notes and filter - Get all release notes - Filters releases based on timeframe - Formats data - No configuration needed - it's automatic! |
| Sticky Note3 | Sticky Note | AI summarization instructions | None | None | ### AI Summarization - OpenAI analyzes release notes and extracts: - Important bug fixes - New features - ⚠️Setup Required: Add your OpenAI API credentials here or connect a different LLM provider. |
| Sticky Note4 | Sticky Note | Email formatting instructions | None | None | ### Format for Email - Build an HTML template for email. |
| Sticky Note5 | Sticky Note | Email sending instructions | None | None | ### Send Email - Send via Gmail. - ⚠️ Setup Required: 1. Add Gmail credentials 2. Set recipient email address in the "To" field |
---
## 4. Reproducing the Workflow from Scratch
1. **Create Schedule Trigger node:**
- Type: Schedule Trigger
- Configure to run daily at 08:00 (adjust as needed).
- This node starts the workflow.
2. **Create HTTP Request node ("Get n8n release notes"):**
- Type: HTTP Request
- Method: GET
- URL: `https://github.com/n8n-io/n8n/releases`
- Connect input from Schedule Trigger.
3. **Create HTML Extract node ("Extract HTML for updates"):**
- Type: HTML Extract
- Operation: Extract HTML content
- Extraction values: CSS selector `section`, return array: true, return value: HTML
- Connect input from HTTP Request.
4. **Create Code node ("Format Data and Filter based on Trigger"):**
- Type: Code
- Language: JavaScript
- Paste the provided JS code that:
- Parses each `<section>` HTML using cheerio,
- Extracts release datetime, version, link, features, and bug fixes,
- Filters releases based on a dynamic time window from the schedule trigger configuration,
- Returns an array of structured release data.
- Connect input from HTML Extract node.
5. **Create OpenAI Chat Model node ("OpenAI Chat Model"):**
- Type: LangChain AI Language Model
- Model: `gpt-5-mini`
- Connect input from Code node.
- Set credentials: Add OpenAI API key or connect other LLM credentials.
6. **Create Structured Output Parser node ("Structured Output Parser"):**
- Type: LangChain AI Output Parser
- Configure JSON schema example to expect:
```json
{
"releaseBugFixes": [""],
"releaseFeatures": [""]
}
```
- Connect input from OpenAI Chat Model node.
7. **Create LangChain Agent node ("Summarize n8n Update Data"):**
- Type: LangChain Agent
- Prompt:
```
Give me a summary of the Release Bug Fixes and Release Features as a list of important releases. Include only the important ones, and summarize as much as possible. Use simple language.
{releaseBugFixes: {{ $json.releaseBugFixes }},
releaseFeatures: {{ $json.releaseFeatures }}
}
```
- Options: max iterations = 3
- Connect AI model input from both OpenAI Chat Model and Structured Output Parser nodes.
- Output connects to next formatting node.
8. **Create Set node ("Format Data"):**
- Type: Set
- Assign fields:
- `releaseVersion` from previous nodes `releaseVersion`
- `releaseDate` from `releaseDate`
- `releaseLink` from `releaseLink`
- `output.releaseFeatures` from `output.releaseFeatures`
- `output.releaseBugFixes` from `output.releaseBugFixes`
- Connect input from LangChain Agent node.
9. **Create Code node ("Generate HTML template"):**
- Type: Code
- Language: JavaScript
- Paste the provided code that generates a fully styled HTML email based on input data including release version, date, link, features, and bug fixes.
- Connect input from Set node.
10. **Create Gmail node ("Send a message"):**
- Type: Gmail
- Credentials: Add Gmail OAuth2 credentials
- Subject: `n8n Updates - {{ $now.format('DDD') }}`
- Message: Use expression `{{ $json.html }}` from HTML generator node output
- Disable Append Attribution (no footer)
- Set recipient email address in "To" field.
- Connect input from HTML template node.
11. **Add Sticky Notes for documentation:**
- Add notes describing each block and any setup requirements, such as credentials and schedule configuration.
12. **Test workflow:**
- Run manually or wait for scheduled trigger.
- Verify email received with correct formatting and content.
- Troubleshoot errors such as API limits, parsing failures, or auth issues.
---
## 5. General Notes & Resources
| Note Content | Context or Link |
|--------------|-----------------|
| Stay updated with the latest n8n releases automatically by scheduling this workflow to fetch, summarize, and email release notes. | Workflow purpose summary from main sticky note. |
| For AI summarization, an OpenAI API key or compatible LLM credentials must be configured. | Sticky Note3 and OpenAI node requirements. |
| Gmail OAuth2 credentials are required to send emails; ensure recipient email is properly set. | Sticky Note5 and Gmail node configuration. |
| Adjust the Schedule Trigger node to control notification frequency (daily recommended). | Sticky Note1 configuration tip. |
| The GitHub releases pages HTML structure may change, requiring updates to CSS selectors or parsing code. | Potential maintenance note based on parsing edge cases. |
| Workflow uses Luxon library for robust date/time handling and Cheerio for HTML parsing. | Code node dependencies and utilities. |
---
**Disclaimer:**
The provided text originates exclusively from an automated workflow created with n8n, an integration and automation tool. This process strictly respects current content policies and contains no illegal, offensive, or protected content. All processed data is legal and public.