← All N8N workflows
AI & researchCodeHtmlHTTP RequestItem ListsMerge

News Extraction

Configured with Html, HTTP Request, Item Lists, Noco Db, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TransformExtract the HTML withthe right css classHtmlAI & modelsSummaryOpen AiAI & modelsKeywordsOpen AiTransformRename keywordsEdit FieldsTransformRename SummaryEdit FieldsTransformMergeMergeTransformExtract dateHtmlCodeSelect posts of last 7daysCodeTransformMerge date & linksMergeWeb / APIHTTP Request1HTTP RequestTransformMerge Content with Date& LinkMergeTransformExtract individualpostsHtmlTransformMerge ChatGPT outputwith Date & LinkMergeWeb / APIRetrieve the web pagefor further processsingHTTP RequestTriggerSchedule Trigger eachweekSchedule TriggerData storeNocoDB news databaseNoco DbTransformCreate single linkitemsItem ListsTransformCreate single dateitemsItem Lists

Node categories in this workflow

  • Transform
  • AI & models
  • Code
  • Web / API
  • Trigger
  • Data store

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Extract the HTML with the right css classTransformHtmlextractHtmlContent
SummaryAI & modelsOpen Aichat
KeywordsAI & modelsOpen Aichat
Rename keywordsTransformEdit FieldsSee node parameters
Rename SummaryTransformEdit FieldsSee node parameters
MergeTransformMergeSee node parameters
Extract dateTransformHtmlextractHtmlContent
Select posts of last 7 daysCodeCodeSee node parameters
Merge date & linksTransformMergeSee node parameters
HTTP Request1Web / APIHTTP RequestSee node parameters
Merge Content with Date & LinkTransformMergeSee node parameters
Extract individual postsTransformHtmlextractHtmlContent
Merge ChatGPT output with Date & LinkTransformMergeSee node parameters
Retrieve the web page for further processsingWeb / APIHTTP RequestSee node parameters
Schedule Trigger each weekTriggerSchedule TriggerSee node parameters
NocoDB news databaseData storeNoco Dbcreate
Create single link itemsTransformItem ListsSee node parameters
Create single date itemsTransformItem ListsSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • nocoDbApiToken
  • openAiApi

Workflow notes

Sticky Note

Select only the newest news: todays date going back xy days

Sticky Note1

Extracting the individual links of the press release page in order to retrieve the individual posts on their respective url

Sticky Note2

Extracting the dates of the posts of the press release page. The right CSS selector has to be chosen. More info on datagrab.io

Scraping posts of a news site without RSS feed

Scraping posts of a news site without RSS feed

The News Site from Colt, a telecom company, does not offer an RSS feed, therefore web scraping is the choice to extract and process the news.

The goal is to get only the newest posts, a summary of each post and their respective (technical) keywords.

Note that the news site offers the links to each news post, but not the individual news. We collect first the links and dates of each post before extracting the newest ones.

The result is sent to a SQL database, in this case a NocoDB database.

This process happens each week thru a cron job.

Requirements:

  • Basic understanding of CSS selectors and how to get them via browser (usually: right click → inspect)
  • ChatGPT API account - normal account is not sufficient
  • A NocoDB database - of course you may choose any type of output target

Assumptions:

  • CSS selectors work on the news site
  • The post has a date with own CSS selector - meaning date is not part of the news content

"Warnings"

  • Not every site likes to be scraped, especially not in high frequency
  • Each website is structured in different ways, the workflow may then need several adaptations.

Happy about any suggestion to improve. You may contact me on Mastodon: https://bonn.social/@askans

Sticky Note4

Weekly cron job

Sticky Note5

The html of the news site is being retrieved: https://www.colt.net/resources/type/news/

Sticky Note6

As the extraction are returned as arrays, they transformed into individual JSON items to enable looping with other nodes

Sticky Note7

The links of the individual posts and the dates of the posts

Sticky Note9

Get the html of each individual newest post

Sticky Note10

Extracting the title & content (text) of each individual news post with the right CSS selector

Sticky Note11

Merge link to url, date with content (text) and title of each news psot

Sticky Note12

Create a summary of each news post with ChatGPT. You need a ChatGPT API account for this

Sticky Note13

Get the 3 keywords of each news post

Sticky Note14

Just a renaming of data fields and eliminating unnecessary ones

Sticky Note15

Merge summary and keywords of each news post

Sticky Note16

Add title, link and date to summary and keywords of each news post

News summaries and keywords → database

News summaries and keywords → database

NocoDB is an SQL database, here we store the news summaries and keywords for further processing. Any other output target can be chosen here, e.g. e-mail, Excel etc.

You need first have that database structured before appending the news summaries and additional fields. The you can shape this node.

Some fields may be edited in the database itself (e.g. relevance of the news to you) and may be filled therefore with a default value or not at all

News Extraction

News Extraction

Purpose and structure

This folder contains the News Extraction workflow. Its executable nodes use code, html, httpRequest, itemLists, merge, nocoDb, openAi, scheduleTrigger, set. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Schedule Trigger each week

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/1646_Code_Schedule_Create_Scheduled.json MIT; preserve source notices.

More in AI & research