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