How to turn payment notification emails into one weekly digest with n8n
The problem
Payment and transaction notifications arrive as a stream of separate emails (about 15 a week for the author), so it is hard to see the week at a glance.
Tools needed
- n8n
- Gmail (with a label)
- OpenRouter (gpt-4o-mini)
- n8n Code node
Step-by-step recipe
- Create a Gmail label (or filter) for payment emails.
- Schedule the n8n workflow for Sunday at 8 AM.
- Fetch the past week's labelled messages, aggregate them and truncate the combined text to 100K characters.
- Have an AI Agent node write the digest from a system-message template.
- Convert the Markdown to HTML in a Code node and send it with Gmail.
Copyable prompt
You summarise a week of payment notification emails for [NAME].
Produce: 1) a one-line total per currency, 2) a table of payments (date, payer or merchant, amount, currency, what it was for), 3) anything unusual: duplicates, failed payments, unknown merchants.
Only use amounts that appear in the emails. Format as Markdown.
Emails: {{emails}}Original template written by AgentRecipes, not copied from the source. Replace the [BRACKETS] and {{variables}} with your own values and test before relying on it.
What the builder reported
The workflow turns about 15 weekly notifications into a single digest email. The post shows a successful test run but no further measurements.
These are the source author's own claims. AgentRecipes has not tested or verified them.
Watch out for
- Truncating to 100K characters keeps the input within the model's limits.
- Without the Markdown-to-HTML step, the email shows raw Markdown symbols.
Source
Original write-up: Substack ↗
Found via Agent Use Cases: “Email a weekly digest of payment notification emails”. This recipe summarises the source in our own words; read the original for the full details. Link last checked 2026-10-15.
More finance & invoicing recipes
New agent recipes in your inbox
A short email with the newest automation recipes, each linked to its real-world source. No spam, unsubscribe anytime.