 Hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate a screen flow scenario. Let's understand the scenario which I'm going to demonstrate. So I will be sending an email through email action. So the requirement is like whenever a contact record is created. So on contact, we have email field. So if that email field is populated, then we need to send the welcome email to that entered email. So I'm jumping to developer edition org and here I'm going to create a screen flow. So to screen we will be receiving contact information and then when contact record will be created so after that we will be sending an email. So first of all, I'm going to create a screen. So I'm labeling it as contact information. Then here I'm going to select text component. So it is first name. One more text component it will receive last name. So it is required as well. First name I'm making required one more text. And this I'm labeling it as email and it is also required. Right. So contact first name contact last name and contact email we are going to receive from the user. Now I clicked on done. So I'm going to launch this flow from account record. So if I want to link this contact with account record. So I need to use a variable that is record ID data type will be text and available for input. Okay, so now I'm going to use create record elements. So I'm labeling it as create contact. We need to create one contact then we need to use separate resources and literals then selecting object as contact, then I'm going to map first name. So this first name is a field and this first name is a screen component. Then I'm mapping last name with last name. And then I'm going to map email with email. Right so this way contact information will be stored. Now if I want to link it with account. So I need to populate this account ID with record ID. So this way all the information I have provided so that contact record will be created and it will be linked with the account. Now I'm clicking on done. After that I'm going to select this action. And here I'm going to search for send email. Right. So this is sent email action. Now here we need to create a body we need to create a subject. So I'm creating a body as new resource and selecting text template. So API name is email body and here I'm going to create the body. Let's say hi and then I'm picking first name as well. Welcome to Salesforce ecosystem. So this is my email body. So I clicked on done so it is available here. Now I need to create a subject as well. So again I'm selecting text template. Email subject is API name plain text so subject will be welcome to Salesforce and clicked on done. So this way email body and subjects are available. Now here I need to provide the email addresses and that too as a collection, or we have another option as comma separated values. So I'm going to create a collection. So I'm creating. Okay, so let me just disable it and I'm just clicking on done. So I'm going to create a resource from here. I'm going to create a variable API name is email addresses. Data type is text and allow multiple values so that it will become a collection. Now, what I need to do before this email send to email action, I just need to use assignment. I need to assign email to that collection variable so I'm selecting this collection variable email addresses, then from here I'm choosing add and the email that we received on screen. So I'm adding that into this collection variable and clicking on done. Now if I open this action so here I can choose that collection email addresses. So this way if you have any other email address like like if you have any other email address that you want to add. So you can simply click on add and you can maybe you can type email address directly. So let's say I'm typing this email address. So it will be added directly. So that collection is having two email addresses now one that will be provided when that flow will be running through the screen, we will be receiving an email ID and one email ID I added manually. Right, so you can add any number of email IDs to this collection variable. Now I'm just clicking on save, naming it as send email to contact and clicking on save activating it. So this flow actually I'm going to run through quick action I will be placing a button and through that button I will be launching this flow. So I'm going to create a button and clicking on new action. So selecting a flow. Send email to contact and clicking on save. So button is created now I'm moving back, moving to page layout opening the page layout. Now here I'm selecting mobile and lighting action and going to add that action so I'm searching send email to contact so here it is so I am just dragging and dropping it here, clicking on save. Right, so in many of the lessons I just placed flow on the record page, let's say if I open any record. So I just placed the flow on the record page but this this example I am demonstrating through button click. So don't think like we need to every time launch this flow through button you can just place that flow on the record page as well. So I'm just clicking here so you can see this account is having zero contacts. So I'm just launching it so here I can provide the first name. So con 123 last name on one to one and here I need to provide the email ID so I am providing this email ID and clicking on next. You can see the contact is created it is having first name last name here so both are concatenated and are available under name and here you can see email ID is also available. If I go to this email so here you can see I received one email welcome to Salesforce, and here my first name is available as I selected in the body, and this message is available. Okay, so this way. Like, I hope you understood how we can use that send email action to send the emails to users. So whatever resources I created those are available here right so this list is available you can just check if you want to modify any of the resource.