cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DennisTan
Advocate I
Advocate I

Approval with Link to attachments error from SharePoint List

Hi there, I have a sharepoint list item that contains attachments. When the flow is triggered, it sends out the attachments as hyperlinks through emails to the approvers. However, there seems to be an issue with the markdown formatting as some of the attachments seem to come through as text. I am currently using the expression : join(split(item()?['AbsoluteUri'],' '),'%20') that I have obtained from the link here:

 

https://powerusers.microsoft.com/t5/Building-Flows/Approval-with-link-to-attachments-from-SharePoint...

 

The attachments in question:

 

image004.jpg

 

However, when I renamed the files to "1" and "2" it comes out flawlessly as hyperlinks. 

 

unnamed.jpg

 

Any ideas what could be causing this? Is it the naming convention? My guess is that it has something to do with the brackets in the file’s name, but that only rings true for one of the files.

 

unnamed (1).jpg

 

Name of the files:

SF19451 Budget Pricing r1 Line 3 Forming Upgrade

SAGE Schedule of Rates (SA) (1) L3 Forming upgrade

 

Thanks in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
DennisTan
Advocate I
Advocate I

Took me a whole day, but I managed to fix the problem. Issue was that there were special characters in the name of the attachments including the parenthesis/hashtags, which needed to be encoded first. I'm pretty sure there's a way to encode the URL, but I managed to make do with the following by replacing '(' with '%28', ')' with '%29' and '#' with '%23'.

 

replace(replace(replace(join(split(item()?['AbsoluteUri'],' '),'%20'),'(','%28'),')','%29'),'#','%23')

 

 

 

 

View solution in original post

1 REPLY 1
DennisTan
Advocate I
Advocate I

Took me a whole day, but I managed to fix the problem. Issue was that there were special characters in the name of the attachments including the parenthesis/hashtags, which needed to be encoded first. I'm pretty sure there's a way to encode the URL, but I managed to make do with the following by replacing '(' with '%28', ')' with '%29' and '#' with '%23'.

 

replace(replace(replace(join(split(item()?['AbsoluteUri'],' '),'%20'),'(','%28'),')','%29'),'#','%23')

 

 

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,902)