Nate Helterbrand

Send Email Flow Action

salesforceflowapex

The Send Email Flow Action expands on the native Send Email flow action provided by Salesforce to add more functionality that is available like attaching documents. The flow action gives you access to the Apex SingleEmailMessage methods

Installation

Install the latest version of the unmanaged package: latest release

If you don't want to install the package, feel free to deploy the components themselves by clicking the button below. Take note that this will override any existing components that have the same name.

Deploy to Salesforce

Usage

In the flow, make sure to pay attention to the field types for the input fields of the Apex action. For Example, the “To Addresses” input takes a list of input addresses, instead of just one email address.

The flow action references each of the attributes of the Single Email Message Apex class, so for more descriptions on the field names, reference these pages

Field Name Field Type
BCC Addresses String List
CC Addresses String List
Character Set String
Entity Attachment IDs Id List
HTML Body String
In Reply To EmailMessage ID Id
Email Opt Out Policy String
Plain Text Body String
Organization-wide Email Address ID Id
References Id
Subject String
Target Object ID Id
Email Template ID Id
To Addresses List String List
Treat Bodies as Template? Boolean
Treat Target Object As Recipient? Boolean
What ID Id
BCC Sender Receives Copy Boolean
Reply To Address String
Save As Activity? Boolean
Sender Display Name String
Use Signature Boolean

Adding the Apex Action to your flow

Example Flow setup

Flow Example

Troubleshooting