function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alaric WimerAlaric Wimer 

Is there any way I can automatically create Leads from certain emails I receive?

I receive certain email that I always have to manually create leads from. These emails contain certain text in their subject line that helps to uniquely identify them.

 

For example, lets say every email I receive that contains "Test 1" or "Example 1" should be automatically turned into a lead.

 

Does anyone know how to go about this?

Maharajan CMaharajan C
Hi Alaric,

you can use the Salesforce Email Service and Messaging.InboundEmailHandler Apex Interface to attain this requirement.

Genereate the url from Salesforce Email Service then add that unique address in your email systems Auto Forwarding with your contain filters. 

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_email_inbound_using.htm
https://www.janbasktraining.com/blog/inbound-email-service-salesforce/
https://www.mstsolutions.com/technical/email-services-in-salesforce-email-to-object/
https://www.jitendrazaa.com/blog/salesforce/email-services-in-salesforce-with-simple-example/
http://amitsalesforce.blogspot.com/2016/11/apex-email-service-inboundemail-object.html

Thanks,
Maharajan.C