How to Merge PDF Using Automation Anywhere and PDF.co

Sep 2, 2024·5 Minutes Read

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 PDF.co to merge PDFs.

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:

Step by Step Guide

This is a step-by-step tutorial on how to merge PDFs using Automation Anywhere and PDF.co plugin.

PDF.co API Endpoint

PDF.co API Endpoint for merging PDF files. We’ll have PDF.co method documentation handy either by Postman or online documentation at https://developer.pdf.co, so that we can configure API as per our need.

PDF.co API Endpoint

Bot Creation

In Automation Anywhere cloud Control Room, make a new boat for merging PDF files. We’ll be using the “REST Web Service: Post Method” action to consume PDF.co “/pdf/merge” API endpoint. We’ll also get the “Message Box” action attached to the API call output. The final bot structure will look like this.

Bot Creation

URI Configuration

Configure URI to “https://api.pdf.co/v1/pdf/merge” in “Rest Web Service: Post Method” action.

URI Configuration

Headers Configuration

Prepare the Header key with the name “x-api-key” with the PDF.co API key. This API key is necessary for consuming PDF.co APIs. API keys can be found at https://pdf.co.

Headers Configuration

Request Input Configuration

Configure input data to the REST web API call. Here, we’ve created very basic service request data in JSON format that looks like this. Here, we have multiple PDF URLs to be merged in a comma-separated format.

{"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample1.pdf,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample2.pdf", "name": "name"}
Request Input Configuration

Configure Rest API Output

Generate an output variable of type dictionary which will hold the API call response.

Configure REST API Output
Configure REST API Output

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.

Configure Message Box

Execute Bot and Review Output

With these configurations completed, we’re now ready to execute the bot and get the output message box below.

Execute Bot and Review Output

If we open the resulting URL, we’ll see it’s containing a PDF with two pages.

Output PDF

Related Tutorials

See Related Tutorials