Add Text and Images to a PDF Using Automation Anywhere and PDF.co
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.
In this tutorial, you’ll learn how to create an Automation Anywhere Task Bot that sends a PDF to PDF.co, adds text and images, and displays a download link for the edited document.
Prerequisites
- An Automation Anywhere Community Edition account
- A PDF.co account and API key
- A computer connected to Automation Anywhere through the Bot Agent
Step 1: Access Control Room
Sign up for Automation Anywhere Community Edition. Follow the activation email to set your password and sign in to your Control Room.
Step 2: Create a Task Bot and Connect Your Computer
- Open Automation in the sidebar.
- Select Create → Task Bot.
- Name the bot
PDF.co Add Text and Images. - When prompted to connect your computer, download and install the Bot Agent. This prompt may appear when you first select Run.
- Complete the setup wizard, including enabling the browser extension and connecting your device.
Return to the bot editor once your computer is connected.
Step 3: Add the REST Web Services Action
In the Flow view, use Quick add between Start and End. Search for REST Web Services and select Post method.
Configure:
- URI:
https://api.pdf.co/v1/pdf/edit/add - Authentication mode: No Authentication
- Content type: JSON (
application/json)
PDF.co authenticates this request through the custom header configured next.
Step 4: Add Your PDF.co API Key
- Under Custom headers, select Add header.
- Enter
x-api-keyas the header name. - To enter the key directly for this demo, switch the value type from Credential to Insecure string.
- Paste your PDF.co API key.
- Select Add.
For a reusable bot, you can store the key in Automation Anywhere’s Credential Vault and use the Credential value type.
Step 5: Enter the Request Body
Under Custom parameters → Enter the parameters, paste:
{
"name": "pdf-with-text-and-images.pdf",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"async": false,
"annotationsString": "20;20;0-;PDF updated with PDF.co API;24;Arial;FF0000;https://pdf.co;true",
"imagesString": "100;180;0-;https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png|400;180;0-;https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;https://pdf.co;200;200"
}This request adds red text and two copies of the logo to every page:
urlidentifies the source PDF.annotationsStringspecifies the text, position, font, size, color, and link.imagesStringspecifies the image URLs and positions. The second image also includes a link and dimensions.0-targets every page, starting with page index0.|separates multiple image instructions.
Use PDF Inspector in your PDF.co account to determine placement coordinates for your own document. Refer to the PDF Add documentation for the supported parameters.
Step 6: Capture the Response
Under Assign the output to a variable:
- Select Multiple variables.
- Select Add variable mapping.
- Set Key to
Body. - Create a String variable named
Bodyand map it to this key. - Save the mapping.
Step 7: Display the Result
Add a Message Box action after the REST Web Services action.
In Enter the message to display, enter:
$Body$
The message box will display the API response, including the output URL or an error message.
Step 8: Save and Run
Save the bot and select Run. Complete device connection if prompted.
For a successful request, the response includes error: false and a url. Open that URL to inspect the PDF and confirm that the text and logos appear in the expected positions.
Download the completed PDF before the temporary output link expires.
Related Tutorials

