How to Send an Email with Embedded Image in Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone Jonathan Silver here again for this video what I'd like to do is Showcase how we can embed an image inside of an email sent with power automate so let's Jump Right In [Music] all right so for the first step of this flow is to go ahead and start it off with your trigger in this case I'm just going to use a manual trigger with this instant cloudflow just to show this part but of course this can be part of a larger process maybe an automated or cloudflow or schedule whatever you'd like to have the first part that we need to have within the actual process of embedding the image is to go ahead and get the image itself you need to have access to that image first so for our step here we can either go get that image in either one drive or SharePoint those are the easiest locations to go ahead and store them here in this case I'm going to choose get file content as the step and again you can do this in both OneDrive for business or in SharePoint even with SharePoint you can do get file content using path it's going to be the exact same step in this case it's just depending upon where you want to pull that data from for me I have mine in OneDrive then I'm going to go ahead and point to that file I'm going to go down the path and find it there and for me the file that I want to point to is just an image it's just a an image here of our new logo here at pragmatic works and the next step after we get the file content we want to go ahead and compose how we're going to convert this image into a string value so we're going to select new step and we're going to choose compose the compose data operation lets us do that so here in our inputs this is where we are going to use an expression to help set up this file itself so I'm going to go to expression and then we can use the expression for data URI the data URI expression what it allows us to do if I just select it here okay oh it goes all the way over there it Returns the data Returns the data URI of a value essentially it's going to allow us to convert this to the correct formatting that we need we're going to choose that and then in between our parentheses here go ahead and pass in the dynamic content of the file content itself that looks good go ahead and hit okay all right so now we're going to compose this essentially taking that into a string value to store the next action we have here is to create a variable in order to pass through that strip that string that we just established so we're going to go ahead and initialize variable all right here we go and for this variable I'm going to call this our VAR um logo blue because it is our blue logo that we're going to point to let's see yeah it is our blue one all right the type of this variable is going to be a string and the value that I'm going to pass through is going to be another expression now for this expression we are going to have to use the concat operator so go ahead and chart start with concat for this what we need to do is essentially combine our string of our HTML formatting in order to pass in this image to pass into the the email itself so we're going to start off with single quotes and we always build inside of the single quotes here okay and we're going to do a little bit HTML so we're going to do image source equals I'm just putting spaces in here for formatting you don't necessarily need to do that and then we need a double quote and then another single quote all right there it goes then you could put a comma so they're going to concatenate that piece with the outputs of our compose okay that's the next step here so we can go to our Dynamic content and we can put the outputs on the compose nearly there so we're starting with our image source in our HTML code then getting the outputs that are composed we have one more part here to finish off that HTML so put another comma so the next part of our string here and this is where we're going to start again with a single quote double quote okay and then Alt equals double quote double quote forward slash and finish out our little anchor there so got that all set everything should be there so we can then hit OK and again here is what we have so I'm going to hover over there so there it is we're going to concat with our image source with our outputs from the compose ending with alt to go ahead and finish that out there all right so now that we've created this variable to store how we can embed the image we can now add in our last step here to go ahead and send our email so new step send an email I'm going to choose send an email with Office 365 Outlook in this case I'll go ahead and send this to myself just for testing purposes and the subject is how does our new logo look and in the body what do you think right just some some Message In Here and Now what we can do is just simply pass in the variable that we've established to store the concatenated value so there it is and that's it all done there we could come in here and select the code view if you'd like to remove other parts here with the page and the breaks if you need or you can just leave it as such and then go ahead and save and test it and you're all set so let's go ahead and do that save and test and let's see what this email looks like all right the flow has run successfully so let's take a look at what it gives us and there it is so we now have our image embedded into that email just like that now we can add in other parts here within our HTML to make it smaller to make it larger within the window itself you could do a little bit more formatting along this way but that gets exactly what you want now we can have an image added in wherever we need inside of our email here with power automate thanks for joining me once again here taking a look at working with Microsoft's power automate in the cloud if you like this video and want more content from me and all those here at pragmatic works please make sure to go ahead and drop a like and hit that subscribe button below to get access to all of our new content as we put out every single week [Music] thank you
Info
Channel: Pragmatic Works
Views: 18,123
Rating: undefined out of 5
Keywords: power automate email, email image flow, email with picture power automate, power automate send email v2 image, adding image to Power automate, adding image in flow, assigning image to power automate variable, encoding image in power automate, power automate add image to email body, send an email v2 power automate, send jpg, send png, add jpg to email, add png to email, Pragmatic Works, Jonathon Silva, power automate send email with image, power automate embed image in email
Id: liM7IsLSztU
Channel Id: undefined
Length: 7min 27sec (447 seconds)
Published: Wed Jul 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.