Email to Flow in Salesforce

  1. Route Email from your Email Services to Autolaunched flow (you can route this to any object you want to)
  2. Pass all variables from inbound email (or email service) to Flow variables
  3. Convert email attachments to ContentVersion records variable (if your email attachments contain text attachments, it will be converted to pdf in ContentVersion)
  4. AutoReply to email sender with a HTML text(optional)
Image00 How EmailToFlow works?

Attributes

  1. Envelope_FromAddress
    type: Text / String
    description: The name that appears in the From field of the envelope, if any.
  2. Envelope_ToAddress
    type: Text / String
    description: The name that appears in the To field of the envelope, if any.
  3. Email_ToAddresses
    type: Text / String (Collection)
    description: The email address that appears in the To field.
  4. Email_FromName
    type: Text / String
    description: The name that appears in the From field, if any.
  5. Email_FromAddress
    type: Text / String
    description: The email address that appears in the From field.
  6. Email_CCAddresses
    type: Text / String (Collection)
    description: A list of carbon copy (CC) addresses, if any.
  7. Email_Subject
    type: Text / String
    description: The subject line of the email, if any.
  8. Email_ReplyTo
    type: Text / String
    description: The email address that appears in the reply-to header.
  9. Email_MessageId
    type: Text / String
    description: The Message-ID — the incoming email’s unique identifier.
  10. Email_References
    type: Text / String (Collection)
    description: The References field of the incoming email. Identifies an email thread. Contains a list of the parent emails’ References and message IDs, and possibly the In-Reply-To fields.
  11. Email_HTMLBody
    type: Text / String
    description: The HTML version of the email, if specified by the sender.
  12. Email_IsHTMLTruncated
    type: Boolean
    description: Indicates whether the HTML body text is truncated (true) or not (false)
  13. Email_TextBody
    type: Text / String
    description: The plain text version of the email, if specified by the sender.
  14. Email_IsTextBodyTruncated
    type: Boolean
    description: Indicates whether the plain body text is truncated (true) or not (false)
  15. Email_ContentVersion
    type: ContentVersion Records (Collection)
    description: Collection of converted email attachments (if attachment is text will be converted to pdf)
  1. AutoReplyMessage (optional)
    type: Text / String
    description: define whether the Inbound email needs to be auto replied or not. If null, won’t send autoreply. Support HTML Message
Image01 Go to setup -> search Email Services
Image02 Config new Email Service. Fill apex class to EmailToFlow class. Config all necessary fields based on your need. And click save
Image03 Click New Email Address to generate salesforce email
Image04 configure email address information based on your need. And click save
Image05 You’ll get a new autogenerated email address that you can use to route email to your flow. This email will be the email address that you’ll share to client when you want to use this
Image06 Open EmailToFlowController flow. You’ll see there are prepackaged variables in your flow and there’s router to test your new autogenerated email
Image07 If you send an email to the autogenerated email address with subject Test Email To Flow, the router will continue to the next path
Image08 If there’s attachments in the email, it will create a new file
Image09 set the AutoReplyMessage from Text Template
Image10 The sender of the email, will automatically receive a reply with body from the email template
Image11 Testing send email with Test Email To Flow subject
Image12 Autoreply Message from the email service (In the same email thread)

--

--

--

A dots connector. open for part time, Email: munawirrahman@gmail.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

My daughter was a creative genius, and then we bought her an iPhone Stephanie Gruner Buckley…

He was so heavy, and although the seat he was in was reclined, it

What is ADLM (Application Development Lifecycle Management)?

How to marry DevOps to vintage cars

“Android Data Binding & Binding Adapter: Namespace conventions for attributes

“attribute with android prefix is displayed as expected” but every thing else is replaced by “attribute with no prefix”.

7 best device farms to test your iOS and Android applications

Top 100 AWS Interview Questions

Digital Images are just Arrays.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Munawirrahman

Munawirrahman

A dots connector. open for part time, Email: munawirrahman@gmail.com

More from Medium

9 Best Salesforce AppExchange Applications for Travel, Transportation, and Hospitality

8 CTI Apps to Improve Call Quality and Increase Team Productivity

A man wearing a button-down shirt and sitting at a desk begins to make a call on his cell phone.

No Code Clearbit and Salesforce Integration

Salesforce Flow Builder