Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Best way to convert URL to text link

Like (0) ShareShare
ReportReport
Posted on 9 Dec 2020 03:52:55 by 35

Hi - could some please help me with the below:

 

I get items from a SharePoint list and parse each result to an array variable to add to a table, then email out which works great now.

 

I just want to include the 'Link to item' but as a Text link (i.e Click here to view) rather than the entire URL. What is the best way to do this?

 

Thanks

 

  • trentq Profile Picture
    35 on 15 Dec 2020 at 01:50:42
    Re: Best way to convert URL to text link

    Thanks Bof - that has worked perfectly. Cheers!

  • Verified answer
    v-bofeng-msft Profile Picture
    on 14 Dec 2020 at 08:05:24
    Re: Best way to convert URL to text link

    Hi @trentq :

    Don’t worry, you just need to follow my steps exactly

    1\Step1:

    In your ‘Initialize variable’ step, set ‘The Table’ to String and set it's value to:

     

    <table><thead><tr><th>Person</th><th>Start</th><th>End</th><th>LeaveType</th><th>Approver</th><th>Link</th></tr></thead><tbody>

     

    2\Step2:Replace 'Append to array variable' with 'Append to String variable2' and set it's value to:

     

    <tr>

    <td>{Name}</td>

    <td>{Convertedtime}</td>

    <td>{Convertedtime}</td>

    <td>{LeaveType}</td>

    <td>{SubmitToXXX}</td>

    <td><a href="@{Linktoitem}" >Link to item</a></td>

    </tr>

     

    3\Step3:Add an other "Append to string variable" action outside the loop and set it's value to 

     

    </tbody></table>

     

    1.JPG

     

    4\Step4:Delete 'Create Html table'

    5\Step5:Use variable "thetable" to replace OutPut of "Create Html table".

    If you have questions about HTML I suggest you check this website:

    https://www.w3schools.com/html/

    Best Regards,

    Bof

  • trentq Profile Picture
    35 on 14 Dec 2020 at 06:47:52
    Re: Best way to convert URL to text link

    Thanks for the response, but I am lost - I'm not sure what to do next.

  • v-bofeng-msft Profile Picture
    on 14 Dec 2020 at 06:13:22
    Re: Best way to convert URL to text link

    Hi @trentq :

    No you don't need to do this.

    Please pay attention to the following points:

    1\In my solution, TheTabe is a string instead of an array.

    2\I use HTML to write 'TheTabe' directly, instead of using Create HTML table to convert array into HTML table.

    Best Regards,

    Bof

  • trentq Profile Picture
    35 on 14 Dec 2020 at 05:44:30
    Re: Best way to convert URL to text link

    Hi Bof - thank you for your reply. Could you help me understand the best place to put this into my current Flow. Do I need another 'Apply to each'?

    Thanks

     

    Flow2.jpg

     

  • v-bofeng-msft Profile Picture
    on 09 Dec 2020 at 07:00:28
    Re: Best way to convert URL to text link

    Hi @trentq :

    The point is to write HTML. Ive made a test for your reference:

    1\My Flow

    v-bofeng-msft_0-1607497207311.jpeg

     

    Reference expression:

    <table><thead><tr><th>Title</th><th>Link</th></tr></thead><tbody>

    v-bofeng-msft_1-1607497207314.png

     

    Edit the message body in code view mode

    v-bofeng-msft_2-1607497207316.png

     

    The Result:

    v-bofeng-msft_3-1607497207318.png

     

    Best Regards,

    Bof

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 97

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard