Skip to main content
October 7, 2024
Question

Generate and Download document from external system in single click in Appian

  • October 7, 2024
  • 13 replies
  • 0 views

I have an integration with S3 bucket, which is a type of modify data. This integration pull the documents and store in folder. Now I need to provide a link to user, so that user can click the link and get the documents download. How can I do it in a single click.

13 replies

stefanhelzle0001
October 7, 2024

There is no solution I would want to recommend to make this work.

October 8, 2024

Hi Stefan,

My integration is storing document in destination folder and getting document as a result body. As its usage is Modifies data, I can use it in saveInto or Web API. May I know how to use this integration in Web API ? 

I tried calling this integration in Web API and used onSuccess parameters using a!save(local!doc,fv!result.body). But it didn't work. Can you please guide me.

October 8, 2024

 [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05]  Could you please help me on the above questions and let me know how to call a integration with modified usage inside Web API because it didn't work for me 

mikes0011
Brainy
October 7, 2024

Agreed with Stefan - this sort of thing really requires a 2-click approach to maintain code cleanliness, maintainability, flexibility, etc.

somasundaram.d
October 7, 2024

You cannot do it in single click but you can have 2 links

1. Fetch Document - Link to call the integration and bring the documents inside appian using dynamic link

2. Click to Download - Link to download the document using document download link

kumara0180
October 7, 2024

Step1 : Create a process model to download and store the document in a folder. 

Step 2 Create a Post webApi to trigger this process model and this webApi should return the documentId of the downloaded document

Step 3 Create a integration object to trigger this webApi and this should be just returning the documentId again

Step 4 Create a get webApi. In this webApi call the integration object and in response use 

a!httpResponse(
statusCode: 307,
headers: {
a!httpHeader(name: "Location", value: local!redirect)
}
)

where local!redirect : document(documentID,"url").

Step 5 : Call this webApi as a link in your interface.

kumara0180
October 7, 2024

/* developer.mozilla.org/.../Redirections */
/* In HTTP, redirection is triggered by a server sending a special redirect response to a request.
Redirect responses have status codes that start with 3, and a Location header holding the URL to redirect to.
When browsers receive a redirect, they immediately load the new URL provided in the Location header.
Besides the small performance hit of an additional round-trip, users rarely notice the redirection.*/

upenderrm844428
October 31, 2025

I implemented the process u have mentioned but it's not redirecting to the link which is in header.