---
title: Actionable AUTO_EMAIL
description: "Use your Salesforce email templates to sent out an email with your document attached. [AutoEmail Actionable](https://www.youtube.com/embed/adY71NhmclM?si=Auw6ItpmxdDjiQGF) ##### Example 1: Let's say, you want to send an email with your document to Opportunity's Primary Contact. Primary contact is a custom field…"
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-packs/actionable-auto_email/"
updated: "2025-05-30"
category: PDF BUTLER PACKS
---

# Actionable AUTO_EMAIL

Use your Salesforce email templates to sent out an email with your document attached.

[AutoEmail Actionable](https://www.youtube.com/embed/adY71NhmclM?si=Auw6ItpmxdDjiQGF)

##### Example 1:

Let's say, you want to send an email with your document to Opportunity's Primary Contact. Primary contact is a custom field on Opportunity.

###### Org Wide Address:

Create an Organization wide address in your salesforce org.

###### Email Template:

Create a classic email template or lightning template with the email body according to your requirement.
 ![Autoemail Actionable pic5](https://pdfbutler.com/wp-content/uploads/2023/08/Autoemail-Actionable-pic5.png)

###### Doc Config:

You might already have a Quote doc config which will generate the Quote PDF. If not, you can refer the articles in the Academy on how to generate a document using PDF Butler.

###### PDF Butler Pack:

For the Doc Config, create a PDF Butler Pack.
 ![Autoemail Actionable pic1](https://pdfbutler.com/wp-content/uploads/2023/08/Autoemail-Actionable-pic1.png)

###### Data Sources

1. Create a Data Source to fetch the Primary contact fields from Opportunity as shown below.
    ![Autoemail Actionable pic2](https://pdfbutler.com/wp-content/uploads/2023/08/Autoemail-Actionable-pic2.png)
2. Create a Data Source which will fetch Organization wide address data as shown below.
    ![Autoemail Actionable pic3](https://pdfbutler.com/wp-content/uploads/2023/08/Autoemail-Actionable-pic3.png)

###### Actionable Record:

1. Create an Actionable record of Type Auto Email as shown below for your pack record. The class should be "cadmus_core.Actionable_AutoEmail". Make sure to Activate the record.
2. Also, copy the Email template unique name(not Name) in place of Email Template Unique Name field in the Actionable record.
3. Map Email Target object field with the Contact Data source you have created in previous steps. Map Email Target Object field with API Name of the Id field from Contact Data Source.
4. Map Org Wide Email Address Data Source field with the org wide address Data source which you have create in previous step and Org Wide Email Address Display Name field with the field API Name you want to use for the Display name of from Email Address in your email. Then save the Actionable record and it should be as shown below.
    ![Autoemail Actionable pic4](https://pdfbutler.com/wp-content/uploads/2023/08/Autoemail-Actionable-pic4.png) 

###### Edit Opportunity page:

Open any opportunity and Edit the page. Drag the PDF Butler Convert Component. Copy the PDF Butler pack record id and map it in the Pack Id field of the Component. Give Pack name accordingly and Save the page. Go back to the opportunity and generate the PDF. An email will be send to the Opportunity's primary contact automatically.

###### Lighting Email Template

You can also use Lighting Email Templates.

[AutoEmail Actionable - Lightning Email Template](https://www.youtube.com/embed/n6JpG8Ci-v0?si=Ti8Jp8d3Iz16Zbhb)

And the Lighting Email Templates support multi-language / multi-locale.

[AutoEmail Actionable - Lightning Emails By Language or Locale](https://www.youtube.com/embed/ftUFhzPOHeA?si=PoJ9utWXg6LtWb3O)

**Set Reply To:**

- Dynamic Reply To: Add a DataSource to the "Reply To" field. This DataSource must return a User and the SOQL **must** include fields:
  - Id
  - Name
  - Email
  - as an Example: SELECT Id, Email, Name FROM User WHERE Id IN (SELECT OwnerId FROM Opportunity WHERE Id = :recordId)
- Static Reply To: provide an Email Address that is used when the receiver wants to reply to the email

![](https://pdfbutler.com/wp-content/uploads/2023/08/ReplyTo.png)
