scheduled flows + visualforce email templates
Many options exist to notify folks about salesforce data. I classify them as ‘popcorn’ (email alerts / chatter posts / notifications via workflows/flows/processes) or ‘consolidated’ (report subscriptions, that random opportunity email thing, custom visualforce emails with summarized info).
HR needed to automatically notify managers when people who reported to them had a contract that would expire in 90 days. Report subscriptions dont scale for this. Popcorn is a pain to build, and makes for a fractured user experience, so I wanted to send the manage a single summary email w all the data, on the first of the month.
The full-code way would be a scheduled batch job that sends the email, which can be all code. Nothing crazy, but i would guess a hundred lines or so,
Instead, I used scheduled flows and a visualforce email template in a regular old email alert, which leaves most of the...