Weekly Key Account Health Dashboard Email
Every Monday, pulls all key accounts from Salesforce filtered by account tier, builds an HTML health dashboard with revenue, open cases, and last activity date, and emails it to sales leadership.
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 runs on a weekly schedule (every Monday at 8:00 AM ET), queries Salesforce for key accounts filtered by account tier, builds a styled HTML dashboard table showing account health metrics, and emails it to sales leadership. It demonstrates the Salesforce GetItems_table_account connector action with OData filtering, HTML email composition via Select + Compose, and environment variable-driven configuration.
Use Case
Sales leaders need a recurring, at-a-glance view of their most important accounts without logging into Salesforce. This flow delivers a formatted dashboard email every Monday morning showing account name, annual revenue, employee count, last activity date, and industry — sorted by revenue descending. The account tier filter and recipient list are fully configurable via environment variables.
Flow Architecture
Weekly Monday Recurrence
RecurrenceFires every Monday at 8:00 AM Eastern.
Init varSalesLeadershipEmail
Initialize VariableLoads recipient email from env var flowlibs_SalesLeadershipEmail. Runs in parallel with steps 2 and 3.
Init varAccountTierFilter
Initialize VariableLoads account type filter from env var flowlibs_AccountTierFilter. Runs in parallel with steps 1 and 3.
Init varKeyAccountTopCount
Initialize VariableLoads max account count from env var flowlibs_KeyAccountTopCount. Runs in parallel with steps 1 and 2.
Get Key Accounts from Salesforce
OpenApiConnection (Salesforce)Queries Salesforce Account table with $filter on Type, $orderby AnnualRevenue desc, and $top from variable.
Select Account HTML Rows
SelectTransforms each account record into an HTML table row with name, annual revenue, employee count, last activity date, and industry.
Compose HTML Dashboard
ComposeConcatenates full HTML email with styled table header, account rows, date stamp, and filter metadata.
Send Dashboard Email to Sales Leadership
OpenApiConnection (Outlook)Sends the HTML dashboard email to the configured recipient(s).
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SalesLeadershipEmail | String | sales-leadership@contoso.com | Recipient email address(es) for the weekly dashboard. Supports semicolon-separated addresses for multiple recipients. |
| flowlibs_AccountTierFilter | String | Customer - Direct | Salesforce Account Type value used in the OData $filter. |
| flowlibs_KeyAccountTopCount | String | 50 | Maximum number of accounts to include (used with $top). |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Salesforce | shared_salesforce | GetItems_table_account (Query Account records) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (Send dashboard email) |
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.
- Change recipient(s)
- Update the flowlibs_SalesLeadershipEmail environment variable. Supports semicolon-separated addresses for multiple recipients.
- Filter different account types
- Update flowlibs_AccountTierFilter to match your Salesforce Account Type picklist values (e.g., Customer - Channel, Partner, Prospect).
- Adjust account count
- Update flowlibs_KeyAccountTopCount to show more or fewer accounts.
- Change schedule
- Edit the trigger recurrence in the designer — change weekDays, hours, or frequency.
- Add more columns
- Edit the Select action's HTML template to include additional Salesforce Account fields (e.g., Owner.Name, BillingState, Rating).
- Authorize connections
- On first use, open the flow in the designer and authorize both the Salesforce and Office 365 Outlook connections.
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.01OData filter
Filters Salesforce accounts by the configurable Type field.
EXPR.02Top count conversion
Converts the string env var to integer for $top.
EXPR.03Revenue formatting
Formats revenue as currency or shows N/A when null.
EXPR.04HTML row assembly
Joins Select outputs and strips JSON wrapper characters to produce clean HTML rows.
EXPR.05Date stamp
Adds generation date to the email subject and body.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.