Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
Hi all,We need to send a document from appian to an external system which receives document as a part of json with document converted into base64 string. For example:{
"name":"Document_name",
"document":"base64 string encoded document"}
The request json will look something like this. How to convert document into base64 string in appian? Do we have any plugins for that??
Discussion posts and replies are publicly visible
Hi Sarath,
Maybe this can be helpful for you https://docs.appian.com/suite/help/23.1/Integration_Object.html#sending-base64-inline-with-json
And also you can see conversations of the same questions may it helps.
https://community.appian.com/discussions/f/general/21241/document-to-base64-conversion-using
I tried using 1st method, we had error like file too complex from the integration response. So not sure if this is the way to do it. its saying to use todocument() which is returning the document name. The external system needs the document in base64 string.the base64 string should look something like this : "VGVzdCBkb2N1bWVudCA3ODM0dGhxaXJ1aXJnaFdSTEdKUVJPR0hBRVJWQU5HT0xRUkhHT0xRUkdKSU9HSFFLQU5SU0dPcXczNWhnb2h3cmthdnJpb2d1cWdqYWhma3JnS0ZVR0hL"
Will this be taken care if we use todocument inline with json??
I think you should use encodebase64string() function to achieve your requirement, may it is useful.
As explained in the documentation, Appian will take care of the base64 encoding automatically if done as described. Do you want to share your current configuration?
This is a sample of the code how it will look like and how i have implemented
{
"document":todocument(documentID)}So Stefan, you are saying that if we use base64 encoding in appian, it will give us the base64 string and we dont need to worry much about it. It will just pass it as the string to the external system
If your last sentence refers to the documentation posted above, then yes.
ok thanks stefanwill check on it
@Sarathkumar R - I'm facing the same issue, How did you fixed that ?
I used todocument() function to achieve it. Pass the document id as parameter to this function and rest appian will take care
I have tried the same, but we are receiving 500 internal server error. What is the content type you are passing is it "Json" or "Document Auto detect" ?