Extract Invoice Data from PDF using PDF.co and UiPath

In this tutorial, we will show you how to extract invoice data from PDF using PDF.co and UiPath. PDF.co is great for extracting invoices. So, let’s get started:

Step 1: Create New Process

To begin the UiPath invoice data extraction, let’s create a new blank process.

New UiPath Process

Step 2: Add PDF.co Package

Click on Manage Packages –> All Packages. Look up PDF.co in the packages and install.

Install PDF.co Package

Step 3: Add PDF.co Scope

Let’s drag the PDF.co Scope into the main workflow.

PDF.co Scope

Step 4: PDF.co API Key

Add your PDF.co API Key between the double quotes. You can get your API Key in the dashboard.

Enter PDF.co API Key

Step 5: Add PDF.co API Call

Now, drag the PDF.co API Call inside PDF.co Scope.

Add PDF.co API Call

Step 6: Add Document Parser Endpoint

In the PDF.co API URL field, enter this endpoint with double quotes “https://api.pdf.co/v1/pdf/documentparser”

Enter Document Parser Endpoint

Step 7: Add Input Request

In the Input Request field, enter the Input JSON. Below is a sample request:

"{ ""url"": ""https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf"", ""outputFormat"": ""JSON"", ""templateId"": ""1"", ""inline"": ""True"" }"
Enter Document Parser Input JSON

The JSON code contains the url, outputFormat, templateId, and inline parameters. If you have created a custom template, you can get the templateId on the Document Parser page.

To create your Document Parser template from scratch, please check out the Template Editor.

Step 8: Add Output Response

Let’s set the variable OutputResponse for our Output Response.

Set Output Response

Step 9: Add Message Box

Let’s use a Message Box to display the output. Click on the plus icon and type in Message Box.

Add Message Box

Step 10: Add Message Box Output

In the Text field, type in the OutputResponse variable.

Add Message Box Value

Step 11: Run Workflow for UiPath Invoice Extraction

Now, click on Run the workflow to see the result.

Run Workflow

Step 12: Document Parser Result

Here’s the PDF invoice that we parsed using the PDF.co Document Parser API.

Document Parser Result

In this tutorial, you learned how to use PDF.co and UiPath for invoice data extraction. You learned how to add PDF.co as a package in UiPath. You also learned how to set up the workflow for the Document Parser using PDF.co API Call.