web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : c2MSIr3AiFgqwjlnaItnB7
Power Automate - Building Flows
Answered

How to parse an image URL into a HTML table and display the image file?

Like (0) ShareShare
ReportReport
Posted on 3 Dec 2020 11:38:51 by 27

I'm working on solution in Power Automate to send a customised news digest from SharePoint Online. For this I am using a HTML table where the news article title, description, link and thumbnail are added to the table and then sent via email.

 

The solution works fine when populating textual data (strings), such as the article's title and description. However, it does not seem to work when trying to parse in an image URL. As you can see in the screenshot below, I've attempted to use the <img> tag to display the thumbnail, but the HTML table is displaying this as literal raw text.

 

2020-12-03 11_35_09-Window.png

 

Is there a way I can make the HTML table parse the image URL as an image?

 

Thanks!

  • mason007 Profile Picture
    31 on 05 Sep 2023 at 16:42:23
    Re: How to parse an image URL into a HTML table and display the image file?

    I noticed it only happens when selecting the Stock Images in SharePoint.

  • mason007 Profile Picture
    31 on 05 Sep 2023 at 14:59:45
    Re: How to parse an image URL into a HTML table and display the image file?

    Hello,

     

    I used Vlad1 for the Filepath expression:

    substring(items('Apply_to_each')['Thumbnail'], indexOf(items('Apply_to_each')['Thumbnail'], '_layout')

     

    That was working until I selected an image from Outlook web images in our tenant, then I got this error on my flow:

    Unable to process template language expressions in action 'Filepath' inputs at line '0' and column '0': 'The template language function 'substring' parameter is out of range: 'start index' must be non-negative integer and should be less than the length of the string. Please see https://aka.ms/logicexpressions#substring for usage details.'.

     

    The first expression didn't work, giving me a access denied error:

     

    join(skip(split(items('Apply_to_each')['Thumbnail'], '/'), 3), '/')

     

    Any help you can provide is appreciated!

     

  • SJNBham Profile Picture
    51 on 21 Jul 2022 at 16:21:34
    Re: How to parse an image URL into a HTML table and display the image file?

    Hi @Anonymous - here's how we build the articles portion of our email. We use a variable to store the Link to Item value because we populate that with an alternate link if it's a repost news item. 

     

    SJNBham_0-1658420097266.png

     

    SJNBham_1-1658420154476.png

     

     

  • Community Power Platform Member Profile Picture
    on 19 Jul 2022 at 09:15:59
    Re: How to parse an image URL into a HTML table and display the image file?

    No it's not sensitive... it's just the test... 

    here is the HTML for the link that is not working 

    Rafia1_1-1658221975107.png

     and here is the link to my working example 

    Rafia1_2-1658222049911.png

     

     

  • Paulie78 Profile Picture
    8,416 Moderator on 19 Jul 2022 at 08:47:39
    Re: How to parse an image URL into a HTML table and display the image file?

    Show an example of the final HTML that is produced. If you view the source of the email in outlook does the content and HTML look correct?

     

    You can PM it to me if it is sensitive.

  • Community Power Platform Member Profile Picture
    on 19 Jul 2022 at 08:45:30
    Re: How to parse an image URL into a HTML table and display the image file?

    I tried that as well but not working 

  • Paulie78 Profile Picture
    8,416 Moderator on 19 Jul 2022 at 08:43:43
    Re: How to parse an image URL into a HTML table and display the image file?

    You do not have double quotes around the link. Your example would produce:

     

    <a href=https://....><p>....

    But you need

    <a href="https://..."><p>...

     

  • Community Power Platform Member Profile Picture
    on 19 Jul 2022 at 08:35:08
    Re: How to parse an image URL into a HTML table and display the image file?

    hi @Paulie78! thanks for your reply.. yes it is not taking the <a href =" " >text</a> in the URL... all my work is complete except this one... this is how I am passing my Link in the code 

    Rafia1_0-1658219599003.png

    and this is how I am setting my Select action 

    Rafia1_0-1658220111555.png

     

    is there anything I can add to get it resolved... your help would be highly appreciated 

  • Paulie78 Profile Picture
    8,416 Moderator on 19 Jul 2022 at 08:28:05
    Re: How to parse an image URL into a HTML table and display the image file?

    I don't think I understand the problem. The link in your screenshot looks ok, so is it changing before it gets delivered in the email?

  • Community Power Platform Member Profile Picture
    on 19 Jul 2022 at 07:55:29
    Re: How to parse an image URL into a HTML table and display the image file?

    hi @Paulie78  thanks for your help... the method helps me to resolve the image-related issue but now m facing a new problem... the 'Link to item' is not working, when I see the output of my select it's showing me the exact link to the post but appending to string variable is not adopting this...

     

    Rafia1_0-1658217067448.pngRafia1_1-1658217109997.png

    any help would be great!... I commented on your video as well but did not get any reply 😞

      

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete