Auto-Scrape EU News and Send AI-Filtered Sustainability Daily Newsletter with n8n
Input: EU news webpage; Processing: scheduled scrape → HTML parse & split → date/type filter → GPT classify & flag → sheet log → read flagged rows → HTML email; Output: daily filtered sustainability news email
- Who
- Business owners, sustainability consultants, or marketing operators who need to automatically track EU sustainability developments and send daily digests to subscribers
- You get
- Automatically fetch EU news every morning, filter for sustainability relevance via AI, log results to Google Sheets, then read flagged rows to generate a styled HTML email to a mailing list
- You need
- n8n · google-sheets · gmail
Constraints
Prerequisites: n8n instance (v1.85.4 or compatible), Google Sheets API credentials, Gmail OAuth credentials, OpenAI API key. Costs depend on OpenAI token usage and n8n hosting. If the EU news site changes its HTML structure, the parsing nodes may need reconfiguration. The workflow has 21 nodes; import workflow.json and verify connections against sticky notes.
What they did
Author Samir Saci (founder of LogiGreen Consulting) created this n8n template to automatically scrape articles from the EU Commission news site every morning, filter them for sustainability relevance using an OpenAI GPT model, store results in Google Sheets, then read flagged articles to generate an HTML email sent to subscribers to raise awareness and promote his consulting business.
How it went
The author reports this workflow enables daily automated news filtering and email delivery, helping him track updates related to climate action, green transition, and circular economy while promoting his services. (author_report)
Worth knowing
1. This site has not tested the workflow; reproduction=not_tested. 2. If the EU news site changes its HTML structure, the CSS selectors may break and require manual updating. 3. The If node's date filter uses a default 5-day offset; adjust to your needs. 4. The Gmail node's default recipient is [email protected] and must be replaced with real addresses. 5. The email content source is Get Sustainability News reading Google Sheets rows where sustainability=true, not directly from the day's scrape; if the sheet is empty the email will be empty. 6. The author suggests customizing the system prompt to adjust how 'sustainability' is classified. 7. The template was built on n8n 1.85.4; verify compatibility with newer versions. 8. The workflow contains 21 nodes; import workflow.json and verify connections against sticky notes.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- After import, connect your own credentials on auth-required nodes; author secrets are not included.
Configuration to replace
- Source template is n8n public workflow #3684 (~21 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Configure the schedule trigger
Add a Schedule Trigger node in n8n and set it to trigger at 08:30 every morning. Adjust timezone and schedule to your needs.
Scrape and parse the EU news page
Use an HTTP Request node to fetch https://commission.europa.eu/news-and-media/news_en, then use two HTML nodes: 1) Extract Articles Blocks uses CSS selector div.ecl-content-item-block__item to extract article HTML blocks (returnArray=true, returnValue=html); 2) Parse Article Blocks extracts type, date, title, link (href attribute), description, image (src attribute), and read_time from each block (see workflow.json for exact CSS selectors). Then use Split Out by Article Block to split the articles array into individual items for downstream processing.
Filter articles by date and type
Use an If node to keep only articles whose date matches '5 days before today' and whose type equals News article. The date expression is {{ $now.minus(5,'day').day }} {{ $now.minus(5,'day').monthLong }} {{ $now.minus(5,'day').year }}; adjust the day offset as needed. Items passing the filter enter the Loop Over Articles node for batch processing.
Classify sustainability relevance with an AI Agent
Loop Over Articles feeds single articles into the AI Agent node. The agent connects to an OpenAI Chat Model (default gpt-4o-mini) and a Structured Output Parser to constrain output format. It classifies each article based on title and description for sustainability relevance.
Execution prompt · Source text。AI Agent node text input field (user prompt)
=Title: {{$json.title}} Description: {{$json.description}} Is this article about sustainability? Return only: true or falseExecution prompt · Source text。AI Agent node options.systemMessage field
=You are a classification assistant. Your role is to analyze the title and description of an article and determine if it is related to sustainability. You must only return {"answer": true} if the article is clearly related to sustainability (e.g., environmental protection, renewable energy, sustainable development, climate action, green economy, etc.). If it is not clearly related, return {"answer": false}. If the description is empty or missing, rely only on the title. Your response must be only one of the two JSON options: {"answer": true} or {"answer": false}. Do not provide explanations.Flag and merge results
The AI Agent output passes through Sustainability Flag (Set node, taking {{ $json.output.answer }}) to set the sustainability field, then merges with original article data via Merge Article + Flag (combineBySql mode) to form complete records.
Log filtered results to Google Sheets
Use Record Results (Google Sheets node, Append mode) to add sustainability=true articles to a specified sheet. Map fields: sustainability, type, date, title, link, description, image, read_time. Configure Google Sheets API credentials and select the target file and worksheet in advance.
Read flagged articles and generate HTML email
Parallel branch: the Trigger also fires Get Sustainability News (Google Sheets node, read mode, filter sustainability = true) to fetch all historically flagged articles. These feed into Generate Email HTML (Code node) to aggregate an HTML email with title, summary, image, date, and reading time. Finally, Send to your mailing list (Gmail node) delivers the email. Gmail OAuth credentials must be preconfigured; the default sendTo is [email protected] and must be replaced with actual recipients.
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
You are an n8n workflow setup assistant. The user wants to replicate the 'AI-filtered EU sustainability news daily newsletter' template. First confirm they have: an n8n instance, Google Sheets API credentials, Gmail OAuth credentials, and an OpenAI API key. Then assist configuration in this order: 1) import workflow.json; 2) check and update the Schedule Trigger time; 3) verify the HTTP Request target URL is accessible; 4) confirm model and credentials in the AI Agent node; 5) select the file and map fields in the Record Results node; 6) confirm read filter in the Get Sustainability News node; 7) replace the recipient address in the Gmail node and test send. Do not automatically perform any action that could send real emails or write user data.
Before building, confirm all API credentials are configured, and suggest running once with a test recipient address.
Source
🗞️ AI-powered sustainability newsletter for marketing with Gmail, GPT-4o · samirsaci · n8n.io · 2025-04-24
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.