UiPath AI Center™

UiPath AI Center™

Email AI

AI Solution Templates > Email AI



The Email AI Template is currently in public preview.
UiPath is committed to stability and quality of our products, but preview features are always subject to change based on feedback that we receive from our customers. Using preview features is not recommended for production deployments.

The Email AI Template solution is still supported for existing users, but for more complex use cases the Re:infer solution is highly recommended. For more information on Re:infer check the official documentation.



This template provides a recipe to build your own Email AI Solution. The template helps achieve the following goals:

  1. Detect intent to organize and route emails to different department.
  2. Discover high value and urgent emails based on business needs and sentiment.
  3. Extract entities to execute data entry and escalation workflows.
  4. Show the impact of AI enhanced automation on Insights Dashboard.

Template contents

To achieve the above four goals, this template bundles the following in one single zip file, called, which can be downloaded from here:

  • Machine Learning (ML) Models (available in UiPath AI CenterTM)
  • Sample Datasets (inside the classification_data and ner_data folders)
  • Sample Workflows (inside the SMA_SmartMailAutomation and NER_Validation_Station folders)
  • Standard Analytics
  • Human in the loop and continuous learning of ML models
  • Configuration file (Config.xlsx)

Machine Learning Models

Sample Datasets

Sample dataset are used to quickly test the models and create additional datasets specific to your use case.
The Email AI template bundle contains two sample datasets:

  • Sample Tagged Email Dataset for Multi-Lingual Text Classification model (Email_Classification_data.csv) - this sample is used to classify emails between the following classes:
    • Transaction issues
    • Loan issues
    • Misinformation or clarification issues
  • Sample Tagged Email Dataset for Custom NER model (Email_NER_data.txt) - the following entities are labeled:
    • ID
    • PER
    • ORG
    • AMOUNT

Sample Workflows

Sample workflows are used to run the models in pre-built workflows to see the power of AI, curate additional dataset, and customize the workflows if needed.

Sample business scenario workflow

The first thing that the automation does is to read all emails in a folder and clean the data. The workflow is configured to read emails from CSV or a folder in Outlook but can be extended to be triggered on new incoming emails. After reading new messages, the automation predicts the intent, entities, sentiment, and maps the email to question in the knowledge bank (supplied in the faq_data folder to workflow). Low confidence predictions go to Action Center, and then to AI Center Dataset.

Depending on the prediction, there are three possible scenarios:
Loan Issue: Data entry to CSV file and prioritize emails with loan higher than $10,000
Transaction Issue: Data entry to CSV file and prioritize emails with transaction value higher than $10,000
Misinformation or Clarification Issue: Extract the response from knowledge base for the mapped question

This execution workflow is also responsible for creating logs that can be consumed by the Insights dashboard queries.
After the prediction is done, a sample response for responding to incoming emails is created. The sample response can also be configured in the Config.xlsx file.

Standard Analytics

In case of the demo provided, the information in the Insights demo looks similar to the screenshot below:


The Insights dashboards for Email AI is comprised of the following widgets:

Widget nameWidget typeDescription
Number of Emails ProcessedInputDisplays a cumulative total of all emails processed to date.
Automation DistributionPie ChartPercentage of automation used, distributed by:
Corrected by Human
Handed over to Human
Distribution of Intents Pie ChartPercentage of intents used, distributed by:
Transaction Issue
Request for Information
Loan Issue
Corrected by Human
Handed over to Human
Distribution of Entities Pie ChartPercentage of entities used, distributed by:
Corrected by Human
Handed over to Human
Distribution of Sentiments Pie ChartPercentage of sentiments used, distributed by:
Handed over to Human
Corrected by Human
Very Negative
Very Positive
Distribution of FAQ Questions Pie ChartUsage percentage of each FAQ question received.

Human in Loop and Continuous Learning

The sample business scenario workflow provided pushes the low confidence data to Action Center for human validation and then to AI Center. For the Custom NER model, the NER_Validation_Station workflow is provided that can be used to validate custom entities and then push the data to AI Center.

Configuring Email AI

Step 1: Train and deploy ML SkillsThe following ML Skills need to be trained and deployed:
Multilingual Text Classification
Custom Named Entity Recognition
Semantic similarity
Sentiment Analysis
Step 2: Make all ML Skills public and copy the URL and API keyCopy the URL and API keys of the deployed ML Skills. For more information on how to do this, check Step 2: Make all ML Skills public and copy the URL and API key.
Step 3: Use the SMA_SmartAutomationMail workflow and configure environment variablesFor more information on which environment variables need to be configured and how to do that, check Step 3: Download the Email AI execution workflow and configure environment variables.

The workflow is ready to run with the necessary configurations provided.
Step 4: Go to the Insights dashboard and run the queriesConfigure the following queries in the Insights dashboard:
To be added soon.
To be added soon.
To be added soon.
Step 5: Configure human in the loop for NERAfter running the execution workflow, the low confidence data from Custom NER model is collected in the training_data sub folder in the NER_Validation_Station folder. Run the workflow in there to validate the data and change if needed. Now this data can be manually uploaded to AI Center or you can configure validation station to upload the data to the AI Center Dataset folder.
Step 6: Extend Email AI to your needsNow that we have seen how Email AI can automate your inbox, it is time to look into common inboxes of your company and extend this solution template to a solution.

Step 1: Train and deploy ML Skills

1.1 Train the Text Classification Dataset model and deploy as ML Skill.
1.2 Train the NER Dataset model and deploy as ML Skill.
1.3 Deploy the Semantic Similarity Model as ML Skill.
1.4 Deploy the Sentiment Analysis Model as ML Skill.

Step 2: Make all ML Skills public and copy the URL and API key

For more information on how to make ML Skills public and generate a URL and API key, see Managing ML Skills.

Step 3: Configure the Email AI demo

3.1 Configure the API URL and keys for the ML Skills and Dataset folder in the ML Config sheet of the Config.xlsx.
3.2 Configure the following parameters:
a. UnreadLocalMailFolder to the folder demo_emails.
b. OrchestratorFolderPath to a folder in your Orchestrator.
c. FAQDataPath to a the folder faq_data.
3.3 In the workflow, set the ConfigFilePath argument to the Config.xlsx file provided.
3.4 Run the workflow, go to Action Center when the workflow pauses to validate the data.

Step 4. Go to the Insights dashboard and run the queries

This information will be added soon. For the moment, skip this step.

Step 5: Configure Human in Loop

5.1 Open the workflow from the NER_Validation_Station folder.
5.2 From Package Manager, add the UiPathTeam.CustomNER.Activities.1.0.0.nupkg dependency found inside the NER_Validation_Station folder.
5.3 Set the config environment variable to the file path of the Config.xlsx file provided in the outer folder.
5.4 Validate the data and edit it if necessary.
5.5 The data will be written back to AI Center folder configured in Config.xlsx.

Step 6: Extend Email AI to your needs

The Email AI solution template can be configured according to your project's needs. To do this, you can change the configuration parameters in the Config.xlsx file.
When training with your own data, be sure to configure at least the following configuration parameters:

  1. Classifications
  2. NamedEntities
  3. SemanticSimilarityOnlyIfType
  4. UrgencyEntityType
    Finally, to extend NER_Validation_Station to new workflows, update the taxonomy.json file in the DocumentProcessing sub folder under the NER_Validation_Station folder.

Updated 3 months ago

Email AI

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.