Newsletter Aggregator to Weekly Digest
Collect newsletter emails from Outlook.com throughout the week, extract key content, and compile a single digest email on Fridays.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow automatically collects newsletter emails from a designated Outlook folder throughout the week and compiles them into a single, beautifully formatted HTML digest email sent every Friday morning. If no newsletters are found, it sends a brief notification instead. All configurable values are externalized as environment variables for easy tenant portability.
Trigger: Weekly Recurrence (Fridays at 8:00 AM EST)
Use Case
Many professionals subscribe to industry newsletters but struggle to keep up with them during the busy work week. This flow solves that by aggregating all newsletters into a single Friday digest, making it easy to catch up on industry news in one sitting. The digest includes the subject, sender, timestamp, and a preview snippet for each newsletter.
The flow is ideal for teams that:
- All Business Users
- Marketing Teams
Flow Architecture
Weekly Friday Recurrence
RecurrenceFires every Friday at 8:00 AM Eastern.
Initialize Newsletter Folder Path
Initialize VariableLoads the Outlook folder path from env var flowlibs_NewsletterFolderPath.
Initialize Digest Recipients
Initialize VariableLoads the recipient email from env var flowlibs_DigestRecipientEmail.
Initialize Subject Prefix
Initialize VariableLoads the email subject prefix from env var flowlibs_DigestSubjectPrefix.
Initialize Lookback Days
Initialize VariableLoads the lookback window (days) from env var flowlibs_NewsletterLookbackDays.
Initialize Digest HTML
Initialize VariableEmpty string variable used to accumulate the digest HTML table rows.
Compute Lookback Date
ComposeCalculates the cutoff date using addDays(utcNow(), mul(-1, int(varLookbackDays))).
Get Newsletter Emails
Office 365 Outlook - GetEmailsV2Retrieves up to 50 emails from the configured folder.
Filter Emails By Date
Filter ArrayFilters to only emails received after the lookback date.
Check If Any Newsletters Found
If conditionBranches based on whether the filtered email array is non-empty.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_NewsletterFolderPath | String | Inbox/Newsletters | The Outlook folder path where newsletter emails are stored. |
| flowlibs_DigestRecipientEmail | String | you@yourcompany.com | Email address that receives the weekly digest. Supports semicolon-separated values for multiple recipients. |
| flowlibs_DigestSubjectPrefix | String | Weekly Newsletter Digest | Subject line prefix for the digest email. |
| flowlibs_NewsletterLookbackDays | String | 7 | Number of days to look back when collecting newsletters. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Office 365 Outlook | shared_office365 | GetEmailsV2 (Reads newsletters from the configured folder.) SendEmailV2 (Sends the digest and the no-newsletters notice.) |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Configure environment variables
- Set flowlibs_NewsletterFolderPath to your actual Outlook folder (e.g. Inbox/Newsletters) and flowlibs_DigestRecipientEmail to your recipient email before turning on the flow.
- Create the Outlook folder or routing rule
- In Outlook, create a folder or inbox rule that routes newsletter emails to the folder path you configured so the flow has something to aggregate.
- Change the schedule
- Edit the Recurrence trigger to run on a different day or time (e.g. Monday morning instead of Friday).
- Adjust the lookback window
- Update flowlibs_NewsletterLookbackDays to collect more or fewer days of newsletters.
- Multiple recipients
- Enter semicolon-separated emails in flowlibs_DigestRecipientEmail to fan the digest out to a team.
- Customize the email template
- Edit the Compose Final Digest Email action to change colors, layout, or to add a company logo to the HTML template.
- Filter by sender
- Add a search query parameter to GetEmailsV2 (e.g. from:newsletter@company.com) to narrow which messages count as newsletters.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Compute lookback cutoff
Calculates the lookback cutoff date dynamically from the env-var-driven day count.
EXPR.02Filter array date predicate
Used inside Filter Array to keep only emails received on or after the cutoff.
EXPR.03Safely truncate body preview
Caps the preview snippet at 300 characters without throwing on shorter bodies.
EXPR.04Format email timestamp
Renders the received timestamp in a human-friendly format for each digest row.
EXPR.05Count filtered newsletters
Used by the condition to decide between sending the digest or the no-newsletters notice.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.