Skip to content

Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Problems
  • Triggers
  • Application specific solutions
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
Menu

How to update SharePoint hyperlink column in Power Automate

Posted on December 6, 2020April 14, 2021 by Tom

“I built a Power Automate flow that copies excel rows to a SharePoint list, but I can’t get the hyperlink column to work. It should both have a description, and a link, but I don’t know how to update it.”


When you use the ‘Hyperlink’ column is SharePoint, it’ll ask for two values, URL and Alternative text, but the ‘update’ action in Power Automate has only a single field.

Power Automate update Sharepoint hyperlink column

And if you try to put in both the values, URL and Alternative text, you’ll end with an error message.

While it might seem as the error message is giving you a hint on proper format (..type ‘String/uri’), it’s not. It doesn’t mean that you should use format [Alternative text]/[URL] to update the column. It tells you that it expects a String if form of a url. Just the url which will be then displayed in the column. You can’t update the Alternative text into the hyperlink column. So what are the workarounds?

Multiple lines of text field

One option is to get rid of the ‘Hyperlink’ column. If it’s updated by a Power Automate flow, then you don’t need the fancy update form. You can use Multiple lines of text column with Rich text enabled instead. Enabling Rich text allows you to use HTML code in the column, including usage of links, as shown by the code blow.

<a href="[URL]">[DisplayText]</a>

Note:
[URL] is your dynamic content with the link
[DisplayText] is your dynamic content with the 'Alternative text'

JSON formatting

The other option is to use JSON formatting on the ‘Hyperlink’ column. When you update the column with the URL, it’ll display the URL. But using JSON formatting you can change what will be shown to the users while the URL will stay in the background. Using the formatting below you can go from URL to ‘Link’ text with the URL behind.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "Link",
  "attributes": {
    "target": "_blank",
    "href": "@currentField"
  }
}
Power Automate Sharepoint hyperlink update JSON

You can find more information on the JSON formatting in my previous post on building calculated hyperlink column.

Summary

While Power Automate doesn’t allow you to update the ‘Hyperlink’ SharePoint column in the same way as users would, there’re still workarounds. As long as users don’t need to update the columns themselves, there’s not much of a difference. From the user perspective, both options will hide the URL behind the text.

But if the users must be able to update the link, then I’d say the JSON formatting is a better choice. Users don’t need to mess with HTML or Rich text editor, they’ll just update the link in the column and JSON will take care of the rest.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Now available:

The Ultimate Power Automate expressions cheat sheet
Equip yourself with the tool to translate your thoughts into Power Automate expressions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Check if email already exists in Outlook contacts (Power Automate)August 7, 2022
  • Set permissions for a SharePoint list or library with Power AutomateAugust 3, 2022
  • Handle deleted files in synchronised SP library in Power AutomateJuly 31, 2022
  • Create item with lookup column in a dynamic list (Power Automate)July 27, 2022
  • How to move list between SharePoint tenants with Power AutomateJuly 24, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

© 2022 Let's POWER Automate | Powered by Superbs Personal Blog theme