Intelligent document processing with

Intelligent document processing (IDP) with

This robot demonstrates the usage of library RPA.Base64AI for detecting document types and extracting the structured data from any of their supported document types.

What you'll learn with this reference architecture

  • Using RPA.Base64AI for categorising document types and extracting structured data
  • Working with Work Data Management with Producer/Consumer robot template
  • Triggering robots with emails
  • Using RPA.Notifier to send Slack messages

The reference architecture splits tasks to separate steps allowing the hyperscaling of the automation operations. However, the example simplifies the tasks af the document extraction and simply has a case-by-case handler per document type that sends key details of the document to Slack.

How does it work

  • The robot is divided in a producer and consumer tasks:
    • The producer parses email attachements and sends the extraction request to API. The first task produces a work item for each supported attachment that has the JSON response from API as the payload.
    • Consumer processes each work item, and for the demonstration purposes sends the information of the document type to a Slack channel. This is where one would implement the business logic for each document type.
  • There are size limitations of the work item payload size (100 000 bytes), the implementation will not handle the over the max size situations.
  • The implementation demonstrates parallel processing capabilities of Robocorp platform, as each output work item from the producer is realeased for the processing by Consumer immediately when ready, and there can be multiple parallel executions of Consumer robots.


  • Get a free (or paid) API key from
  • Create a Vault in Control Room called Base64 that has two secrets called email and api-key.
  • Create a Slack webhook that allows posting to your workspace.
  • Create a Vault in Control Room called Slack that has two secrets: webhook that contains the webhook URL that you got from Slack, and channel which is the channel where the messages are posted.

Running the robot

While it's possible to run the robot in your development environment with the provided example data, it's meant to be used with email as a trigger. Once you have uploaded the robot code to the Control Room, configure a new process with two steps following the example of the picture.

Then add new email trigger under Schedules & Triggers tab, and make sure to have both Parse email and Trigger process checkboxes selected. You should have things set up like in the screenshot below.

Now, running the process is easy. Just send an email with some attachemts to the email address shown in the Control Room, and wait for the results. Easiest way to view the full response of API is to look for Work Data for each run of the Consumer task through Control Room. See the details in the screenshot below.

Discover more robots