New: PDF/A-3b conversion with a compliance report included.See Docs

Convert PDF to CSV Using Automation Anywhere and PDF.co

Create a Task Bot that sends a PDF to PDF.co and returns a download link for the converted CSV. No PDF.co plugin is required.

Prerequisites

  • An Automation Anywhere account.
  • A PDF.co account and API key from the PDF.co dashboard.
  • A PDF containing tabular data. You can use the sample file included below.

Step 1: Sign In and Connect Your Computer

Sign in to your Automation Anywhere Control Room. For a new Community Edition account, follow the activation instructions sent by email.

Install the Bot Agent when prompted. Complete the setup steps to enable the browser extension, connect your computer, and register your device.

Step 2: Create a Task Bot

Go to Automation, select Create, and choose Task Bot.

Name it PDF to CSV.

In the bot’s Flow view, use Quick add between Start and End. Search for REST Web Services and select Post method.

Step 3: Configure the Request

Enter this URI: https://api.pdf.co/v1/pdf/convert/to/csv

Set Authentication Mode to No Authentication. PDF.co authenticates this request through a custom header.

Under Custom headers, add:

  • Name: x-api-key
  • Value: Your PDF.co API key.

For a quick test, switch the value input from Credential to Insecure string to enter the key directly. For a shared or production bot, store the key in Automation Anywhere’s Credential Vault and use the credential option.

Set Content type to JSON (application/json).

Step 4: Add the Request Body

Under Custom parameters → Enter the parameters, paste:

{
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-csv/sample.pdf",
  "name": "result.csv",
  "inline": false,
  "async": false
}

Replace url with a direct, accessible PDF URL when processing your own document.

This configuration returns a download link for the CSV. It uses synchronous processing, which is suitable for a small sample document. See the PDF-to-CSV documentation for available parameters.

Step 5: Capture the Response

Under Assign the output to a variable:

  1. Select Multiple variables.
  2. Choose Add variable mapping.
  3. Set Key to Body.
  4. Create a String variable named Body and map it to this key.
  5. Save the mapping.

Step 6: Display the Result

dd a Message Box action after the REST Web Services action.

Set its message to:

$Body$

The message box will display the API response, including the CSV download URL when conversion succeeds.

Step 7: Run and Download the CSV

Save the bot and click Run. Complete any remaining device-connection prompts.

Check the response for "error": false, then copy the url value into your browser to download the CSV. Open it in a spreadsheet application and compare the extracted rows and columns with the source PDF.

Save the CSV before its temporary download link expires.

Step 1: Optional: Extract a Specific Area

To limit extraction to one table or section, use the PDF Inspector to determine the area’s position and dimensions.

Add an ExtractionArea profile to the request using your own [x, y, width, height] values. Refer to the Profiles documentation for the supported format and options.

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

Related Tutorials

See Related Tutorials