Instant Estimate +44(0)1908738254
YOUR EXPERT RPA PARTNER

Team up with our RPA strategy and tech specialists for maximum automation impact

Find out more
Harness the power of UiPath in your business.
WATCH NOW

Save money and spend more time on priority work.

Book consultation
READY, SET, AUTOMATE

Let's choose, design and deploy a process automation solution for your business.

Find out more
TRANSFORM YOUR BUSINESS

Let's analyse your business to discover opportunities for innovation and automation.

Find out more

Begin your business transformation journey

Book consultation
AUTOMATE EVERY FUNCTION

Automate where it matters most. Scale to solve challenges in every area

Find out more
GIVE EVERY TEAM THE TOOLS FOR SUCCESS

Equip people with user-friendly solutions that save time and make work easier

Find out more

Which business problem
can we solve first?

Book consultation
16 May 2023

Automating Email Processing with UiPath – Extracting PDF Attachments, OCR, and Data Entry into Excel using UiPath

In today’s digital age, processing large volumes of emails and extracting crucial information can be time-consuming and error-prone. With the help of Robotic Process Automation (RPA) tools like UiPath, this task can be automated, improving efficiency and accuracy.

In this blog post, we will explore how to use UiPath to read emails from an inbox, download PDF attachments, perform Optical Character Recognition (OCR) on the extracted data, and enter the relevant information into an Excel spreadsheet.

Let’s dive in!

Prerequisites:

  1. UiPath Studio installed on your machine.
  2. A valid email account (e.g., Gmail, Outlook) with IMAP or POP3 access enabled.
  3. Microsoft Excel installed on your machine.

Step 1

Setting up UiPath Project

  1. Launch UiPath Studio and create a new project.
  2. Choose a suitable name and location for your project.
  3. Select “Process” as the project type and choose your preferred framework.

Step 2

Configuring Email Activities

  1. Drag and drop the “Get IMAP Mail Messages” or “Get POP3 Mail Messages” activity onto the workflow.
  2. Configure the activity properties by providing the email server details, login credentials, and mailbox folder to read emails from.
  3. Set other optional parameters like the number of emails to retrieve or filtering options based on sender, subject, or date.

Step 3

Looping Through Emails and Downloading Attachments

  1. Add a “For Each” loop activity and configure it to iterate through the retrieved emails.
  2. Within the loop, use the “Save Attachments” activity to download PDF attachments from the emails.
  3. Specify the download location and choose the file types to save (e.g., “*.pdf”).
  4. Optionally, you can perform additional checks, such as verifying if the email has attachments or filtering specific attachment types.

Step 4

OCR Processing

  1. Drag and drop the “Read PDF with OCR” activity onto the workflow.
  2. Set the input as the path to the downloaded PDF file.
  3. Configure the OCR engine settings based on your preference (e.g., language, OCR engine, scale, and rotation options).
  4. Specify the output variable to store the extracted text from the PDF.

Step 5

Writing Data to Excel

  1. Add an “Excel Application Scope” activity to establish a connection with Excel.
  2. Use the “Write Cell” activity to enter the extracted data into the desired cells of an Excel spreadsheet.
  3. Configure the activity by specifying the file path, sheet name, and cell reference.
  4. Map the extracted data to the corresponding cells, ensuring proper formatting if required.

Step 6

Error Handling and Logging

  1. Implement error handling mechanisms using the “Try Catch” activity to gracefully handle exceptions during the automation process.
  2. Utilise the “Log Message” activity to log relevant information, such as successful email processing, error details, or debugging messages.

Step 7

Run and Monitor the Automation

  1. Save and run your UiPath automation project.
  2. Monitor the execution to ensure emails are being processed correctly, attachments are downloaded, OCR extraction is successful, and data is entered into Excel.

Conclusion

By using UiPath’s powerful automation capabilities, we can streamline the process of reading emails, extracting PDF attachments, performing OCR, and entering the data into Excel.

This blog post covered the essential steps to achieve this automation workflow. Feel free to explore additional features and activities provided by UiPath to enhance and customise the automation according to your specific requirements

Are you looking for an automated email processingĀ  and OCR data extraction solution using UiPath RPA?