In today's fast-paced business environment, automation has become the backbone of efficiency. Salesforce Flow Builder, a powerful tool, allows businesses to streamline their processes by automating complex workflows. One such use case is sending emails with attachments—a common requirement for tasks like sharing invoices, onboarding documents, or marketing materials.
Manually attaching files to emails can be time-consuming and error-prone. But with Salesforce Flow Builder, you can easily automate this process, ensuring accurate and timely communication with your customers.
In this blog, we’ll explore how to set up a Flow in Salesforce to send emails with attachments seamlessly. Whether you’re a beginner or an experienced admin, this guide will walk you through the steps to make your email communication smarter and more effective.
Key Features of the Send Email Action:-
The Send Email action in Flow Builder supports attaching files, making it a versatile tool for automating communication. Here’s what you need to know:
- Attachment Support: Attach files to your emails by providing their IDs.
- File Formats: Use IDs of Documents, Content Versions, or Attachments.
- File Limit: The total email size, including attachments, must not exceed 35 MB.
- Accessibility: Available in Lightning Experience and Salesforce Classic (not in all orgs) for Essentials, Professional, Enterprise, Performance, Unlimited, and Developer editions.
Practice in a Salesforce Org
To get hands-on experience with this feature, you can create a Salesforce org and practice setting up a flow with email attachments. Sign up for a pre-release Salesforce org here : Sign up for pre-release org
How to Configure the Send Email Action in Flow Builder
Here’s a step-by-step guide to sending emails with attachments:
Step 1: Open Flow Builder
- Navigate to Setup > Process Automation > Flows and create a Flow.
- Select Record Trigger Flow. (here you can select any type of flow where the Send Email action is available)
- Configure the Starting Conditions and Choose the object of the Flow.
- Here we are required to select an object (here, I use Account object) onto which the Record Trigger Flow will run.
You can configure Start as such given below in the image
Step 2: Add the get record element.
- From the Element Menu, search for and select Get Record.
- Drag the element onto your flow canvas.
- And get the desired ContentVersion (File).
Step 3: Add the Send Email action:-
- from the Element Menu, search for and select Send Email
- To do this, click the + Add Element button on the Flow Builder canvas. In the search bar that appears, type “Send Email” and select it from the list of available elements.
Step 4: Configure Email Details
- Set input values such as the sender, recipient, subject, and body of the email.
- Turn on the Attachment ID field.
-
Provide the file ID(s) for the attachment.
- You can use the ID of a Document, Content Version, or Attachment.
- To attach multiple files, enter their IDs as a comma-delimited list (e.g., fileId1,fileId2,fileId3).
Setting Input Values:
-
This involves defining the essential fields for the email, such as:
- Sender: Determines who the email will appear to come from.
- Recipient: Specifies the email address or addresses of the people receiving the message.
- Subject: Provide a clear and concise title for the email.
- Body: Includes the main content of the email, which can be static text or dynamically generated using variables.
Attachment ID Field:
- Enabling this field allows you to include files in the email by referencing their unique IDs in Salesforce.
-
This field is critical when you want to attach documents, Content Versions (such as Salesforce Files), or older-style Attachments.
Providing File IDs:
- You need to supply the unique Salesforce IDs of the files you want to attach.
- For multiple files, list their IDs separated by commas. This ensures all specified files are included in the email, as long as the combined size stays within the 35 MB limit
This step empowers users to customize the email content and include relevant documents, making automated emails more functional and impactful.
Step 5: Test and Activate the Flow
- Save and test your flow to ensure the email is sent correctly with the desired attachments.
- Once satisfied, activate the flow to make it live.
Best Practices
- Optimize File Size: Ensure attachments are compressed or optimized to stay within the 35 MB limit.
- Validate File IDs: Double-check that the file IDs are accurate and accessible by the intended recipients.
- Monitor Email Deliverability: Use Salesforce Email Logs to track delivery and troubleshoot issues.
- Secure Access: Ensure the attachments have the correct sharing settings to prevent unauthorized access.
- Dynamic Attachments: Leverage variables in the flow to dynamically select attachments based on the context.
Real-World Use Cases of Email Attachments in Flows:-
Sending emails with attachments is a common necessity for businesses. Here are some practical scenarios where automating this process using Salesforce Flow Builder can save time and improve efficiency:
- Invoice Automation:
Automatically email invoices to customers as soon as their orders are processed, with the invoice attached in PDF format. - Onboarding Documents:
Share welcome kits, training materials, or company policies with new employees or customers during the onboarding process. - Contract Distribution:
Send signed contracts or agreements to stakeholders without manual intervention. - Marketing Campaigns:
Attach brochures, product catalogs, or promotional content to personalized emails for targeted marketing campaigns. - Case Resolution Updates:
Notify customers about case updates by attaching relevant documents, such as troubleshooting guides or service reports.
Conclusion
With the Send Email action in Flow Builder, Salesforce empowers businesses to enhance their email automation by including critical attachments. This capability not only saves time but also ensures that your recipients have all the information they need.
Start using this feature today and take your Salesforce automation to the next level!
For additional questions on Experience please reach out to support@astreait.com