cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
elDub
Frequent Visitor

Emailed hyperlink not working

Hello all,

 

I am successful at getting a SharePoint folder to trigger an email anytime a new document is placed in it. However, the email is meant to contain a clickable link to that document. Unfortunately the path and file name contains spaces. I have hard coded the path (including spaces) which is working with %20's but the file name with spaces breaks the hyperlink.  Is there a method to edit the flow to include spaces, insert %20's, or just plain work as a hyperlink?  I am not skilled in this area so forgive my asking for a detailed response on how I can resolve this.

Example:

filename in sharepoint- https://website.sharepoint.com/sites/team/Shared%20Documents/General/Remote%document%20Forms/sample text.pdf

 

filename in email- 
https://website.sharepoint.com/sites/team/Shared%20Documents/General/Remote%document%20Forms/sample text.pdf

 

Many thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
tom_riha
Super User
Super User

Hello @elDub ,

you can use the replace(...) expression to replace the spaces with %20. Before you send the link, apply the expression:

replace(<the url>, ' ', '%20')

that'll replace all spaces in the whole link, including the file name.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

elDub
Frequent Visitor

 

Ignore the request, I realised I needed to create a variable first then call that variable in the trigger email.

View solution in original post

4 REPLIES 4
tom_riha
Super User
Super User

Hello @elDub ,

you can use the replace(...) expression to replace the spaces with %20. Before you send the link, apply the expression:

replace(<the url>, ' ', '%20')

that'll replace all spaces in the whole link, including the file name.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
elDub
Frequent Visitor

 

Thank you for this.  Just to clarify, I wish to use Dynamic Content based on the file that was added to the sharepoint folder.  These files are dropped with spaces in the name.  Can I still use that expression or is there another way to incorporate the Dynamic Content with spaces in the file name. Note the Dynamic Content I have been using is x-ms-file-name-encoded

elDub
Frequent Visitor

 

Ignore the request, I realised I needed to create a variable first then call that variable in the trigger email.

v-xiaochen-msft
Community Support
Community Support

Hi @elDub ,

 

Has your problem been solved?

Is there anything I can help?

If your problem has been solved, you could mark the correct reply as a solution.

 

Best Regards,

Wearsky

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Users online (2,834)