Skip to main content

Notifications

Community site session details

Community site session details

Session Id : tZpiT9ajzCUxN0HKYZGba8
Power Automate - Using Flows
Answered

URL value error - A URL field contains invalid data

Like (3) ShareShare
ReportReport
Posted on 22 Apr 2022 09:58:29 by 29

Hello wonderful community of helpful people,

 

Hoping you can help with an intermittent issue i'm having regarding the URL.

Please see flow below

Error message - "Invalid URL value.

A URL field contains invalid data. Please check the value and try again.
clientRequestId: 449d2f9c-4e3d-4550-900f-018d295f7437
serviceRequestId: 449d2f9c-4e3d-4550-900f-018d295f7437"

 

This error message comes up in other flows I have as well but only for certain folders - I wonder if its because the URL is too long? Is there a way of by-passing this?

https://XXXXXXXXXXXX.sharepoint.com/sites/XXXXXXXXXX/Documents/Forms/AllItems.aspx?useFiltersInViewXml=1&isAscending=true&id=%2Fsites%2FXXXXXXXXXX%2FDocuments%2FXXXXXXX%2F2021%2F111%20%2D%20test&sortField=LinkFilename&viewid=dc323592%2Db8a8%2D4761%2D99b8%XXXXXXXXXXXXXXX - this is an example of a link that breaks it (I added the X's for anonymity) 

 

For context this is what the flow is supposed to do - 'For a selected file' - change the column value - 'update file properties'

Screenshot 2022-04-22 at 10.46.50.png

  • DR-10040212-0 Profile Picture
    3 on 10 Apr 2025 at 02:13:12
    URL value error - A URL field contains invalid data
    Thankyou!!
  • maudiri Profile Picture
    5 on 08 Feb 2023 at 02:32:32
    Re: URL value error - A URL field contains invalid data

    Your solution is a bombshell, thanks Oliver01 !

  • Verified answer
    Oliver01 Profile Picture
    14 on 30 Jan 2023 at 17:20:25
    Re: URL value error - A URL field contains invalid data

    Hi Kate, 

     

    I haven't personally used library, so I cannot say if that's the case. 

     

    This method is more like a work-around to the character limitation of using a hyperlink column. You are not going to create a URL column, you will need to create a multiple lines of text column for the field you want to store your URLs. (Make sure it is multiple lines of text, because single line of text has the same character limitation as the hyperlink field)

    Oliver01_0-1675097729312.png

    The detailed setting for that multiple lines of text looks like the following: 

    Oliver01_1-1675097930723.png

    Choose "Plain text", and in the Column formatting box paste in the JSON code:

    { 
     "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", 
     "elmType": "a", 
     "txtContent": "=if(@currentField, 'Link to Folder', '')", 
     "attributes": {
     "target": "_blank", 
     "href": "@currentField" 
     }
    }

    Once you save the settings, whatever URL you paste into the cell should automatically turn into a Hyperlink once you hit enter and save the cell. 

    Oliver01_2-1675099188945.png

    Let me know if that helps! 

     

    Best,

    Oliver

  • bluelemon247 Profile Picture
    29 on 30 Jan 2023 at 16:38:33
    Re: URL value error - A URL field contains invalid data

    Hi Oliver01, Thank you for replying to this, I had given up hope of an answer! My apologies, but would you mind explaining this a bit more? I knew it was to do with the length of the URL which i agree shouldn't be limited (very annoying intermittent error) - I have just been living with the occasional failed flow. 

    Screenshot 2023-01-30 at 16.36.28.png 

    I have tried doing as suggested and looked at the link provided but I'm not sure what I'm looking for as there is no URL Column listed? Help would be very appreciated - this may be because its a library rather than list?

    Thank you 

    Kate

  • Oliver01 Profile Picture
    14 on 26 Jan 2023 at 19:14:24
    Re: URL value error - A URL field contains invalid data
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "=if(@currentField, 'URL Link', '')", "attributes": { "target": "_blank", "href": "@currentField" } }

    Credit: https://sharepoint.stackexchange.com/questions/288082/how-to-convert-text-to-url-in-multi-line-text 

    3. You can input the URL from Form as normal to that field in Power Automate.

     

    Hope this helps! 

     

    The issue usually occurs when the URL has more than 255 characters. Very annoying limit. Took me forever to figure out a way around it. So here is what you can do:

    1. Instead of using the Hyperlink field, use multiple lines of text field. 

    2. Go edit your column, and in format column with JSON field, paste in the following code:

    { 
                          
  • stacyjpelletier Profile Picture
    11 on 16 Jun 2022 at 16:17:20
    Re: URL value error - A URL field contains invalid data

    Thank you, I will try this. 🙂

  • bluelemon247 Profile Picture
    29 on 16 Jun 2022 at 08:13:49
    Re: URL value error - A URL field contains invalid data

    I may have a fix to this but works with some projects and not with other - but thought it worth posting in case it helps you @stacyjpelletier .

    For the URL field that requires filling I use an ETag instead see photo below. You first need to use 'Get File Properties' and then select the ETag from that. I hope this helps you 🙂 

    Screenshot 2022-06-16 at 09.10.31.png

  • stacyjpelletier Profile Picture
    11 on 16 Jun 2022 at 04:18:54
    Re: URL value error - A URL field contains invalid data

    I am having a similar problem and posted about it today.  I hope we get an answer 🙂

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

#1
WarrenBelz Profile Picture

WarrenBelz 146,786 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow