Skip to content
Visual explainer 3h to learn 5 steps

Schedule a cited digest over approved documents in n8n

Produce a scheduled digest with citations from approved documents, with duplicate suppression, preview and destination approval.

By Invicly Tech, , in n8n, AI Automation and Voice Agents. About 7 minutes to read.

Topic 15 of 43

In short

A knowledge digest is a scheduled summary built only from documents you have approved. Every item in it carries a citation back to its source. The workflow skips items it already sent, shows a preview, and only posts to a destination someone approved.

Think of it like this: It is a weekly newsletter where an editor checks the sources and the mailing list before it goes out.

Explained simply

A digest is a short summary sent on a schedule, such as every Monday morning. It might list new policy updates or support articles. A model can write the summary, but you must control what it reads and where the result goes.

Start with the source. Only use documents that someone has marked as approved. Anything else, like drafts or private notes, must not reach the model. This keeps secrets out and keeps the digest trustworthy.

Every item in the digest should say where it came from. A citation is a title and a link to the original. Add the link from your own document data. Do not ask the model to invent it, because models sometimes produce links that do not exist.

Before sending, check two things. First, skip items you already sent last week. Second, show a preview to a person and confirm the destination, such as which channel or mailing list. Only then publish.

Press Play on a diagram to walk through it one step at a time.

FlowWeekly digest run
  1. 1
    Schedule Trigger

    Weekly, with a set time zone

  2. 2
    Approved sources only

    Filter by an approved flag

  3. 3
    Remove Duplicates

    Skip items sent before

  4. 4
    Summarise with citations

    Item text plus source link

  5. 5
    Preview and approve

    Then send to the approved channel

CompareTwo ways to remember what was sent
Remove Duplicates node
  • Built in, little setup
  • Remembers values across runs
  • Clear history option for tests
  • Less visible than a table
Sent-date column in a table
  • Easy to inspect and edit
  • Can resend one item on purpose
  • Needs an update step
  • Works across workflows

In depth

Schedule and time zones

The Schedule Trigger node starts a workflow on an interval or a cron expression. Set the workflow time zone in its settings, or a Monday 08:00 run may fire at the wrong local time. A schedule only runs when the workflow is active, so test with Execute workflow first. During build, keep it inactive and run it by hand. Activate only after the destination has been approved. Remember that a missed run, for example while n8n was down, is not automatically replayed.

  • Set the workflow time zone
  • Test manually before activating
  • Activate last
  • Plan for missed runs

Duplicate suppression

If the same document stays in the source folder, next week's digest would repeat it. The Remove Duplicates node can compare items across executions: its option to remove items processed in previous executions remembers a value, such as a document id, and drops items it has seen. You can also store a last-sent date on each document in a data table and filter on it. Choose one method and keep the id stable. If the id changes when a document is edited, you may want it to count as new, so decide that on purpose.

SequenceHow a digest run stays clean
Schedule
Workflow
Reviewer
  1. 1Start Monday 08:00
    Schedule to Workflow: Start Monday 08:00
  2. 2Keep approved items not sent before
    Workflow to Workflow: Keep approved items not sent before
  3. 3Summarise, attach source links
    Workflow to Workflow: Summarise, attach source links
  4. 4Send preview
    Workflow to Reviewer: Send preview
  5. 5Approve destination
    Reviewer to Workflow: Approve destination
  6. 6Publish and remember item ids
    Workflow to Workflow: Publish and remember item ids

Citations you can trust

Give the model each document as a numbered block with its title and id. Ask it to refer to the number in each bullet. Then, in code, replace each number with the real title and link from your data. If a bullet has no valid number, drop it. This way the model never writes a URL, and every line can be traced. Also tell the model to use only the text given, and to say so when nothing new was found rather than padding the digest.

  • Number each source block
  • Replace numbers with real links in code
  • Drop bullets without a valid source
  • An empty week is a valid digest

Learn it in 5 short steps

About 35m each. Track them with a timer in your plan.

  1. 1
    Limit sources to approved documents~35m
  2. 2
    Cite every summarised item~35m
  3. 3
    Suppress duplicates between runs~35m
  4. 4
    Preview before sending~35m
  5. 5
    Approve the destination~35m

Key points

  • The Schedule Trigger starts the run. Set the workflow time zone so it fires when you expect.
  • Limit input to documents marked approved. Reject anything else before the model sees it.
  • Every summary line needs a source reference. Drop lines without one.
  • The Remove Duplicates node can skip items already processed in earlier executions.

Key terms

Tap a card to flip it. 0/5 known

Examples

Replacing source numbers with links

The model writes bullets like: Leave policy changed [2]. A Code node swaps [2] for the title and URL from the original list, and drops any bullet whose number does not exist.

javascript
const docs = $('Approved docs').all().map(i => i.json);
const lines = $input.first().json.bullets;
const out = [];
for (const b of lines) {
  const m = b.match(/\[(\d+)\]/);
  const d = m && docs[Number(m[1]) - 1];
  if (d) out.push(b.replace(m[0], '(' + d.title + ': ' + d.url + ')'));
}
return [{ json: { digest: out.join('\n') } }];

A quiet week

Only two documents are approved and one was already sent. The digest has one item. The workflow shows the preview, the reviewer sees one cited line, and confirms the destination. Nothing is padded to look bigger.

Quick reference

  • Schedule Trigger: intervals or cron, with the workflow time zone set
  • Inactive workflows do not run on schedule
  • Remove Duplicates can drop items seen in previous executions
  • Models cite by number, code adds real links
  • Preview and approve the destination before activating

Common mistakes

  • Summarising documents nobody approved, which leaks private material.
  • Letting the model invent a source link. Add the link from your own data.
  • Activating the schedule before the destination is approved.

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1Why add citation links in code?

Question 2

2What does the Schedule Trigger need to run?

Question 3

3Which sources should the digest read?

Question 4

4What do you do on a week with nothing new?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    Write the cron expression for 08:00 every Monday, and say where the time zone is set.

  2. Exercise 2medium

    Build a workflow that reads a data table of documents, keeps rows where approved is true, and drops ids already seen using Remove Duplicates.

  3. Exercise 3hard

    Add summarising with numbered sources, replace numbers with links, preview by email to yourself, and a Wait step before the final post.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

Can I use cron instead of intervals?
Yes. The Schedule Trigger accepts a cron expression for exact times.
Will n8n catch up after downtime?
Do not assume so. Plan for a missed run, for example by running the workflow manually.
Why not let the model search the web?
Then you lose control of sources. This recipe is about approved documents only.

Go deeper

ShareXLinkedInWhatsApp