Log an Email on Related Record (Used Related Record ID & Recipient Address List) in record triggered flow #inSalesforce

Log an Email on Related Record (Used Related Record ID & Recipient Address List) in record triggered flow #inSalesforce


When Oppty Stage is updated to Closed Won, Send an email to Contact Role in Opportunity


Create a record-triggered flow | Opportunity | Criteria: Stage equals Closed Won | Only when ... selected | Action and Related Records 


GET:

getContactRoles

Opportunity Contact Role

Criteria: OpportunityId equals record.id

Only the first


DECISION:

Contact Role Exists or Not?

Yes: getContactRoles isnull False

No: End

Yes: Continue


Send Email Action: 

Body: Text Template | emailBody | Hi getContactRole.FirstName

getContactRole.LastName. record.Name is Closed. Thank You

Log Email on Send: True

RecipientId : getContactRoles.ContactId (where email is logged)

Also,  Log Email on Account. So, Related Record Id: Record.AccountId(not person), Recipient Address List: getContactRoles.Contact.Email

Rich Text Formatted Body: True

Subject: emailSubject(Text Template) Record.Name is Closed


Save, Debug and Activate




Comments