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

Certified Senior Developer

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.

  Discussion posts and replies are publicly visible

Parents
  • 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.

  • /* 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.*/

Reply Children
No Data