There are various discussions going back years on this topic... but no definitive answers or guidance. I have a requirement to take a base64 encoded string (received via API) and create a document. I have no need of a database. Just need to take the string, create a document, write it to the document store. Can anyone point me in the right direction for this?
There's a new smartservice plugin that does this https://community.appian.com/b/appmarket/posts/convert-base64-to-document
Actually you shouldn't even need the plugin - the integration object allows you to receive Base64 documents and store them in Appian's file system: https://docs.appian.com/suite/help/19.3/Integration_Object.html#receiving-base64-inline-with-json
What if you have a Base64 document string already, and just need to convert it to a file? I assume the integration object wouldn't handle that use case, while the above plug-in would, right?
That's a fair point - the plugin would be better for that use case. However, I wouldn't think that is very common. Can you describe your use case for having a base64 string you need to convert without having an integration?
Well, it seems to be the use case DaveMC describes above, both in the original post as well as in followup comments. I personally do not have a use case for this at the moment, but like keeping up-to-date with what general capabilities we have at our disposal.
DaveMC said:Ideally I would pass it Doc Name with extension, Base64 string, Target folder and it would create the file.
I think the integration should still work for that (since he mentioned he is receiving the base64 string from API). The response properties allow you to set doc name / extension, document, and target folder directly in the integration designer.
Hi Peter ,
As Dave mentioned , i too have a use case where the external application calls the exposed service of Appian with the base64 string in request and this will be used to create a document in Appian KC. The integration object way you mentioned will not work as using Integration , you are configuring Appian to call the external system and then convert the response as Document.
Required use case is to expose a one way service by Appian to create the document in KC using the base64 , without usage of database.
Hi Dave ,
Please let me know if you are able to find a way on how to do the same?
Thanks in advance.
The only way I could get it working was to first persist the string in the database and then pull it back to create the document. All other approaches failed for me. I ended up creating and exposing an API, which passed in the base64 string to Appian. I then leveraged the base64-document-database-integration to persist to DB and then reconstitute to a document that I could save to an Appian Folder.
Thanks for the suggestion . So seems we do not have other option without using the database approach.
Hi Dave, what is the source of the base64 encoded string? Can Appian get the base64 encoded string from a rest API source? If yes, we have capabilities to convert base64 string to a document directly without persisting in the DB. Let me know your use case, i'll see if I can help you achieve this optimally.
Hi Arjun, Could you please suggest how you do ?, we are getting the base64 string inside json for webapi request . How you are converting the base64 to document without persisting to database ?, is there a smart service you suggest? or any other way
Just saw this. We've moved on from that project. Should we run into the need again I'll be sure to look you up. Many thanks for reaching out to me. Much appreciated.
Hi Arjun, can you suggest how to convert a base 64 string embedded in Json into a document. I have tried conver binary to appian document but that is converting the entire response body rather than just the binary element.
Are you dealing with a Base64 response or a binary response? If it is a base64 response, you can use the "Convert JSON to Appian Value" and check the checkbox, "Convert Base64 values to Appian Documents" option to convert base64 content directly to a document. For the first time, it will ask you to make a sample request and autodetect the Base64 tag where the document is located and does the rest of the config automatically. We need to mention the folder the document needs to be stored. Please refer to the screenshots below for your reference. Please let me know how you go with this one.
Discussion posts and replies are publicly visible
© 2019 Appian. All rights reserved.