Kapow vs. UiPath, Part IV: Files, Web Services and Emails

This is the fourth part of the Kapow vs UiPath series (you can find part 1, and part 2 and part 3 here). While last time UiPath was my favorite in almost every aspect of Desktop Automation, this time we will cover three parts: how easy your robots can interact with generic files, use emails as one interface to humans, and how web services can be integrated.


Let’s face it – your robots will need to work with files – sometimes more than we like to admit. In fact, they could be used as a trigger for starting a robot in the first place. They may act as an intermediary format between two different applications. They might be required for logging and debugging purposes. As such, we’re going to explore how Kapow and UiPath handle file read/write operations, and more importantly – file iterations. Note that I will cover file input/output operations primarily, and not focus on what’s possible with individual file types (such as Excel or PDF – that’s a different story).

Next, there’s email: even in the age of Slack, a lot of customer interaction still relies on email. Love them or hate them, they are part of many processes that you are going to automate – and mostly they are used in order to trigger a process in the first place, or as simple status updates for individuals.

And finally, there are web services: the most reliable way of integrating any third-party application.

Working with Files

Working with files means the capability of either solution to perform – at least – rudimentary input-output operations, such as creating, reading, updating and deleting files. Here are the standard actions and activities provided by Kapow and UiPath:

So far, so good – not much difference here. UiPath’s File Change Trigger activity is something unique, however – it allows you to monitor changes to one or more file properties and act accordingly. Again, UiPath’s way of presenting the workflow is a bit more intuitive. Take the following robot for example – it reads a text file from disk, appends some content, and saves the file. Here’s Kapow’s take on in, and in order to understand what is going on you would need to look at the properties of each action:

UiPath on the other hand presents the flow of things like this:

In both cases, the result is quite obvious: a text file located at c:\temp\test.txt is read, its content stored in a variable, then altered, and the file is overwritten with the now updated variable’s value. One thing where Kapow shines when it comes to files: the integrated preview which is not only capable of showing the file’s content, but also able to recognize structure, allowing you to interact with it (more about that another time when we cover formats such as XML, JSON, PDF, Excel).

UiPath can show the file’s content, too – but you would need to run the robot in debug mode using a breakpoint followed by observing a local variable. Note that there is no syntax highlighting, you cannot expand and collapse sections, and even line breaks aren’t that obvious:

Iterations are an another important aspect when working with files: you might want to find all text files in a specific directory, optionally in all sub-directories as well, and then perform certain actions based on any condition. Let’s have a look at the following example: iterating over text files, getting their size in kB, and if the size exceeds 10, log their names. Here’s how the robot along with the result looks like in Kapow:

Since Kapow already offers an action dedicated action to getting a file’s properties (i.e. just the last modified date and size), this part was easy, too. Now, let’s see the counterpart in UiPath (this time as a sequence):

Since UiPath has no default activity tied to getting a file’s properties, I used the Invoke Code activity with the following code:

fileSizeOut = New FileInfo(fileNameIn).Length

Conclusion & Verdict

The default actions and activities from Kapow and UiPath are sufficient to integrate files into any of your robots regardless of what you have in mind – Web Automation, Desktop Automation, or just something more general: both solutions have you covered.

We start this week with another draw. Personally, I wish we could have a best-breed approach: Kapow’s ability to preview files and different formats paired with the function to step back and forth during design mode will help in building your robots much quicker. UiPath on the other hand has capabilities to include VB.NET code in any step – so instead of using the Move activity, you could just call the Move method on any File object.

Integrating Emails

Talking about emails in RPA, there are two aspects we need to consider:

  • Inbound Messages – usually something that triggers certain actions,
  • Outbound Messages – one way for your robots to communicate with humans.

While sending email from your robot as messages to humans is quite simple, inbound emails are a whole different story. Technically speaking, emails are just text – each message usually consists of a header, the body, and optionally one or more attachments. To make matters worse, different mail servers will create different formats – so your plain text message might look entirely different at one of your customers where it was converted into HTML. And sending HTML emails most likely results into having at least one attachment – the plain text. Suffice to say that emails need to reach your robot in a somewhat controlled manner – let’s say you require at least one PDF attachment for your process to continue, and so on.

Then, we need to talk about protocols, namely IMAP, POP3, and SMTP. Generally speaking, the first two are used to get messages while SMTP is being use send them. Then, there is Exchange Web Services (EWS), and this protocol may be used to do both – naturally requiring Microsoft (Hosted) Exchange.

Let’s start with the elephant in the room: Kapow has no built-in actions for working directly with inbound emails. There are ways to do so as described in my article Integrating Emails into Kapow, but apart from that there is nothing that helps you deal with attachments, different formats, and the individual components of a message. The good news: Kofax knows this, and email integration is pretty high on their priority list. Outbound messages however can be sent via SMTP via a standard action, and Kapow supports plain text and HTML messages as well as adding attachments and using variables for most relevant header fields.

UiPath on the other hand, well – see for yourself:

The people at UiPath put a lot of work into integrating inbound messages. Apart from a native Exchange (EWS) integration, the Outlook activities can be used with a locally installed version of Microsoft Outlook. So, instead of resorting to Desktop Automation to retrieve messages from a client, you can just go ahead and use this special activity. Naturally, there is POP3 and IMAP integration, and the latter one has an activity dedicated to moving messages from one folder to another (which is not possible with POP3).

The following example uses IMAP to retrieve messages, loops over each individual message, and then logs the subject to the output window. Note that UiPath uses .NETs MailMessage class which, again, integrates just nicely if you need to add some custom code. And if you need to work with attachments, UiPath has the Save Attachments activity which just saves all attachments to a folder (and we already know how to work with such files).

Conclusion & Verdict

Given the fact that Kapow doesn’t have the capability of natively integrating inbound emails, anything further would just be describing UiPath – and that’s not the goal of this exercise. Naturally, UiPath is the clear winner when it comes to emails. And even when Kapow adds more features related to email in its next release, it is to be seen whether the sheer number of different integration paths UiPath offers can be beaten that easily.

Web Services

Any modern web-based application that lacks a web service interface is either doomed to fail, or too big to fail. And while some vendors and partners position RPA as some kind of software that acts as an intermediary between two applications that aren’t integrated into one another – why would anyone not want to use web services over Web or Desktop Automation? Web services allow you do something in a controlled manner – there are agreed upon protocols, controlled status messages along with error handling, and security built-in (if your services uses HTTPS).

Web services mainly come in two different flavors, namely RESTful Services and SOAP. They essentially allow you to either retrieve something (GET), or issue an action (PUT, POST, and more). Imagine a cloud-based CRM system: your robot might need to access email addresses for every user working for a specific company, filtered by a specific branch office – this is what a typical GET request is about. Alternatively, your robot might need to update all those email addresses, because the company’s name has just changed – a typical PUT operation.


Our first robot retrieves a list of posts from a web service as JSON, extracts relevant entries, and then stores the entry id and title in a text file. As always, let’s start with Kapow:

If that felt anticlimactic, then it was – but in a good way. Kapow has an action dedicated to REST services. There are plenty of options available, such as setting HTTP headers, using different authentication methods, storing the HTTP Response Code, and much more – the following image just shows the basic settings along with some of the advanced options.

When it comes to working with the JSON returned by this particular web service, Kapow’s viewer and its ability to debug while building your robots shines again:

Here’s the same robot in UiPath. There is a dedicated activity for HTTP requests in the Web Activities Pack, a NuGet package that also includes JSON serialization and deserialization.

While deserializing the JSON is just another activity and accessing individual data from it can easily be done as seen in the Assign activity above, there is no built-in viewer, and nothing comparable to the viewer in Kapow (which also helps in extracting the appropriate items). This is how the UiPath presents the JSON during debug mode – without a beautifier, you will have a hard time navigating it (but at least we have line breaks this time):

In both cases, the resulting text file looks like this:


While I am not particularly fond of SOAP web services, I can see their benefits – especially when a tool offers a simple GUI that exposes all available methods for an endpoint. All SOAP web services are (some more, some less) clearly defined by their WSDL, just like this example: http://www.dneonline.com/calculator.asmx?wsdl

The definition tells us that their are four main methods available, and all methods have two input parameters (two integers):

  • Add
  • Subtract
  • Multiply
  • Divide

So, let’s add some numbers in Kapow and UiPath using this web service. Kapow offers an action specific for SOAP requests, and while I know that I said I would review version, I also feel that it is important to note that there was a feature called assisted entry which is gone in (Kofax stated that this was due to a security issue with a third party component in their product). However, this feature is gone for good, without any alternative in the current releases. Why is this important? Well, without assisted entry, you will need to create the request XML from scratch (I recommend using SoapUI). Anyway, here’s our robot:

Note that we already see the result in the viewer: 7. Here’s the action’s configuration in greater detail:

That request XML must built by hand, so here’s an example using two variables A and B for that:

This can get messy, but you can decide to use an XML from a variable, and then use Kapow’s viewer and XML capabilities to set the required content:

Since Kapow offers an XML Data Mapper utility, parsing any SOAP response is easy (SOAP uses XML by definition). Below image shows this mapper for the AddResponse tag, with the AddResult node being highlighted (the mapper would create a variable with the same name for its content).

UiPath on the other hand offers something very similar to Visual Studio’s Service Reference as seen in the screenshot below. From any URL or WSDL, UiPath automatically detects the available methods and required parameters as depicted for the Add method:

This can make working with SOAP web services a bit easier, however I did not find any way of re-opening the wizard again other than adding a new SOAP activity. Also, I am not sure how to authenticate with OAuth since the activity only lists Basic and Windows Authentication – again, just because I didn’t find either does not mean it doesn’t exist.

Apart from that, the rest is straight-forward in UiPath. Either the web service is simple as the one listed above – in which case there is only one response value, where UiPath would automatically map the response to a single variable, or the XML could be iterated using For-Each loops.

Conclusion & Verdict

Just judging from the available actions and activities in order to consume web services, there isn’t really any solution ahead of the other. However, the question is: what happens before and beyond that web service call? How do you prepare a request, set headers and a potential XML or JSON body, and even more important: how to deal with a response in either format?

While UiPath has a specific action to deserialize any response and then work with individual XML or JSON elements, it’s really the viewer and concept of debugging while you build your robot that sets Kapow apart. Its capability of visualizing JSON and XML is unparalleled, and interacting with it and individual elements is just as simple. Since I find integrating web services in Kapow to be done in much less time, this is a major victory for Kapow – even without the assisted entry for SOAP.

Conclusion and Outlook

This time we covered the building blocks of many robots: files, emails for simple messaging and as one interface to humans, and web services as the interface into most web applications, without the need to resort to Web Automation. Here is the summary:

  • Working with Files: Neutral
  • Integrating Emails: UiPath++
  • Web Services: Kapow++

As always, please get in touch if I missed something or there is something you would like to share. I received so much positive feedback for this series, and while I know that the updates don’t come as frequently as I intended them to do, they will come.

As I feel that there are some specific formats that need a bit more attention, I am considering the next part to be about XML, JSON, Excel and PDF files.