Salesforce Record Change Digest
Scheduled hourly flow pulls recently modified Salesforce records (filtered by LastModifiedDate), compiles a change digest with record type, name, changed fields, and modifier, then emails it to the subscribed team.
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 scheduled hourly flow monitors Salesforce for recently modified records, compiles a formatted HTML digest email, and sends it to a subscribed team. The email includes record name, ID, last modified date, and modifier details, enabling teams to stay informed of CRM changes without constantly monitoring Salesforce.
Use Case
Sales and operations teams need visibility into CRM data changes without constantly monitoring Salesforce. This flow automates change tracking by delivering periodic digest emails that highlight which records were modified, enabling teams to stay informed about updates to Accounts, Contacts, Opportunities, or any other Salesforce object type.
The flow is ideal for teams that:
- Hourly digest emails — no constant Salesforce polling needed
- Configurable object type via env var — works for any Salesforce object
- Professional HTML email format — easy to read and forward
- Customizable lookback window — adjust for your notification frequency
- Fully env-var-driven — no flow edits to retarget or reschedule
Flow Architecture
Recurrence - Hourly
RecurrenceFires every 1 hour.
Initialize Variables (3x parallel)
Initialize variableLoad env vars in parallel: SalesforceObjectType, SalesforceRecordLookbackHours, DigestRecipientEmail.
Get Recently Modified Records
Salesforce GetItemsQuery Salesforce for records of the configured object type, ordered by LastModifiedDate desc, top 50.
If records returned
If conditionBranch on whether any records came back from Salesforce.
- Select Digest Rows — Extract Name, Id, LastModifiedDate, and LastModifiedById from each record.
- Compose HTML Table Header — Build the HTML table header with styled columns.
- Build Table Rows — Generate the HTML <tr>/<td> rows for each modified record.
- Compose Full Email Body — Concatenate header, rows, and footer into the complete HTML email.
- Send Digest Email — Outlook SendEmailV2 — send the formatted digest to the configured recipient.
Empty branch — no action.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SalesforceObjectType | String | Account | Which Salesforce object to monitor for changes (e.g., Account, Contact, Opportunity, Lead, Case). |
| flowlibs_SalesforceRecordLookbackHours | String | 1 | How many hours to look back for modified records. Should match the Recurrence trigger interval to avoid gaps or overlaps. |
| flowlibs_DigestRecipientEmail | String | <configure> | Email address (or distribution list) that receives the digest. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Salesforce | shared_salesforce | GetItems (Get recently modified records of the configured object type.) |
| Office 365 Outlook | shared_office365 | SendEmailV2 (Sends the HTML digest 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 the monitored object type
- Update flowlibs_SalesforceObjectType to any valid Salesforce object (e.g., Contact, Opportunity, Lead, Case).
- Adjust polling frequency
- Modify the Recurrence trigger interval. Update flowlibs_SalesforceRecordLookbackHours to match the new interval to avoid gaps or overlaps.
- Change recipient
- Update flowlibs_DigestRecipientEmail to the desired recipient or distribution list.
- Add more fields to the digest
- Edit the Select Digest Rows action to include additional Salesforce fields. Update the HTML Compose actions to add matching <td> columns.
- Add filtering
- Add an OData $filter parameter to the Get Recently Modified Records action to filter by a condition (e.g., status = 'Active').
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.01Email subject with timestamp
Builds a dynamic email subject that includes the object type and current UTC timestamp.
EXPR.02Table assembly (unwrap)
Unwraps the JSON-wrapped HTML rows produced by Build_Table_Rows into a clean concatenated HTML string.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.