Skip to content

n8n AI News Digest: Collect Alerts, Summarize Daily With an LLM

An n8n AI news digest in two workflows: one stores each AyeWatch alert in an n8n data table, the other runs each morning, summarizes the last 24 hours with an LLM and posts it to Slack.

By AyeWatch Team6 min read

Short answer: To build an AI news digest in n8n, split it in two: a webhook workflow that stores each AyeWatch alert in a data table, and a Schedule Trigger workflow that reads the last 24 hours every morning, sends them to a Basic LLM Chain with a chat model, and posts the summary to Slack.

Do you need this at all?

AyeWatch already sends an optional Daily Digest email on every plan. If one email a day is what you want, turn that on and skip this recipe.

Build your own digest when it should land in Slack, when you want to write the prompt yourself (group by customer, flag anything about pricing, answer in German), or when the digest should mix AyeWatch alerts with other sources you already pull into n8n.

Workflow A: collect every alert

The first four nodes are the same in every recipe in this series. The n8n webhook setup guide walks through them; here is the short version.

  1. Webhook: HTTP Method POST, Respond set to Immediately, and Raw Body turned on under Options. Its Production URL goes into AyeWatch's webhook settings.
  2. Crypto: Action Hmac, Binary File on with Binary Property Name data, Type SHA256, Property Name signature, Encoding HEX. Your AyeWatch signing secret goes into a Crypto credential as the Hmac Secret.
  3. Check signature: a Code node that compares sha256= plus that value with the x-ayewatch-signature header in constant time, drops the item if they differ, and passes on flat fields: topic_id, topic_name, update_id, headline, content, source_url (the first evidence link, when there is one) and created_at. The code is in the HMAC verification recipe.
  4. Remove Duplicates: Operation Remove Items Processed in Previous Executions, Keep Items Where Value Is New, Value to Dedupe On {{ $json.update_id }}. The reasons are in the dedupe recipe.

Then one storage node:

  1. Data Table: Resource Row, Operation Insert, into a table named alerts. Map each column by hand:
    • update_id: {{ $json.update_id }}
    • topic_name: {{ $json.topic_name }}
    • headline: {{ $json.headline }}
    • summary: {{ $json.content }}
    • link: {{ $json.source_url }}
    • received_ms (a number column): {{ $now.toMillis() }}

Create the table in n8n's Data tables first, with those six columns. A number for the time makes the "last 24 hours" query a simple comparison.

Workflow B: summarize each morning

  1. Schedule Trigger: Trigger Interval Days, Days Between Triggers 1, Trigger at Hour set to 7 in the morning. It uses the workflow's time zone, so check that in the workflow settings.
  2. Data Table: Row, Get, from alerts, with the condition received_ms Greater Than {{ $now.minus({ hours: 24 }).toMillis() }} and Return All on.
  3. Code, "Build digest input": turns the rows into one numbered block of text (code below). It returns nothing on a quiet day, so no empty digest is sent.
  4. Basic LLM Chain: Prompt set to Define below, Prompt (User Message) Here are {{ $json.count }} alerts from the last 24 hours: followed by {{ $json.alerts }}. Add the system prompt below as a System message under Chat Messages. Attach a chat model sub-node: OpenAI Chat Model, Anthropic Chat Model or OpenRouter Chat Model.
  5. Slack: Message, Send to #morning-digest, text {{ $json.text }}. The chain puts the model's answer in text.
  6. Data Table, on a second branch straight from the Schedule Trigger: Row, Delete, where received_ms Less Than {{ $now.minus({ days: 7 }).toMillis() }}. This keeps a week of history and stops the table growing.
// Code node "Build digest input". Mode: Run Once for All Items.
// Input: the data table rows from the last 24 hours.
const rows = $input.all().map((item) => item.json);
if (!rows.length) return [];
rows.sort((a, b) => a.received_ms - b.received_ms);
const alerts = rows
  .map((r, n) =>
    (n + 1) + '. [' + r.topic_name + '] ' + r.headline + '\n' +
    String(r.summary || '').slice(0, 600) + '\n' + r.link)
  .join('\n\n');
return [{ json: { count: rows.length, alerts } }];

The system prompt

You write a short morning digest for a busy team.
Group the alerts by the name in square brackets.
For each alert write one plain sentence and put its link on the next line.
Merge alerts that describe the same event and keep both links.
Use only facts that are in the alerts. Do not add background or guesses.
End with up to three action items, each naming the alert it comes from.
Do not use headings longer than four words.

"Use only facts that are in the alerts" matters more than any other line. A model asked to summarize news will happily fill gaps from its training data, and a digest that mixes the two is worse than no digest.

Token and credit budget

Tokens. The Code node cuts each summary at 600 characters, so an alert is about 700 characters with its headline and link. Forty alerts are about 28,000 characters. n8n's OpenAI docs give the rule of thumb that one token is roughly four characters, so that is about 7,000 input tokens a day, small for any current chat model.

Credits. Credits per check times checks, 30-day month on Pro:

  • Eight internet topics, daily: 8 × 1 × 30 = 240
  • Two X searches, daily: 2 × 2 × 30 = 120
  • Two subreddit monitors, daily: 2 × 1 × 30 = 60

Total 420. A daily digest pairs well with daily checks; hourly checks would only put more items into the same morning message. AyeWatch Pro is $9/mo with 50 topics and hourly checks; Pro+ is $19/mo with 200 topics and ASAP mode. Every plan starts with a 7-day free trial.

What this won't do

  • Fact-check. The model only sees the alerts. If an alert is wrong, the digest is wrong.
  • Keep every item. Models sometimes merge or drop items. The links are in the data table for a week if you need to look back.
  • Read the Code node from the table. n8n's Code node cannot read data tables directly, which is why the Data Table node does the query.
  • Grow forever. n8n limits the total size of data tables, so keep the delete step.

Build it

  1. Create the alerts data table in n8n with update_id, topic_name, headline, summary, link and received_ms.
  2. Build workflow A with the front four nodes and the Data Table Insert node, then publish it.
  3. Paste workflow A's Production URL into AyeWatch's webhook settings.
  4. Build workflow B with the Schedule Trigger, Data Table Get, the Code node, the Basic LLM Chain and Slack.
  5. Add the Data Table Delete branch and publish workflow B.
  6. Run workflow B by hand once alerts have arrived, then tune the system prompt.
OptionWhere it landsPromptSetup
AyeWatch Daily Digest emailEmailFixedTurn it on in AyeWatch
This n8n workflowSlack or anywhere n8n reachesYour ownTwo workflows, a data table and an LLM credential

Start a monitor in under a minute

Describe a topic or paste a URL. Cancel before the trial ends and you pay nothing.

Try it free for 7 days

The bottom line

Keep the prompt strict and the input short, and the morning digest becomes the one message people read before standup. When a topic stops showing up in the digest for a few weeks, pause its monitor and spend the credits elsewhere.

FAQ

How do I summarize alerts daily with an LLM in n8n?

Store each alert as it arrives, then run a Schedule Trigger workflow each morning that reads the last 24 hours, joins them into one text, and sends it to a Basic LLM Chain with a chat model.

Where should n8n store alerts between runs?

An n8n data table works well. Insert one row per alert with a numeric received time, then query rows newer than 24 hours with the Data Table node.

Which LLM node should I use for a digest?

The Basic LLM Chain with a chat model sub-node such as OpenAI Chat Model, Anthropic Chat Model or OpenRouter Chat Model. Its answer is in the text field.

How many tokens does a daily digest use?

About 7,000 input tokens for 40 alerts, using the rule of thumb of four characters per token and summaries cut at 600 characters.

Does AyeWatch have a digest without n8n?

Yes. Every plan can get the Daily Digest email. Build an n8n digest when you need Slack, your own prompt or other sources mixed in.

n8n ai news digest workflown8n daily digestn8n llm summarybasic llm chainnews alerts summary slack

Related articles