How I Built This: Use Generate Collection Report, Extract Strings from Collection and Send Better Email to Keep Users/Clients Up to Date

At my current organization, we built and maintain an Experience Cloud Site where Employers engage with Candidates about open opportunities and internships along with a large networking event held in the fall. Employers will post their job/internship opportunities on the site and candidates can one-click apply to these specific roles. As candidates build their profile and update their profile they have an option to receive a notification either daily, weekly, or monthly about recently posted opportunities matching the timeframe selected. Sending these notifications used to be sent a long time ago by someone literally copying and pasting a list into an email and sending them out. Enter Generate Collection Report, Extract String from Collection, Send Better Email, and Scheduled flows. Now this is an automated process.

Step 1 in the flow was setting the criteria for the schedule in this case I am not doing this for a specific record but using 2 collections so I just set the frequency and start time and not object in my start element.

Step 2 get all of the Job & Internship Postings that have been created within the last 24 hours and are published. I have a formula for today that is {!$Flow.CurrentDate}-1

Step 3 decide if there were any postings to send all we are doing here is looking to see if our Get Job & Internship Postings returned any records.

Step 5 create the Collection Report using Generate Collection Report. This apex action allows you to input a record collection and return specified fields into an html formatted report/table. For full details on this component check out this post.

Step 6 get Experience Site Users to send the notification to. (note for new flow users see how I am using a label to match the ProfileId try and not to hard code ids in flow)

Step 7 update the Lightning Email Template that is used in the email send with the updated Job & Internship Postings. The only thing I am updating is the outputvalue from the Generate Collection Report action.

Step 8 get userIds from our user collection using Extract Strings from Collection Action which can be found as part of the Collection Processors package

Step 9 use Send Better Email to send a mass email with a template to the candidates

Finally, Sit back relax put on your superhero cape and sip on your drink of choice and enjoy your work.