Skip to main content
September 15, 2021
Question

Send an email with a link to download documents

  • September 15, 2021
  • 6 replies
  • 0 views
Hi all!
We need to send an email with a link that allows users to directly access the download of the documents (after authenticating in the application). instead of sending them as attachments.
We have found the following discussion Appian Community and we have developed like this.
We have included in our HTML template:
      <a href="https://your environment/suite/doc/###docid###?appian_environment=designer">Download Document</a>
and it worked.
The problem is when we have moved to another environment. We have just updated the name of the environment:
      <a href="https://new environment/suite/doc/###docid###?appian_environment=designer">Download Document</a>
And now its not working, we got the following error: 

Application Error

We're sorry! We could not process your last request.

  • There are no details available for this problem.
  • If you continue having problems, please contact the system administrator for further help.

Could anyone of you help us to solve this issue or to propose another way to do it?

Thanks in advance.

6 replies

selvakumark
Participating Frequently
September 15, 2021

Hi [mention:0cf453bc057c4d81834682b2957b8c3a:e9ed411860ed4f2ba0265705b8793d05],

Seems like it is a security issue. Does the user who tries to download the document have proper security rights(at least viewer) set in Appian?

richardm900458
September 15, 2021

Hi Belen, 
first idea:
"https://new environment/suite/doc/###docid###?appian_environment=designer"
It looks like you are inserting the same document Id?
-> This document ID is perhaps a complelty different document or doesnt even exist. 
-> documents have platform specific IDs. which means you need to insert the specific documentId of the plattform as well. Are you inserting the right one there?
2.idea: does the user have sucerity permission to access the document (folder, application...)?

good luck!

Participating Frequently
September 15, 2021

Hi, One alternate approach could be to use task viewer outlook add in where in you can create an Appian interface to download the document and the task can be embedded in the email and user can directly access the task via outlook to download the document.

More details can be found here - docs.appian.com/.../Task_Viewer_Add-in_for_Microsoft_Outlook.html

May 9, 2023

I have the same issue 

Is still working this link ? I am using the last appian version 

Thx

stefanhelzle0001
Brainy
May 9, 2023

The document() function can return the URL when passed the correct property.

docs.appian.com/.../fnc_scripting_document.html

May 9, 2023

Well! thank you Stefan