Skip to main content
예상 시간
주제
커뮤니티에 질문하기

Create a Preview Screen and Send Email Action

Build a Way to Preview Your Email

Now that you set up your email template, add a way to preview it before you send it. While you could set this email to send without a preview, you want to do a final check to make sure all the details are correct before it goes out.

To do this, add another Screen element.

  1. On the flow canvas, on the path after the Get Opportunity Get Records element, click Add Element.
  2. Select Screen in the Interaction section.
  3. In Screen Properties, enter these details:
    • Label: Email Preview
    • API Name: Email_Preview (This should automatically generate.)
    • Description: Shows the user a preview of the email before sending it.
    • Configure Header: Deselect Show Header.
    • Configure Footer:
      • Next or Finish Button: Use the standard label, the default
      • Previous Button: Hide Previous
      • Pause Button: Hide Pause
  1. Like on your first screen, use a Display Text component. Click and drag Display Text from Components onto the New Screen canvas. Enter these details:
    • API Name: displayEmailBody
    • Click in to the Insert a resource… search bar, then find and select the emailBody text template. This should add {!emailBody} to the text field.
    • Click into the text field after {!emailBody} and hit the return key twice.
    • Add this guidance to the text box: READY TO SEND THIS EMAIL? If so, click Next. If not, make adjustments to the Opportunity and Primary Contact records and refresh the page.
    • Optionally, you can style the guidance text so it doesn’t blend in with the email body. Make the guidance text bold.
      The New Screen interface with the Display Text component configured
  1. Click Done.

The new Screen element in the flow

Click Save in Flow Builder.

Create an Action to Send the Email

Now it’s time to send the email.

You’ll use the Action element. Salesforce provides several standard types of actions under the Action element, like submitting a record for approval, posting to Chatter, sending a survey, and sending an email.

  1. On the flow canvas, on the path after the Email Preview screen, click Add Element.
  2. Select Action in the Interaction group.
  3. In the Search… bar, search for email then select Send Email.
    Send Email in the Action search
  4. For Label, enter Send Email.
  5. For API Name, enter Send_Email (this text will generate automatically).
  6. For Description, enter This element sends the email.
  7. Enable Body and select the emailBody text template.
  8. Enable Subject and enter Thank you for your gift to No More Homelessness! You could also use values from a resource or variable, but let’s keep it simple for now.
  9. Enable Recipient Address List, then select Opportunity from Get Opportunity, then Primary Contact, then Email.
  10. Enable Rich-Text-Formatted Body and select True in the Global Constants section. This setting tells the Send Email action that you want to format the email body as rich text.
  11. Leave Sender Address toggled off to Not included. Without a Sender Address, the email will come from the address of the user running the flow. In your Trailhead Playground, that will be the email you use for Trailhead.
  12. Save the flow.
Note

You may get an error message about the format of the email address. You can ignore this for now.

The new Action element in the flow

Now you are set up to send the email. But hold on, because there are a few more elements to add in order to make the most of Salesforce and Nonprofit Success Pack (NPSP). When you send the email you also want to change a few fields on the opportunity record to show that the gift has been acknowledged. You dive into that in the next step.

To complete this step and move on, launch your Trailhead Playground and click Verify to check that your Email Action is configured properly. 

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기