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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Link to Sharepoint fil...
Power Automate
Answered

Link to Sharepoint file in a HTML table- replace expression doesn't work

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I am trying to build a flow that sends a table with selected columns that comprises a list of files based on a condition (a column that has either a yes or no input). 

It all works as intended but the only thing that I can't figure out is the link to the file in SharePoint comes out too long. I am trying to use the Concat and replace expression to "clean" it up but it doesn't seem to work:

the entire flow:

Idan_0-1707371482257.png

and here are the select expressions:

Idan_2-1707371644484.png

the concat formula:

          concat('<a href="', item()?['{Link}'], '">', item()?['Title'], '</a>')
 
The compose step:
Idan_3-1707371732747.png

Compose Formula

replace(replace(replace(replace(replace(body('CreateTable'), '&lt;', '<'), '&gt;', '>'), '&amp', '&'), '&#39;', '"'), '&quot;', '"')

 

This is the output I am getting:

Idan_4-1707371808231.png

 

Please let me know what I am doing wrong.

Thanks!

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Idan ,

     

    I've made a test for your reference:

    1\My flow

    vbofengmsft_1-1707374109688.png

     concat('<a href="', 'https://www.bing.com', '">', 'Click Me', '</a>')
    replace(replace(replace(body('Create_HTML_table'),'&lt;','<'),'&quot;','"'),'&gt;','>')

    2\Result

     

    vbofengmsft_0-1707373998985.png

     

    Best Regards,

    Bof

     

  • Idan Profile Picture
    on at

    Thanks Bof- it helped steer me in the right direction, however I am still missing one part.

    If I write 'Click me' then it does indeed provide the link, however I want instead of "Click me" appearing, for the link to have the name of the file- for some reason when I have the following expression I get empty cells in the table:

     

         concat('<a href="',item()?['{Link}'], '">', item()?['Title'], '</a>')
    Idan_0-1707442290501.png

     

    Any idea why?
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Idan ,

     

    Based on your description, the value of item()?['Title'] is empty. Please check the output of the filter array.

     

    Best Regards,

    Bof

  • Idan Profile Picture
    on at

    It works! Thank you so much for your help, I have been scratching my head for the last 2 days!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard