Hi All. I know this can been done because I have read dozens of articles on trailhead, Salesforce Ben and other places but not getting the full picture form any of them.
Goal: create a record triggered flow that will search user records and get name, email and last login date for users who have not logged in for 90 days. Then write that info to a text variable so I can use it in the email body to send it to the access team.
I have a flow that uses a get records element and stores the collected info in a record collection variable.
This then connects to an assignment variable. It appears from debug that the correct record data is being collected. Is there a way to write this to a text variable and use that as the email body?
I' think I'll eventually need to create a loop to capture all records the meet the criteria but for now I am just trying to get it work for a single record.
Assignment Element
!$Record.FirstName} Equals {!$Record.FirstName}
{!$Record.LastName} Equals {!$Record.LastName}
{!$Record.Email} Equals {!$Record.Email}
{!$Record.Last_Login_Testing__c} Equals {!$Record.Last_Login_Testing__c}
Result
{!$Record.FirstName} = "Test"
{!$Record.LastName} = "User"
{!$Record.Email} = "username@company.com"
{!$Record.Last_Login_Testing__c} = "1/7/2025 1:22 PM"
Zack Terry (Fast Slow Motion) Forum Ambassador
If helpful, this article walks through an approach: https://salesforcetime.com/2023/11/02/how-to-send-email-with-a-record-table-in-flow/