As a Salesforce administrator, I need to automate a process so that whenever a new high-priority account is created, an email is sent to the account owner.
We also need to dynamically provide a CC recipient address list so that whenever we want to change CC email addresses, we will not be required to make changes in the flow. To fulfill this requirement, I created a flow to automate this process.
In this Salesforce tutorial, we will learn how to dynamically add CC recipient’s address list to Salesforce Flow. I will explain it from scratch so that you understand it correctly.
What is the Dynamic CC Recipient Address List in Salesforce Flow?
A dynamic CC recipient address list in a Salesforce flow refers to a process where email recipients (for email CC) are dynamically selected based on data from records or objects in the Salesforce org.
This allows end users to change the CC recipients based on conditions, user inputs, or values from related records, without having to hardcode email addresses.
Let’s understand how the dynamic CC recipient address list works.
When we develop a flow in Salesforce and then need to deploy it to another Salesforce org, the end user using that organization is typically unaware of the flow.
For that, we can use dynamic flow so that whenever end users add emails to the list that we created. From there, the flow will take values and add them to the particular element.
Now, I will explain how to develop a flow that dynamically takes a CC address list to the email action in the flow. Before that, we will discuss the prerequisites of creating a flow.
Prerequisites:
For example, when an employee applies for leave, an email should be sent to the manager, and also, in that email, some CC email addresses should be included so that they can also receive the same email.
For that, I created a custom object named Apply Leaves__c, and in that object, I added fields such as a leave request form.

I have created a custom object named CC Email List__c. In that, I created an Email field named CC Emails__c and then added some emails to the created object.

Now, the scenario is that we want to use these emails in the Email Action element in the CC Recipient Address List field dynamically, so that whenever the end user wants to change emails, they can do so directly from the object tab instead of modifying the flow.
Create Salesforce Flow to Dynamically Add CC Recipients’ Address List
In the step below, I explain how to create a flow that dynamically adds the CC recipient’s address list.
Click on the Setup. -> Home Page. -> In the Quick Find Box, Search for Flows. You will see an option under Process Automation. -> Click on Flows. Click on the New Flow button to create a new flow.
We want to create a flow for sending an email at a particular frequency, so we have to select the Record Trigger Flow. Then, click on the Create button.
Now, we will create the following elements in the flow according to the flow diagram displayed below.

1. Start Element
In the start element, we have to select the triggering object. In our scenario, Apply Leave__c is a triggering object because when the user applies for leave at that time, the record gets created, so in the Configure Trigger, we need to select A record is created.
I also added one condition: the Employee Name field should not be Null. Then, I selected “Actions and Related Records” in the “Optimize the Flow” option.

2. Get Records(Get CC Emails)
First, we need to retrieve all the CC Email addresses stored in the CC email list object. For that, we need to add the Get Records element and enter a Label and API Name.
In the Object field, select the CC email list__c object to fetch the email addresses. Then, as we want to retrieve all emails, we don’t need to filter records or determine how many records to store; we need to store all records.
We can refer to this Collection Element as such because it stores the records of the cc email list object.

3. Loop Element(CC Email Loop)
Now, we will use the loop element to iterate over the records. To add the Loop Element, click on the Add Element icon. Then, enter the element Label and API Name.
Then, select the Collection Variable from Get Records(API Name) and select the iteration direction from the first item to the last item.
Then click on the Done button.

4. New Variable(CCEmailList)
To store the CC email addresses, we need to create a new variable. To do that, click New Resource and select the Resource Type as Variable. Enter API Name. Here, I have entered CCEmailList.
Select Data Type as Text. Click on Done.

5. Assignment(Assign Emails)
In this element, we will assign CC email addresses from the loop element to the text variable that we created. To do so, add the Assignment Element. Then, enter the element Label and API Name.
When we assign the CC email addresses to the text variable, we need to include all emails available in the CC email list__c object. After adding it, it will be added as a list, and we need to add a comma (,) after one email. For example, user1@gmail.com,user2@gmail.com.
For that, in the Set Variable Values to the variable field, select the text variable that we created, Equals operator; in the value, we need to add the email from the loop element. Below, I have given the value format.
{!CCEmailLoop.CC_Emails__c},{!CCEmailList}- {!CCEmailLoop.CC_Emails__c}: This will fetch the current CC email address, which is in the loop iteration, and add it to the {!CCEmailList} text variable with a comma.

6. Email Action(Send Email to CC Recipients)
We need to add an email action element to send an email after the record is created. As you add the email action element, you need to enter the Label, and the API Name will automatically populate.
After that, add the necessary input values. Here, I will explain how the dynamic CC Recipient Address List enhances email actions. In this action, we need to select a text variable in which we added CC email addresses in the assignment element.

7. Save the Flow
After setting up all labels and conditions, click the Save button to save the flow. For that, we need to enter the Flow Label; the API Name will automatically populate as we click the text box. The Description is optional; we can introduce our flow shortly.
8. Debug & Activate the Flow
After saving the flow, click on the Debug button. Then click on the Activate button; always remember to debug the flow before activating it. It’s good practice to use flow.
After debugging the flow, you can see that the flow has been debugged successfully and its path. First, the start element is executed, and then each element is executed one by one.
The loop element was executed twice because, in the ‘Get a Record’ element (collection element), there were two records in the CC email list__c. That is why it was executed 2 times and assigned a value to the text variable.
Then, in the Email Action, you can see the details of the values that we provided to the element.
Now, activate the flow and create a record of the object that you selected as the triggering object in this flow.

In this way, we can add a CC recipient’s address list to the email action and automate the process of sending an email to recipients and CC recipients using Salesforce Flow.
Proof of Concept:
As any user applies for leave, a record is created in the Apply Leave object, and the flow is also triggered. After that, an email will be sent to the recipients and the CC addresses that we added dynamically in the Salesforce flow.
Now, when the end user wants to change the CC addresses, they don’t need to make changes in the flow; instead, they can change the email addresses in the CC Email List__c object, and after that, the email will be sent to the changed CC addresses.

Conclusion
I hope you have got an idea about how to dynamically add CC recipient’s address list to Salesforce Flow. I have explained it from scratch so that you understand it correctly. After adding the CC recipient’s addresses to the email action in Salesforce flow, if the end user wants to change emails, they can directly change from the object tab instead of modifying the flow.
You may like to read:
- Various Ways to Use Classic Email Templates in Salesforce Flow
- Add Image to Classic Email Template in Salesforce Classic
- Add image to email template in Salesforce Lightning
- Automate Birthday or Anniversary Email Using Salesforce Flow
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.