Hi all,
I am trying to write a Process Model in Appian which uses an interface to accept a document from the user [of any size] and then feed that document to our document management system using its REST web-api.
The document management system provides a web-api which allows you to call a method to create a document, and this call will return a document id. You can then subsequently send chunks of the document using that document id as a base64 string.
So, what I have done so far is to develop an interface which successfully accepts documents from the user and stores them into an appian folder.
Now what I need to do is get those documents and convert them into a base64 string and then send them a chunk at a time to the web-api provided by our document management system.
Can anyone advise how I would do this using a process model?
thanks heaps,
David.
Discussion posts and replies are publicly visible
Hi,
This can be achieved using a simple function ConvertDocumentToBase64() which is a part of 'Base64 Document Conversion Functions' plug-in. It a plugin provided by Appian itself. This function takes the document as input and converts it into base64 string. Then after that you can create batches of the string by counting the length and dividing it in equal parts and then sending it to the destination either with MNI or creating a loop in Process model.
OR
You can directly select content type as 'Multipart From Data' in an integration and then select type as document. Now specify the file name and document and you're done. Refer the screenshot below.
-Harshit.
Thanks Harshit, Do you have a URL where this plugin can be located? I've been searching in Appian community site and have not been able to locate it. thanks, David.
Did you try the other method to send via the integration designer? That method is probably easier to set up and doesn't require a plugin at all: https://docs.appian.com/suite/help/latest/Integration_Object.html#sending-base64-inline-with-json
Hi David,
We are looking for same kind of solution in our project where appian webAPI has to receive set of documents (array of documents) from external system (SFDC).
And the received doc has to be saved into Appian as Appian document. Can you please share ur implementation.
Thanks,
Nupoor
Hi, I'm going from the other direction - extracting documents from appian to be stored in a document management system [for which I'm using Appian's web-api to allow the external system to access the documents it requires], so its not quite the same. I haven't investigated how one goes about retrieving documents FROM an external system into appian.
okay, thanks David, got your point.
Nupoor - Did you find a solution for this use case? I am trying the same thing and running into som challenges.
The solution was to extract the documents from Appian by writing an Appian web-api that allows the information to be retrieved from a program outside of appian, and then write a C# program that calls the Appian web-api to get the documents, and then the C# program pushes the documents into the Document Management System.