Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
7 subscribers
Views
5910 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
Document not being passed to docusign
ankitab918
over 8 years ago
Hi, I have a requirement to integrate with DOCUSIGN where I am passing an appian document to be signed digitally. I used the httppost() function to call the service. Here I need to pass the document in the body in base64 format. I have used convertdocumenttobase64() function to convert the document. The method is being called successfully but I am getting the below error :
{
"errorCode": "UNABLE_TO_LOAD_DOCUMENT",
"message": "Unable to load the document. Unable to load Document(1;a.txt.txt). Error: the document is corrupt, rebuilding failed"
}
Can please anyone help me to resolve this?
OriginalPostID-255248
Discussion posts and replies are publicly visible
0
chandolum
A Score Level 1
over 8 years ago
@ankitab, the return type convertdocumenttobase64() is of type text, but as per my understanding to above post the input for httppost would be of type document i think the mismatch in the data type is causing the issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitab918
over 8 years ago
i am passing the document as a json format. Please check the below code:
load(
local!documents:{"documentId":"514357" ,"name":"a.txt","documentBase64":convertdocumenttobase64("514357")},
httppost(
.
.
.
body:a!toJson({"emailSubject":"TestEmail","emailBlurb":"ShowsHowTocreateEnvlope","recipients":{"signers":{local!signers}},"documents":{local!documents},"status":"sent"})
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandolum
A Score Level 1
over 8 years ago
Can you try with HTTP File Upload Smart Service, as per the above code local!documents data type will be "Any Type" but as per my assumption the target source will accept only document type. if we use HTTP File upload smart service you can pass the result of convertdocumenttobase64 as parameter(HttpKeyValuePair) which will accepts multiple key value pairs. you can pass your document to "Document" attribute of the smart service. hope this will help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitab918
over 8 years ago
Actually it's just not the upload, i need to send an email too with the document's link.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitab918
over 8 years ago
Hi.. This issue is resolved.. There was an extra parameter called fileExtension in the documents block. This was not given in the DOCUSIGN documentation so I missed it. I did a little digging in google and with trial and error found the resolution. So the block would look like this :
{"documentId":"514357" ,"name":"a.txt",
"fileExtension:"txt","documentBase64":convertdocumenttobase64("514357")},
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandolum
A Score Level 1
over 8 years ago
Thanks for the update on the issue..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel