FlowKit

n8n template · AI Inbox Pack

Get a daily email digest in Slack with n8n

Natural companion to urgency scoring, this workflow turns the non-urgent email queue into a daily digest: every morning at 8 am, an LLM reads the Supabase queue, ranks, summarizes and posts the result to Slack and Telegram.

Pipelinedigest-quotidien-emails-slack.json · 7 nodes
  1. Tous les jours à 8htriggerSchedule (cron)
  2. Emails en attenteSupabase
  3. AgrégerAggregate
  4. Rédiger le digestLLM chain
  5. Envoyer sur SlackSlack
  6. Envoyer sur TelegramTelegram

Attached AI sub-nodes

  • Modèle OpenAIOpenAI model

The problem it solves

Batch-processing email is one of the best-documented productivity practices — provided the batch is readable. Opening thirty accumulated emails is still slow, even when none is urgent.

An LLM-written digest changes that: three lines for what needs action, one line to group the newsletters, and the morning starts with an overview instead of a dive into the inbox.

How the workflow works, node by node

Node names are in French, exactly as they appear in the imported workflow — the logic is language-agnostic.

  1. 01

    Tous les jours à 8h

    Schedule (cron)

    Cron trigger (0 8 * * *). Change the expression for a noon digest, or twice daily by duplicating the workflow.

  2. 02

    Emails en attente

    Supabase

    Fetches all emails_queue rows with pending status — the ones queued by the prioritization workflow since the last digest.

  3. 03

    Agréger

    Aggregate

    Groups all items into one object: the LLM receives the full list in a single call, letting it group and rank globally.

  4. 04

    Rédiger le digest

    LLM chain

    The prompt enforces a precise Slack format (priorities first, the rest in brief, 15 lines max) and a dedicated reply when the queue is empty.

  5. 05

    Modèle OpenAI

    OpenAI model

    gpt-4o-mini is plenty for guided summarization; one call per day, negligible cost.

  6. 06

    Envoyer sur Slack

    Slack

    Posts the digest to the channel of your choice, with native Slack formatting (*bold*, lists).

  7. 07

    Envoyer sur Telegram

    Telegram

    Same digest to a Telegram chat — handy on the go. Delete this node if Slack is enough.

What you need to run it

  • n8n ≥ 1.60 with the LangChain nodes
  • An OpenAI API key
  • The Supabase emails_queue table being fed (by the pack's prioritization workflow, or your own inserts)
  • A Slack bot and/or a Telegram bot (BotFather) with its chat_id

Customization ideas

  • Mark emails as processed after sending by adding a Supabase 'update' node (status = sent) after the digest
  • Split the digest per team by filtering the queue on a department field
  • Send the digest by email instead of Slack by swapping the output node for a Send Email node

FAQ

Frequently asked questions

How do I import this template into n8n?

Import digest-quotidien-emails-slack.json via 'Import from File', attach your Supabase, OpenAI, Slack and Telegram credentials, customize the channel and chat_id, then activate: the cron fires on its own the next morning at 8 am.

What happens when no email is queued?

The prompt handles it: the digest simply says the inbox is under control. You can also add an IF after the Supabase read to send nothing at all on empty days.

Can the same emails show up two days in a row?

Yes, as long as they stay in pending status. The pack guide shows how to add the status update after sending — a single Supabase 'update' node.