In this tutorial, we will show you how to extract invoice data from PDF using PDF.co and UiPath.

  1. Create New Process
  2. Add PDF.co Package
  3. Add PDF.co Scope
  4. PDF.co API Key
  5. Add PDF.co API Call
  6. Add Document Parser Endpoint
  7. Add Input Request
  8. Add Output Response
  9. Add Message Box
  10. Add Message Box Output
  11. Run Workflow
  12. Document Parser Result

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 here.

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 here.

To create your Document Parser template from scratch, please check out this page.

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.

Related Pages:

Related Samples: