In Salesforce, we usually create new Lead records from the Lead object. We also have a Web-to-Lead feature, which lets us put an HTML form on a website so external people can submit their details, and those details get saved as Leads in Salesforce.
For the Case object, Salesforce provides a feature called Email-to-Case, which automatically creates a Case record from an email sent to a specific address.
However, to create a lead form email, we don’t have a feature of this type in Salesforce. For that, I have created a Salesforce flow to create a lead from an email.
In this tutorial, I will explain how to create a lead record from an email using Salesforce Flow. Whenever an external user sends an email with lead details, a lead record will be created in the lead object.
Features: Create Records From Web and Email in Salesforce
Below, I will explain which Salesforce features we can use to create Lead and Case records, and how we can also build a custom process to create leads from emails using Salesforce Flow.
- Web-to-Lead: In Salesforce, web-to-lead is a feature that allows the user to capture lead information directly from the Website and automatically create new leads in Salesforce.
- Web-to-Case: This feature lets customers send support requests through a web form on the company’s website. When they submit the form, Salesforce automatically creates a case for them.
- Email-to-Case: This feature in Salesforce allows users to capture Case information directly from an Email and automatically create new leads in Salesforce.
- Email-to-Lead: We don’t have an email-to-lead feature in the Salesforce Org. We will create an automation that enables users to generate leads by sending an email to a specific address.
Create Lead From Email Using Salesforce Flow
Below, I will explain how to achieve Email-to-Lead using Salesforce Flow, since Salesforce does not provide this feature by default.
First, we will create a case through an email (Email-to-Case). Then, using the case record, we will map the case fields with the lead fields and delete the case record.
Before creating a flow, we need to set up Email-to-Case so that external users can create a case record from email.
- Click on the Setup. -> Home Page. -> In the Quick Find Box, Search for Flows. You will see an option under Process Automation. -> Click on Flows. In the flows setup window, click on the button New Flow -> Start From Scratch -> select the Record Trigger Flow -> Next.
- In the start element, we have to select the object on which we want to perform automation. In our scenario, the Case is a triggering object. In Configure Trigger, I have selected “A Record is Created” because when a case is created from an email, the flow should trigger.

- Next, we set entry conditions. In the Condition Requirement option, we select All Conditions Are Met (AND) because the following conditions must meet the criteria.
- Here, the flow has to trigger only when the Case Origin = Lead and Case Priority = Medium.
- We are going to create a Lead record from email, so we have to select Optimize the Flow for Action and Related Records.

- Next, we need to retrieve the User details to assign a user to the lead record that we will create. To do this, we need to select the Get Records element by clicking on ‘+ Add Element‘ and enter a Label and API Name into it.In the Object field, select the User object. Then add the condition as follows:
- User ID (From User object) — Equals – $Record>User>User Id(From Current record flow).
- After this, leave the other fields as they are and click on the Done button.
- Now, we need to assign a Case Record Field with Lead Record Fields. To do this, add a Create Record element and enter a Label and API Name into it.
- So here, we need to select Lead in the Object field. Moving on to Email-to-Lead, let’s understand how Email-to-Case captures the data from email and stores it in the case record.
| Leads Field Name | <- Case Fields |
| Company | Case Subject |
| Description | Case Description |
| Web Email | |
| LastName | Web Name |
| Lead Source | Email(Picklist Value) |
| OwnerId | From(Get Record) UserId |
- Next, select a record to create and use separate resources and literal values to set its fields. Then click on the Done button.

- In the above step, the Lead record will be created using Case fields. After creating the lead record, we have to delete the Case record because it contains different values than the case fields.
- For that, add Delete Element by clicking on the + Add Element icon and enter the Label and API Name.
- Then, use the IDs stored in the record variable or record collection variable to find records to delete. You will see the option Triggering Case collection.
- After creating the lead record, this delete element will delete the case record.

- After setting up all labels and conditions, click the Save button to save the flow. For that, we need to enter the Flow Label. The API Name will automatically populate as we click the text box.
- After saving the flow, click on the Debug button. Then click on the Activate button.

- After activating the flow, let’s check how it is working. To do this, we need to send an email to the email address we have set up as a Routing Email in the Email-to-Case.
- Here, you can see I have entered the recipient email as the routing email, subject, body, and send email.

- Now, the Email that we sent will create a Case, and using case fields, we have created a lead; you can see below that the Lead record has been successfully created with the fields that we have mapped in the created record element.

This is how we can use the Email-to-Lead feature by using Salesforce Flow to create Lead records through Email.
Conclusion
I hope you have gained an understanding of how to create Lead records from email and implement the email-to-case feature in Salesforce.
In this article, we have seen features for creating Cases and Leads. We have also seen how to use the Email-to-Lead feature by using Salesforce Flow to create lead records through Email.
You may like to read:
- How to Use Decision Element in Salesforce Flow
- How to Send List Email from Campaign in Salesforce
- Salesforce Email Templates
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.