We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

Respond to DocuSign Embedded Signing Return URL by Starting New Process

Certified Associate Developer

I’m working on using DocuSign to do an embedded signing of a PDF document through Appian.   I’ve set up the DocuSign Connection and Integrations that will create the envelope, generate a signing URL, and pull down the signed document.  I’ve also set up the following flow:

  1. Push the PDF to DocuSign and create an Envelope.
  2. Generate the Recipient Signing URL.
  3. Use the URL to redirect the user to DocuSign to do the signing.
  4. Created a WebAPI that DocuSign redirects to after the signing is complete.

I’ve created a process that takes the envelope ID (which is included in the return URL that DocuSign redirects to after signing is complete) and pulls down the associated signed document, it then takes the user to a page that allows for further processing and allows them to download the signed PDF.  I’ve tried to start that process from the WebAPI but since DocuSigns calls that URL via the GET method and Appian doesn’t allow smart services to be called in Web APIs that have a GET method I can’t start the process using the “a!startProcess()” call. 

What I’d like to have happen is that when DocuSign redirects to the WebAPI URL the document gets pulled down and the user is taken to a page that allows them to download the document and do further processing, but I’m not sure how to manage that.  

I’m fairly new to Appian development and I may be missing something obvious so if anyone has any ideas I’d really appreciate hearing them.

Thanks

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    I did come up with a way to start a process in response to the GET request.  It feels a bit dirty but it works.  I create two WebAPIs, one to accept the GET request from Docusign which returns a small HTML page that uses javascript to do a POST request to the second WebAPI that can be used to start the process.  

    The return for the GET request would look something like this:

    a!httpResponse(
    statusCode: 200,
    headers: {
    a!httpHeader(name: "Content-Type", value: "text/html; charset=UTF-8")
    },
    body:
    concat("<html><head><script>function onload(){document.getElementById('form').submit();}</script></head><body onload='onload()'>
    <form id='form' action='https://<server:port>/suite/webapi/signingPost?envelopeId=",http!request.queryParameters.envelopeId,"' method='POST'></form></body></html>")
    )

    It creates a simple html page with a form that points to the second WebAPI and when the page loads it does a post of that form.

    I feel like there should be a better solution to this but I don't know what it is.

  • Hi David, what happens when user clicks "Finish" on DocuSign document in web content field in Appian. Have you created a customized page to show the message "Signing is complete". Could you please tell me what do you pass in returnUrl parameter while getting the embedded url to sign?

Reply Children
No Data