Link added in body email not working properly

Hello all,
I would like to ask you if somebody faced the similar issue: I am trying to add a link to a zipped folder in body email which is saved in the folder “Documents”. I managed to add a link, but if I click on that I get a pop up window where I can choose “Open”. When I click “Open” then nothing happens. However, I expect that the path to the folder should open.

The general path to the folder looks: C:\Users\MyName\Onedrive - ABCD\Documents\Final Folder

I use Send Outlook Mail Message Activity, I clicked IsBodyHTML, I used html tag for adding link. The path is stored in argument.

I was thinking that maybe the issue is the space in Onedrive, because when I hover the link I get the path visible ending with Onedrive (without: - ABCD\Documents\Final Folder). So I tried to use <>, file:///, but nothing solved my issue.

Would somebody of you any other tip what could solve the issue?

Thank you.
Marie

1 Like

Hi Marie!

Let’s take such email with non-working link and save as *.html, then see in editor like Notepad and find the < a href > tag, inspect it for anything weird, or please share this piece of html code, I might be able to help :wink:
Roman

Hi Roman,
thank you for your response and help. The piece of html code is:

image

” + “View Report” + “

in_finalFolderPath = “C:\Users\Marie\OneDrive - ABCComp\Documents\Test Report”

Marie

Okay, I see.
You need to add two pair of escaped double quotes to form the final tag. In order to achieve:

<a href="C:\Users\Marie\OneDrive - ABCComp\Documents\Test Report">View Report</a>

You need to use this expression:

"<a href=\""+in_finalFolderPath+"\">View Report</a>"

See? I added two escaped double quotes (that means backslash goes in front of them so it will be not taken as end or beginning of string, once you use this expression somewhere (you can try it on Log message for example), you will notice the backslashes will be gone and the double quotes will stay.) , because they have to be part of the final HTML tag.
Try it and let me know if that helped :slight_smile:
Roman

Hi Roman,
thank you very much for you help. I tried it, but I got an error - that it is not possible to transfer type “String” to type “Long”. However, I tried to search for a solution focusing only on HTML and I finally I tried to “replace” spaces in the link with %20 and it works (even though not sure, if it is the best solution).
Thank you very much for your support!
Marie

1 Like

Hey :smiling_face_with_three_hearts:
As per my opinion, You need to follow all these steps:

  • Verify Path Formatting
  • Check File Permissions
  • Absolute Path
  • Outlook Security Settings
  • Alternative Method

I hope this will help you.

Respected community member :innocent: