Intelligent document processing with MuleSoft and Ephesoft connector

Photo of Mayara Silva, RPA Associate Written by Mayara Silva, RPA Associate,   Sep 2, 2022

MuleSoft helps organisations enable hyperautomation and derive maximum benefits from automation and integration. Only recently MuleSoft launched MuleSoft RPA which is well integrated into the MuleSoft ecosystem. They also partner with various companies to enrich their automation capabilities even further.

At MuleSoft CONNECT 2022, MuleSoft announced their partnership with Ephesoft, an 'industry-leading intelligent document processing solution that automates the processing of documents'. Ephesoft Transact platform is powered by Optical Character Recognition (OCR) engine and AI for data extraction from digital and physical documents. Today, I want to test the MuleSoft connector to Ephesoft, and it's going to be fun.


Testing Ephesoft Transact Web Services Connector

Suppose we have to build an integration to extract data from a PDF document and transform it into a JSON format. Ephesoft Transact Web Services connector is what we need to do the job. The connector is available on MuleSoft Exchange. Keep in mind that this connector is new and, therefore, may have some limitations.

I decided to test the Ephesoft connector by executing two operations. Obviously, I start by reading the Connector Release Notes and User Manual.

Pre-requisites: The connector requires a licensed instance of Ephesoft Transact.

My test environment: I use the Postman platform to execute API calls. APIs are running on my local machine.


Ephesoft's OCR Classify Extract operation

A Postman call sends a PDF file to a MuleSoft API which executes Ephesoft's OCR Classify Extract operation to extract data and transform it into a JSON. The transformed response is mapped to fields in CSV format and is saved to my local directory.

Send a PDF file.

postman-request-ocr-extractPostman Call – sends one PDF file

The message's body contains the file and the batchClassIdentifier

sample fileA PDF file was sent

Mule API flows.MuleSoft API flow-min

Add the connector dependency into the project POM.

Project POM dependency

 Ephesoft Transact Config. Ephesoft Transact config-min

OCR Classify Extract properties.

OCR Classify Extract properties-min


Response from Ephesoft function OCR Classify Extract.

Response from Ephesoft - OCR Classify Extract


 Mule Transformations.

data transformation Mule transformations 2-min-1


The result CSV file is saved in my local directory. The extracted information looks result saved locally-min

invoice list


Ephesoft's Upload Batch operation

Upload Batch function allows submission of several files directly to Ephesoft for processing. We send two files to this operation. The files are uploaded to the Ephesoft platform, reviewed and validated. Ephesoft then makes a callback to our MuleSoft API sending the files processed.

Postman Call – sends two PDF files. The message contains the files, while variables batchClassIdentifier and batchInstanceName are set as query parameters.

Postman call send 2 filesMule API flows

Mule API flowEphesoft – Upload Batch Properties

Ephesoft – Upload Batch PropertiesResponse from Ephesoft – Upload Batch

Response from Ephesoft – Upload BatchA person in charge reviews and validates the document on the Ephesoft side. The process is completed, so Ephesoft calls MuleSoft API sending back the files processed.

Mule API flow – Note: this flow is a copy from the Connector Guide available in the Connector in Exchange

Mule API flow

Mule transformations

More info transformationMore info transformation 2More info transformation 3

The original files are returned and saved in my local directory under the unique batch ID.

Files are saved locally

The Response is logged into Anytoint Studio

Response is logged

I have demonstrated how to use the Ephesoft connector to automate document-centric processes as a part of your API-based integration. Feel free to check out the project

I hope this blog was helpful and explained how to leverage the power of intelligent document processing in the MuleSoft environment

We’d love to hear your opinion on this post