Add RSS news ingestion workflow
This commit is contained in:
@@ -46,3 +46,26 @@ password, and disable SSL when the server reports that it does not support SSL.
|
||||
|
||||
The first workflow in `workflows/01-test-postgres.json` only checks this
|
||||
connection. It does not fetch news or send email.
|
||||
|
||||
## RSS ingestion workflow
|
||||
|
||||
Run `db/migrations/004_n8n_ingestion.sql` in DBeaver first. It creates the
|
||||
idempotent database ingestion function and adds a verified starter set of RSS
|
||||
sources. It is safe to run the whole file again.
|
||||
|
||||
Then import `workflows/02-fetch-news-to-web.json` into n8n and select the same
|
||||
PostgreSQL credential on both PostgreSQL nodes. Keep the workflow inactive for
|
||||
the first test and click **Execute workflow**. The workflow:
|
||||
|
||||
- loads every enabled row from `news_sources`;
|
||||
- reads RSS feeds and keeps entries from the last 14 days;
|
||||
- classifies entries with local keyword rules, without an AI API;
|
||||
- upserts articles and publishes today's web report;
|
||||
- does not send email.
|
||||
|
||||
After the manual test succeeds and the web page shows today's report, activate
|
||||
the workflow. Its schedule is 07:30 in `Asia/Shanghai`.
|
||||
|
||||
New RSS sources can be added later with an `INSERT` into `news_sources`; the
|
||||
workflow reads that table on every run, so the workflow itself does not need to
|
||||
be edited. Set `enabled = FALSE` to pause a source without deleting it.
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user