{"id":802,"date":"2024-01-22T05:17:18","date_gmt":"2024-01-22T05:17:18","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=802"},"modified":"2024-04-26T10:13:57","modified_gmt":"2024-04-26T10:13:57","slug":"extracting-news-post-images-in-emails-with-power-automate-flow","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/extracting-news-post-images-in-emails-with-power-automate-flow\/","title":{"rendered":"Extracting News Post Images in Emails with Power Automate Flow"},"content":{"rendered":"<p>This solution is used to display images of news banner images in Outlook desktop when sending news communication over email.<\/p>\n<p>There are six ways to upload images for a news banner:<\/p>\n<ol>\n<li>Stock Images: When uploading images using stock images, we can view them in the Outlook web version and desktop version without any changes.<\/li>\n<li>Web Search: When uploading images using web search, they can be seen in the Outlook web version, but these images do not show in the desktop version.<\/li>\n<li>One Drive: When uploading images using OneDrive, only the user with access to that specific OneDrive can see the image in the Outlook web version and desktop version.<\/li>\n<li>Site: When uploading images from the SharePoint site, they can be seen in the Outlook web version, but these images are not displayed in the desktop version.<\/li>\n<li>Upload: When uploading images from the desktop, they can be seen in the Outlook web version, but these images do not display in the desktop version.<\/li>\n<li>From a Link: When uploading images using a link, if the image link is copied from a running site, the image can be seen in the Outlook web version, but it does not show in the desktop version. If the image link is copied from another SharePoint site, the image cannot be seen in both the Outlook web version and the desktop version.<\/li>\n<\/ol>\n<p>These are steps to see the images in Outlook Desktop.<\/p>\n<p><strong>Step 1<\/strong>: Select the trigger \u201cGet files (properties only)\u201d, then choose the SharePoint site address and library name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-804 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG-01-5.webp\" alt=\"img-01\" width=\"600\" height=\"276\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG-01-5.webp 600w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG-01-5-300x138.webp 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>Step 2<\/strong>: Then added the \u201cCompose\u201d action. Add the Banner Image URL in the compose inputs. Once the banner image URL compose action is added, it will automatically add the apply to each action.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-805 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG02-4.webp\" alt=\"img-02\" width=\"633\" height=\"235\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG02-4.webp 633w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG02-4-300x111.webp 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/p>\n<p><strong>Step 3<\/strong>: Then added another \u201cCompose\u201d action. Input the output from the previous compose action with the \u2018decodeUriComponent\u2019 expression in the compose input field.<\/p>\n<p>Decode URI Component\u201d in Power Automate reverses URL encoding, converting encoded URI components back to their original human-readable form for accurate data interpretation or manipulation within the flow.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-806 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG03-4.webp\" alt=\"img-03\" width=\"598\" height=\"100\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG03-4.webp 598w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG03-4-300x50.webp 300w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/p>\n<pre class=\"php\"> decodeUriComponent(outputs('BannerImageURL'))\r\n<\/pre>\n<p>Step 4: Then added another \u201cCompose\u201d action. Input the output from the compose action (BannerImageURL ) with the \u2018uriPathAndQuery\u2019 expression in the compose input field.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-825 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG04-4.webp\" alt=\"img-04\" width=\"603\" height=\"105\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG04-4.webp 603w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG04-4-300x52.webp 300w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><\/p>\n<p>Value of the above action:<\/p>\n<pre class=\"php\">uriPathAndQuery(outputs('BannerImageURL')<\/pre>\n<p>Step 5: Select the \u2018Send HTTP request to SharePoint\u2019 action.<\/p>\n<ol>\n<li>Add the site address<\/li>\n<li>Add the method as a GET<\/li>\n<li>In the URI, add the substring expression with the output of (URIPathAndQuery) composed action.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-828 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG05-6.webp\" alt=\"img-05\" width=\"602\" height=\"273\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG05-6.webp 602w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG05-6-300x136.webp 300w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>Value of the above action:<\/p>\n<pre class=\"php\">substring(outputs('URIPathAndQuery'),1)<\/pre>\n<p>Step 6: Then added another \u201cCompose\u201d action. In the input add body of the \u201cSend an HTTP request to SharePoint\u201d action.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-830 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG06-5.webp\" alt=\"img-06\" width=\"600\" height=\"103\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG06-5.webp 600w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG06-5-300x52.webp 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>Step 7<\/strong>: Then added another \u201cCompose\u201d action. In this compose we get the content type from the \u201cSend an HTTP request to SharePoint\u201d actions body.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-833 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG07-2.webp\" alt=\"img-07\" width=\"602\" height=\"99\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG07-2.webp 602w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG07-2-300x49.webp 300w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>Value of the above action:<\/p>\n<pre class=\"php\">outputs('Send_an_HTTP_request_to_SharePoint')?['body']['$content-type']<\/pre>\n<p><strong>Step 8<\/strong>: Then added another \u201cCompose\u201d action. In this compose we get the content from the \u201cSend an HTTP request to SharePoint\u201d actions body.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-836 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG08-1.webp\" alt=\"img-08\" width=\"604\" height=\"105\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG08-1.webp 604w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG08-1-300x52.webp 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/p>\n<p>Value of the above action:<\/p>\n<pre class=\"php\">outputs('Send_an_HTTP_request_to_SharePoint')?['body']['$content']<\/pre>\n<p>Step 9: Then added another \u201cCompose\u201d action. After the data add output of (\u201cCompose-ContentType\u201d) and after base64 add output of (\u201cCompose-Content\u201d) action.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-838 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG09-1.webp\" alt=\"img-09\" width=\"600\" height=\"102\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG09-1.webp 600w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG09-1-300x51.webp 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>Step 10<\/strong>: Added action Send an email.<\/p>\n<p>Add the email address of the user<\/p>\n<p>Add subject<\/p>\n<p>Add the output of (\u201cCompose \u2013 ImageURL\u201d) in the body.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-839 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG10-1.webp\" alt=\"img-10\" width=\"602\" height=\"309\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG10-1.webp 602w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG10-1-300x154.webp 300w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>Output after running this flow<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-842 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG11.webp\" alt=\"img-11\" width=\"523\" height=\"386\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG11.webp 523w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG11-300x221.webp 300w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/p>\n<p><strong>Step 11<\/strong>: The setup of the flow concludes in just a few simple steps.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-844 size-full\" src=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG12.webp\" alt=\"img-12\" width=\"425\" height=\"806\" srcset=\"https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG12.webp 425w, https:\/\/poiseddevelopers.com\/reality-tech\/wp-content\/uploads\/2024\/03\/IMG12-158x300.webp 158w\" sizes=\"auto, (max-width: 425px) 100vw, 425px\" \/><\/p>\n<h4>Conclusion<\/h4>\n<p>Making news images show up properly in Outlook emails involves different ways of adding these pictures. However, each method affects how they appear on both the web and desktop versions differently. To see these images correctly in Outlook on your computer, we follow a step-by-step process.<\/p>\n<p>This includes things like converting web addresses to show the right images, asking SharePoint nicely for the pictures, and figuring out what type of images they are. Finally, we put all this together and sent an email with the image link so that it shows up the way we want in Outlook. It might sound technical, but with these steps, we ensure that the images appear just right when you open your email in Outlook.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This solution is used to display images of news banner images in Outlook desktop when sending news communication over email. There are six ways to upload images for a news banner: Stock Images: When uploading images using stock images, we can view them in the Outlook web version and desktop version without any changes. Web [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":803,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-automate"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=802"}],"version-history":[{"count":6,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/802\/revisions"}],"predecessor-version":[{"id":878,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/802\/revisions\/878"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/803"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}