Hi Folks,
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?
Much appreciated.
Discussion posts and replies are publicly visible
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.
Hi Peter,
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.
Cheers
Dave
Hi Dave,
Thanks for the suggestion . So seems we do not have other option without using the database approach.
Thanks
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
ThanksRaj
Hi Arjun,
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.