cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PAnoob
Regular Visitor

URL encoded to URI but still getting "doesn't have the expected format 'String/uri'." error

I'm trying to muddle my way through Power Automate...

I'm trying to add a link into a planner task using 'Update Task Details'.

The file I want to link has already been saved to the required location on SharePoint in a previous step in the flow (this all works perfectly).

The 'Update Task Details', 'Reference Resource Link' requires a URI of the URL the file is saved in. I've tried all the ways I can think of to encode the URL to URI but I'm still getting the below error.

There are no special characters in the string that I can see and the URI looks completely fine!

PAnoob_2-1655387161065.png

 

I have already tried the following:

encodeUriComponent(outputs('Create_file')?['body/Path'])
uriComponent(concat('https://thisisthewebsite.com/',outputs('Create_file')?['body/Path']))

uriComponent(outputs('Create_file')?['body/Path'])

 

This is the section of my flow this all relates to:

PAnoob_1-1655386807798.png

Any help someone can give would be very greatly received!

Also, if I've not given enough information then let me know!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User
Super User

Hi @PAnoob 

I did a test on my own and worked using the following expression:

concat('https://mytenant.sharepoint.com/sites/mySite',outputs('Create_file')?['body/Path'])

Where you have to replace "myTenant" and "mySite" with your own tenant and site.

Hope this helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

4 REPLIES 4
fchopo
Super User
Super User

Hi @PAnoob 

Have you tried to use "outputs('Create_file')?['body/Path']" without any type of encoding?

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
PAnoob
Regular Visitor

Hi @fchopo ,

I have tried that, but did again just now to double check and I still get the error.

Cheers,

fchopo
Super User
Super User

Hi @PAnoob 

I did a test on my own and worked using the following expression:

concat('https://mytenant.sharepoint.com/sites/mySite',outputs('Create_file')?['body/Path'])

Where you have to replace "myTenant" and "mySite" with your own tenant and site.

Hope this helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
PAnoob
Regular Visitor

That worked PERFECTLY

Thank you so much.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,715)