Power Automate: Change the From in Emails

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone this is danielle and in today's video we're going to talk about power automate change the from in emails now we've all made emails before so and that's not the focus of this video but what you've noticed is when those emails do go out and especially if you're the owner of the email then your email address is from where all the emails are coming out from and that can be fine if it's a small group or if it's even a small department but what if it's a large department or what if it's across the entire company well that can make things a little confusing therefore in this video i'm going to talk about how you can change the from in the email address but first here's my [Music] intro [Music] so what i'm going to show you is how you can change the from in three email actions and here's the ones i'm talking about in this case i'm going to show you if you're using outlook email how do you go and change that if you're using mail then how do you go and change it and also using the sharepoint http and just to dive a little bit into each of those using outlook mail it actually requires another account and i'll show you that and over there in that other account you want to set up the send on behalf access and i'll show you that as well now using mail it's actually another action that's already available over there there's two kind of limitations one is you cannot change the header and i'll show you what the header is and the same thing it has a subscription text and you cannot change that either so kind of keep that in mind and then finally the using the sharepoint http http one of the things i want to clarify is that this is not the premier http connector this is still part of the sharepoint standard connector that you're using so you don't have to pay extra for it but that's the one i just want to clarify because sometimes people when they hear the word http and sharepoint that's got more licenses signal this is part of the standard one over there and i'll show you that but it does have a low code requirement all right so now that you understand the gist of this entire video blog let's jump into it all right so the first thing i'm going to do is i have a flow already created this flow is actually tied to a very simple sharepoint list over here and it all just works so what i'll do is let me just run through a quick demo and just to be safe i don't want to run it by myself because i'm the owner of this flow in fact as you can see over here this is the email i mean so this is the flow and i am the owner of the flow and the flow is very simple and very straightforward if you go in over here you can actually take a look then i mean a new item is created in sharepoint it's a very simple sharepoint site two things i've done is i've gone ahead and added the arrival date and the department departure date into compose because that's usually how the dates usually show up and then once i've put those over here i've gone ahead and created this two and the two is created by email which means whoever is the one who has submitted that request they are the ones who are getting the email and then it's just the subject that hey a new item has been submitted by in fact i'm going to change that new item to a new reservation has been submitted by first name last name do not reply to this automated email blah blah blah and so on and so forth that's the simple part that's not the emphasis of this email but i still wanted to show it to you now again just so i can clarify make sure i save it make sure i clarify i'm the owner of this email so i'm not going to be the one sending it i want to make this as realistic as possible so i have now logged into um logged into elijah over here elijah is another user in this company and now he is going to submit a request so here again for the sake of this demo i already had a really nice list over here with a customized form so that's what i'm going to use an example so elijah is now putting in a hotel reservation so i'm going to put in elijah christian address one two three main street boulevard um i'll say that as wes west end western jefferson state north carolina let's go with that all right five or three to one i want a single bed uh smoking non-smoking amount in cash and put that zero pets yes i am actually going to get a pet that's going to be a dog notes only one dog dog arrival date so i'm gonna arrive on monday which is on the 23rd and i'm going to depart on the 26th and everything looks good i'm gonna go and save it so a new entry house entry has gone ahead and put in and any second now i should get an email and i'm gonna wait over here because an email will come through and now what you know is why this is happening that flow that i showed you has kicked off and it is going to go ahead and send an email with all that information that i put in over here just as a friendly email notification that hey you went ahead and submitted this hotel reservation so there you go i got it now first thing you noticed the email came from daniel christian daniel christian which is the owner of that email which means he actually created that when i come in everything looks great the email came to elijah christian all the hotel information everything is there but just the thing is that it still came from this person daniel christian so that can cause a little bit of confusion sometimes people may not know that this is actually an automated email they might actually be confused that this is an email that directly came from daniel it didn't come from an automated system over there so that can be one confusion and then thing which i mentioned is that if this is going across a large department large enterprise that can be a little confusing so what i'm going to do is now i'm going to show you the first technique which is using the outlook mail itself this is the outlook mail over here but how i can go ahead and modify it now requirements for modifying it over there is i can go ahead and use something called as send on behalf of and on behalf of means that i'm going to create another email like an automated email type of account whatever email account then i'm going to use that email account to send on behalf of daniel but first thing i got to do is i got to create that email so if you are a global admin then you can go ahead and do this otherwise you will have to either get a get in touch with the global admin to go ahead and create this exchange mailbox or if your company is big and it needs to be segregated then you have to put in a request for your exchange team whoever here's what needs to be done all right so if you are the exchange person or the global admin this is the step that you need to follow through all right so i'm coming in over here i'm coming in now into first users and i'm going to create a new user so i'm coming i'm going to create call this as automated hotel response all right just call that as automated response and i'll just call this as a hotel let's do the whole thing automated hotel response put that in that's my email address let me just create a password gone ahead and created a password system looks good i'll keep all of this as is and i do have to assign a license for this one so for this one i'm gonna just i have the only one i personally have spare is an e5 one but you can use whatever you want as long as it comes with an exchange online license that's that's the key thing all right so go ahead and do this and i'll finish it finish adding it and everything should be good and yep yeah you're good what i'll do is i'll also go ahead and just grab this email address over here just go ahead and grab that just in case i need to type that in and click on close and we should be done in fact i'll scroll down over here and there you go automated hotel response got it everything is good now it does take a few extra minutes for that to show up on the exchange side and why do i need to go there because that's where i go to go and set up the on behalf of so i come back over here and i'm going into the exchange on exchange site or this is the exchange online an exchange online first thing i got to do is i got to go to the mailboxes and on the mailboxes any second now i should show up over here now it usually takes about two to five minutes um that's what i've noticed in fact as i was doing a test by the time i created that mailbox or when we created an account it took a solid five minutes to show up over here what i'm going to do is i'm just going to wait patiently and i'll just fast forward through this there you go so it showed up automated hotel response that's the email address over there now when i go in over here i got to click on that and i got to go to mail delegation now in mail delegation i got to scroll down and just don't be confused because the one you want to do is send on behalf and here's what it means that the send on behalf permissions allows the delegate to send email on behalf of this mailbox and in this case since i am the owner of that email i am the one who are sending that email on this behalf so i'm selecting that i'm going to go ahead and add okay save everything looks good and we are done on the exchange site i'll go ahead and leave that as this all right so now let me come back to this email this flow that i created so i come over here and i'm going to select that edit it and i'm going to make a change but right on the trigger this is right away actually not on the trigger i'm going to come right down to the send an email and on the show advanced there is actually an option it says from and then send as but the reason i wanted to kind of prep you with the mailbox thing and everything because this is actually where it also confirms that requires send as or send behalf of so you have to do all of this don't try to trick the system by saying you know what i'm just going to put my name over there and see if it works it won't work you've got to put in that send on behalf of now hopefully if you already have an email which in an automated email or a general automated email system that you use for your flow fine go ahead and use that as well not a problem but this is where you got to go ahead and do it and you got to make sure that you are the delegatable person over there all right so now i'm going to come in i'll just go and type that in that's why i did the copy over there because it picked it up which is great other thing i can do just to be on the safe side is i can also put the reply to and i can put that over here that way for whatever reason it doesn't get replied to you who is the owner it always goes to the automated hotel response response so i'm going to go and save this now so it's saved and let's just pretend that i am elijah and i'm going to go ahead and submit another request and a reservation i'll do this for somebody else um inspector gadget address 541 um hixon boulevard or build city let's just put it as dallas state texas one two three four five i am going to use a double bed smoking non-smoking cash zero pet inspector gadget is going to get his guinea pig notes um need um more power outlets arrival i'm going to put that already with that again that date departure and we're good saving it and it has gone through a new entry came in and any section any second now that email should come out over here but there'll be a little change just to recap this one over here the first one that i created without making that change it came from daniel christian over here see that and then it also everything was good but it came from daniel christian now see what's gonna happen ah so it came in did you see that that looks a lot nicer and it actually just by visually seeing it you know that this didn't come from daniel christian this came from an automated hotel response and an automated email system and just psychologically it just sits well with people over here but let me go and click on it and i click on it i see something i says well daniel christian on behalf of automated huddle responses like okay okay this is still not too bad and for some of you if this is good enough you can just stop the video right now and you know go ahead and make that change in your system and you're all good but you i'll if you want if you're interested to see what the other two styles are fine go ahead and stay along with that as well and that is it the good thing is in the email right over there in the subject it says that hey this is an automated email and then everything else is the exact same way and you can see the difference everything is the exact same way except this one shows automated hotel response and that actually shows me who was the owner but let's take it now to the next level in the next level there is actually a using mail option available so what i'm going to do now is i'm going to go back into as a creator and what i'll do is let me go ahead and disable this one and i'll go ahead and turn that off and i already have another one over here let me turn that on and let's take a look at that so this one's trigger is still the same when an item is created and over here i have done nothing see no advanced settings whatsoever everything else is also the same arrival date i've gotten the arrival date from the sharepoint columns arrival date over here but this is new and just to show you what it is if you come and choose a new action and if you do send an email see it's not that outlook email it's not this one it is send an email notification version three that's the one that you have to do and don't worry this is not a premiere license required that's that's basically what it is all right so that you see that's what i used over there that's how i got it and then here basically the body and everything is the exact same created by a new reservation has been made basically all of this is the exact 100 same only thing i did is i in the new step i went down and got a new action that action name is send an email notification version three that's the only difference all right now what i'm going to do is i'll just make sure that this one is actually on it is turned on and let's now go ahead and actually run in fact you might have even send it send me an email automatically sometimes flow tends to do that so let's just go see it actually already did great so we can just go see see what it did it went ahead and sent me those emails all over again because sometimes flow in the back end just kind of lingers a little bit it's like i'm just going to wait i'm going to wait oh i did see the sharepoint went ahead and sent this new alert so it just went and send it out but that's great the exact same thing would happen to you as well um and if you you know for just for the sake of example i would have actually put in a new entry and you would have gotten this email alert but here it is all right here's the email alert and it said a new uh reservation came in but here's the beauty there is no send on behalf of what it does is it just said microsoft power apps and power automate and the email address is microsoft powerapps.com so no sign whatsoever that it came from the owner which was daniel christian no sign whatsoever it says who it went to and then everything else is the same now when i was talking about the the things on the um uh you know the two differences which are there on the using mail the only two differences i have no control on changing this so i can't change it to you know automated system i send this or your company name has send this none of that this is it it can only say microsoft power apps and power automate that's all it does and it's got this little confusing uh footer over here it says if you want to unsubscribe from these emails please use this form if you click on it it actually is in power form and it gives you this confusing option over here and i'm a little concerned about using this because what if it just takes off my subscription for all the email notifications i don't want that confusion so i'm gonna not select this whatsoever i don't want to test it just want to take this off yeah we'll let you go ahead and test it if you want but i don't have the option to go ahead and actually take this out over here again if this is something that is fine for you so you know daniel this is good enough i'm ready to go ahead and start using this fine you can stop right here and move forward and you're good but if you are still a little concerned about changing this in a naming over here and you're a little theory of this one over here stick around and now let's take a look at the last option which is using the sharepoint http so i'm going to go back over here now hopefully the sharepoint http doesn't kick off so let me go back as me as the maker i'm going to come in i'm going to turn this one off i'm going to go to the flow and what i'll do is actually this one i'll create it for the first time right so we're going to come in now here to new and in new i'm going to create one from blank and the blank i'll go ahead and skip this and i'll say the power automate change the from email demo the trigger is going to be from sharepoint when a new item is created so that's my trigger there let me go and pick up my sharepoint list and i am doing the trigger from the sharepoint list yours could be anything else it could be from cds over there it could be from any data source you know just make sure that your trigger option is available over here um so where is that yeah all right so we took care of that in this case i don't have to make any changes in the advanced options i do have to go ahead and get that arrival date and um departure date for some reason it just doesn't like when i directly add that into the email so i gotta go ahead and get it put it in the compose over there and then reference that compose don't know why it doesn't like it but that's the way it is i'm just gonna stick with it all right get the departure as well nope come on daniel there get it departure now is the final step and that final step is i'm going to go to the sharepoint and grab the sharepoint here i'm going to use this option just make sure i see it all the way up there i'm going to do the send and http request to sharepoint that's the one that i'm going to do over here by default i got to go ahead and grab that site again so that's my poc site and then after that here are the steps that we've got to do so in the steps that's pretty simple and straightforward what i got to first do is i've got to use the method and the method is actually not gonna be get even though it looks and sounds feels like i'm just getting information you still gotta put in a post away okay so that's what it is a post and then here is the first uri that you gotta put in and the uri i've already gone ahead and pasted that in the description down there so if you do you know make sure that you don't have any typos just go ahead and copy it and paste it because that's what i'm doing but basically the uri this is a api call that you're doing and the api for sharepoint online is very specific that's why that is the api for sp.utilities.utility.send email that's the call that you're doing right because this is sharepoint sending it as an email now we are actually telling sharepoint to send an email ah see that if you think about it that should not make sense that initially said daniel i'm just getting information but no you're telling sharepoint to send an email through sharepoint and put in this information that's why that's a post over here got it and then we're moving along and over here in the headers i got to put in accept and then in the accept piece i got to put in this section over here again this is more for us to communicate with the sharepoint api in a secure and authenticated fashion as well that's what you've got to put in this json application for old data and you know not non-metadata but you've got to do this you just can't get around it you've got to do this but it's a very simple and low code so you've gone ahead and taken care of the main you know the header piece of it so to speak you've gone ahead and taken that now comes the body which is what all do you want sharepoint to send on your behalf and for that you've got a very simple framework that you've got to put in i'm going ahead and putting that in right now you can take a look at it so basically i'm going and opening a curly brackets and calls it closing the curly brackets and then i'm going again grabbing all the properties which are the properties do you want sharepoint to send on sharepoint's behalf so you got to say that these are the properties that's why you start with the properties now i want to pause and say that it is imperative it's absolutely imperative that you do it this way because anytime you try to do something by say you know i skipped this one um double quotes or i spilled you know skip this one single um apostrophe or whatever you miss that and it'll start giving you errors so it's very critical that you follow this over here now granted you can skip spaces and this and that but this this function uh is you know this format is it's very important that you go ahead and do that all right so now the first thing i'm going to do is the two inside that i'm going to kind of zoom in a little bit even for me coming in here and inside the two i'm going to come in and i'm going to go one behind see because it's there's already the comma i want to stay on the left side of the comma and now when i do that i get my i'm going to send it to and it's going to go to the created by email i could even put in just the first name or the last name but i'm going to do it by the created by email so created by that's it display name over here and i got to put in make sure that it goes this way open brackets comma apostrophe close brackets that's basically what it is now here's the interesting thing that i've noticed over here is only in the two does it actually take these attributes from here for some reason that's only how it works is all these attributes that you see it only works in the two in the subject in the body you've either got to put it in a compose variable um or you i mean the variable or in a compose statement that's the only way that it works so what i'm going to do i'm going to first go and save this over here and i got to start grabbing all that stuff so i've already got the arrival date i've got the departure date but i want to also put in things such as is it a single bed or a double bed smoking non-smoking you know stuff like that so that's that's what i'm going to also grab the customer name so i'll do actually two ways i'm going to use a variable and then also continue with the composed one and the reason i'm putting this variation over here is because you might already have a flow which has got you know variables over there and now you want to test this i was like ah there is actually a way i can send it from the system so i'm just going to remove that little piece from my flow and that's what i'm trying to do is i'm creating these variables uh this you know giving you these different options for your sake over there so in the variable i'm going to come in and i want to start creating these variables and i'm going to initialize a variable in this variable i'll actually call that as i already got the arrival and the departure i'm going to call this as single or double this will be a string and the value for this one is going to be coming in i'm going to go grab single r double got that i'm going to initialize this and call that as single or double next i'm going to also call this as smoking or non-smoking call that as variable i'm going to go ahead and initialize it um no smoking again this will also be string go ahead and grab that from here and this is smoking or non-smoking smoking value change that name all right so go ahead and take care of that now i'm going to go ahead and put that in over here i got to be very very careful so first things let's go ahead and actually start adding some subject and start adding some information so in the subject right here i'm going to make sure i put that in correctly i'm going to open the single quote and close it perfect i'm going to say a new reservation [Music] has been submitted by and here i can actually put in i haven't done that let me go and do that as well put that in and i'm going to call that as let's do another variable just for grins and giggles and i'll call that as initialize and i'm going to call this as customer name i'm showing you why i'm saying it that way again to show as a good example and in this variable itself i'm going to put in first name space last name and change the variable name again um customer name bar all right simple way again just to do some variations to show that this this combination works and you might already have this therefore i'm making it easier for you so it has been submitted by we're back over here inside and i've put in that customer name okay so it went ahead and took it and we are good now in the body i want to kind of replicate what i have in those other emails remember the first there was a top uh in the first section of the body there was a do not reply to this automated email so it's kind of stern way i want to do that as well now over here there's a little bit of that http um html code that you gotta be familiar with remember there's this new website called w3schools.com over there there's nice html training things over there so if you're familiar with html ignore what i just said move forward over here but if you're new to html go check out w3schools.com and i'll put that link below over here all right um so here we've already opened that single quote and closed it so i'm going to decide to start at the next line and i will do a first i want to put bold bold okay and in the bold i'm going to say go to start with some one two three three hashtags that says do not do not reply to this automated email and then one two three hashtag closing the bold all right and then i'm gonna put this uh br for break and again this may sound a look a little different it's like daniel you've never even opened the break over here why are you just closing it that's just the way this code for this body works right so just take my word for it and if you want to go ahead and test it and try something else fine just don't do that because normally i know i know in html you don't have to put this back closing flash but that's the way it requires over here so just do it did that and then i'm going to you know did the two um over here i'm going to say alphatel reservation was submitted by and here i'll go ahead and get that same one customer name dot and i'm going to come back over here click on it dot here are the details um and again another break and so arrival date i'm going to start typing the other ones departure date single or double yeah singular double bed and then finally go scroll down a little bit and here is smoking or non smoking all right so now i've done all of that come over here first one is the arrival dates i'm going to go ahead and grab the arrival date perfect got that over here departure perfect single or double single or double and then smoking or non-smoking that was this one where you're smoking or non-smoking and save now it looks a lot simple because i've gone ahead and done it i've done this many times so it makes it easier for me to do it but i'm look i'm not saying that might happen to you but it's chances that you might have mixed a little bit of text here and there and the first few times you run it you might get a few errors 99.99 of the time your flow's failing is right over here so it's absolutely imperative that you forward this technique that i've shown you over here and that's basically how it will work so what i want to do is i'm going to come back over here and just make sure that because i got a few other flows which i was you know building this gone ahead and closed them all perfect so that's the only one that's active let's do it again let me go ahead and now jump in as elijah and like submit another request and i'm going to submit this one for uh let's say for iron man 123 south boulevard street uh he lives in california got that i remember that i forgot this place let's do something else five four three two one zero i'm sure he's got some dogs um need uh a very very large balcony so you can just fly off from there cool there okay there there all right so good let's go ahead and save it new entry was created now let's just wait for me to go and uncheck these ones that way let me wait so let's see what happens remember we went ahead and now this is how sharepoint is going to make an http call and from sharepoint it is going to come so i'm guessing that somewhere over here we will see sharepoint reference over there and a new entry has been made ah there did you see that well a new mail came in but daniel where did this poc come from well the poc came from the actual sharepoint site name if you come over here you see we were so focused on the list but the site name the sharepoint site name ccpoc over here you see poc that's where the sharepoint site name came from now for some of us sharepoint people this is very normal oh i've seen this back from the sharepoint server days this is normal and this is actually very close to ohm this is going to help us feel that this is coming from sharepoint the other thing that i want you to focus on is see the poc no dash deploy at sharepointonline.com so this didn't come from on behalf of the you know owner it didn't come from the powerapps and power automate it came straight from sharepoint online because remember we made that http call with the post over there and then everything else is the same hotel reservation was made all this information over here that was all the same so you see that that most of it we were able to keep it very similar but it all depends the big changes is from whom it's coming so hopefully this video was helpful to you and as a quick recap i was able to show you how we can change the from in all the emails that are sent over there so it no longer just shows you're the one who sent it because you're the owner it actually shows that it came from an automated system which is the flow i showed you three ways to do it there was the actual outlook mail the regular outlook mail that you actually never used but i was able to go in the advanced sections and change some stuff over there the second technique was to use the mail not the outlook mail but just the mail action over there and over there there was a few hiccups over there you can't change the header it always says from powerapps and power automate and then there was the footer with that link over there can't change that but if you're fine with it um then you know definitely move forward with that and then the third one was if this is a flow or a the sharepoint is the backend data source then use that http call the only change over there is it comes directly from sharepoint and we'll have the site name on the on the top over there but for the sharepoint people it's very comfortable and not a problem so hopefully this was helpful and as always keep power automating
Info
Channel: Daniel Christian
Views: 7,365
Rating: 4.9055119 out of 5
Keywords: Power Automate: Change the From in Emails, Daniel Christian MVP, power automate, power automate tutorial, microsoft flow, microsoft power automate, Outlook Send an email action, Power Automate Mail action, Send an HTTP request to SharePoint, Power Automate Send an HTTP request to SharePoint, power automate business process flows, microsoft flow sharepoint, power automate how to, microsoft flow business process flow, microsoft flow email, power automate sharepoint
Id: kUkb_DUgOXw
Channel Id: undefined
Length: 32min 13sec (1933 seconds)
Published: Mon Nov 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.