Skip to content

Category: Flow

Salesforce Flow: Fixing Formatting and Rendering Issues in Emails with Rich-Text Templates

When using the Send Email core action in Salesforce Flow to send an email with a rich-text body. Switching between plain text and rich text in the template editor alters the HTML markup, resulting in incorrect rendering and formatting issues.

To avoid this, use a plain text template with HTML markup and select Rich-Text-Formatted Body as true in the Send Email action. This approach ensures the email body is formatted correctly. See the attached screenshots for reference.

Salesforce screen flow – Open a Record in a Console Sub-Tab

This article explains how to use Salesforce Screen Flow to open a record in a console sub-tab. By creating a text template that includes the record’s ID and using a display text component, users can click a link that opens the record within the console rather than a new browser tab. Two key steps are involved: (1) creating the text template with the record ID, and (2) displaying the template in the flow using the “Display Text” component.

Salesforce Screen Flow – Download records into a CSV file with specified fields using the collection variable

This articles leverages a lightning web component to export the data from Salesforce screen flow. The LWC inputs a collection variable and convert it into a CSV file. Moreover, you also have options to select an sObject and fields to be exported into the CSV file.

Advanced Send Email Flow Action – Send email from Salesforce flow with CC, BCC, and email attachments

This class can be used in flows to send emails programmatically without needing predefined email alerts.
It allows customization of email content, recipients, and attachments on the fly. The Apex class is designed to send emails from Salesforce without the need for an Email Alert.

Screen Flow – Preview the email body with merge fields populated before sending out

This article shows, how to preview an email in a screen flow with actual merge fields populated before sending it out to a customer, ensuring all details are correct. By using an Apex invocable action that returns email body with all the merge fields populated and in the screen flow show text using display text component and HTML body using an LWC.

Update lead Owner, when a lead is assigned to a Sales Engagement cadence (cadence starts).

This article provides step-by-step instructions to help you set up an automation using Change Data Capture, Flow and Apex trigger to update the lead Owner, when a lead is assigned to a Specific cadence. The apex trigger listens for new events on the ActionCadenceTrackerChangeEvent object, and when a Lead is targeted by a specific cadence (‘my test cadence’), it triggers a Flow to update the lead owner with the cadence assignee.

Complex Validation Rule using Salesforce Record Trigger Flows Instead of using Apex code

This article walks you through creating a validation rule using a record trigger flow instead of using apex code for complex business requirements. Sometimes we have requirements that can not be accomplished using standard validation rules. So you can use this approach instead of developing before insert apex trigger.

This articles covers a business requirement that before an opportunity is marked as closed won, the opportunity must have at least one contact role.

Salesforce Apex/Flow: POST salesforce file as Asana attachments via Asana API encoded as multipart/form-data

Recently I was working on Salesforce – Asana integration project using Asana API in apex. It works fine by creating asana tasks, sub-tasks, etc. using normal API requests. But when it comes to uploading files as attachments to Asana consuming API, I was stuck. Because it requires the file data to be encoded in some special format with the multipart/form-data.