How to Convert PDF to XML Using Automation Anywhere and

About Automation Anywhere

Automation Anywhere is a technology company headquartered in San Jose, California, USA. It is a provider of an end-to-end Robotic Process Automation (RPA) and Artificial Intelligence (AI) platform for automating any business process. They offer Discovery Bot for fast-track automation, IQ Bot for transforming unstructured and hidden data with AI that can learn on its own, Bot Insight for real-time analytics, and a Bot Store to get pre-built automation solutions.

We prepared this step by step tutorial with screenshots on how to make a Bot using to convert PDF to XML.

In this tutorial, we assume that you have already had a Community or Enterprise version of Automation anywhere with chrome extension as well as client agent already installed. We also assume that you have basic knowledge of how to create a simple bot and have it executed on your machine.

Useful resources:

Automation Anywhere API Documentations Postman Collection
PDF Multitool

Step by step guide:

  1. API Endpoint
  2. Bot Creation
  3. URI Configuration
  4. Headers Configuration
  5. Request Input Configuration
  6. Configure Rest API Output
  7. Configure Message Box
  8. Execute Bot and Review Output

This is a step-by-step tutorial on how to convert PDF to XML using Automation Anywhere and plugin. API Endpoint API Endpoint for converting PDF to XML. We’ll have method documentation handy either by Postman or online documentation at, so that we can configure API as per our need.


Bot Creation

In Automation Anywhere cloud Control Room, create a new boat for extracting data in XML format from input PDF. We’ll be using “Rest Web Service: Post Method” action to consume “/pdf/convert/to/xml” API endpoint. We’ll also have the “Message Box” action attached to the output of the API call. The final bot structure will be as follows.


URI Configuration

Configure URI to “” in “Rest Web Service: Post Method” action.


Headers Configuration

Create a Header key with the name “x-api-key” with the API key for This API key is main for consuming APIs. API keys can be taken from


Request Input Configuration

Configure input data to the REST web API call. Here, we’ve created very common JSON service request data that can be found below.

{"url": "", "name": "result.xml"}


Configure Rest API Output

Make an output variable of type dictionary that will include the API call response.


Configure Message Box

Drag and Drop the “Message box” action and attach it after the “REST Web Service: Post Method” action. Here, we’ll configure “message to display” with the “Body” property of the output variable.


Execute Bot and Review Output

Having these configurations ready, we can now execute the bot and see the output message box. The following shows what our input PDF looks like in this bot.

Bot output message box looks as following.

If we open the output URL in any text editor, it’ll contain XML representation of input PDF data. In addition to the standard text, output also contains additional properties such as font, page no, data position, etc.

Now, you’ve learned how to convert PDF to XML using Automation Anywhere and plugin.