Email Automation in UiPath

What is Email Automation:

Despite the rise of so many other digital channels, email continues to be one of the most popular means of communication among customers. There were over 3.8 billion registered email users in 2018, according to Lifewire, which means half of the global population is accessible via email!

  • Marketers can use email automation to connect with their consumer base regularly and significantly reduce the time and effort needed to send emails.
  • Once you have configured a business rule, the email automation software will keep following the workflow no matter how large the audience. This has incredible benefits for marketers.
  • Email automation is now a digital marketing staple, replacing the tedious task of manually sending emails to every customer with preconfigured workflows.
  • You can specify what communication should be triggered in response to each customer's behavior. This lets you map a variety of customer journeys and ensure optimum engagement with your brand.

Example : A customer who hasn't purchased a product over a period of time could receive we miss you! Email.

Why Email Automation is Important:

In the early days of your business, it might be feasible to identify leads/customers using website analytics and then manually to send out communications to each customer.

However, as your business grows and your audience begins to expand, email marketing automation is an absolute must-have. It lets you spend more time on framing and designing the best possible communication.

Key Benefits of Email Automation:

Invest time in personalization: With your email marketing team now free from iterative activities; you can turn your attention toward strategic areas such as personalized emails. There are two types of personalization:

  • Personalizing the workflow: So that a new customer, a returning customer, and a frequent buyer, receive unique, relevant messages every time. Customization can be extremely useful when converting leads in today's crowded digital marketplace.
  • Personalize the design and copy embedded in an email : Each email can carry a different name, address, etc., or advertise products that are on the customer's wishlist.

Do more with less : Several case studies and examples of email automation prove that it takes less effort to deploy an automated email campaign, compared to a manual pipeline.

Even if you invest a significant amount of time on personalization, workflow configuration, platform setup, data analysis, etc., you're still saving on non-value adding marketing efforts.

Scale your marketing strategy with minimal effort: If you're dependent on manual efforts, your customer reach will be directly linked to the size of your marketing team.

Example: If everyone in your dedicated email marketing team can send 50 messages a day and you have a 10-person team, that means you cannot scale beyond 500 customers. Email marketing automation, on the other hand, predefines a business rule based on which every customer new and old will continue to receive messages from your brand.

Email Automation Benchmarks :
  • Average Open Rate
  • Average unsubscribe rate
  • Average spam Complaints
  • The average click-through rate

Keyboard Shortcuts in UiPath Studio

Read Email Using UiPath

UiPath has several activities by default, such as:
different-types-of-mail-activities-rpa-uipath

  • The Mail Activities Pack is designed to facilitate the automation of any email-related tasks, covering various protocols, such as IMAP, POP3, or SMTP. UiPath also features activities that are specialized for working with Outlook and Exchange.
  • Activities such as Save Mail Message and Save Attachments are not intended to be used with specific mail protocols. Instead, they save the MailMessage object variable retrieved from activities such as Get POP3 Mail Message to a specified folder on the current machine.
  • For Exchange, the Mail Activities Pack contains the Exchange Scope activity, which is a container that can establish a connection to an Exchange mail server and perform various tasks within it, such as deleting, retrieving, moving, or sending mail messages in a single run.
Reading Email using UiPath:

Create a new process called Email_Automation_Example

email-automation-process-rpa-uipath

Once the process has been opened in the uipath, add the sequence to the designer pane and then add Get IMAP Mail Message activity inside the sequence.
get-imap-mail-message-activity-rpa-uipath

In the Properties panel, you will see some of the properties we need to set for IMAP, Enter the server name and port number in the Properties panel and then enter your email id and password in the Email and Password section.

Here, I am creating a new variable Messagelist_Variable for storing the properties/content from the read from the email, which is nothing but words that are retrieved from Gmail. Search for IMAP settings for Gmail in google, you will find below information:

  • Server:imap.gmail.com
  • Port:993

properties-pane-grt-imap-rpa-uipath

Next, add For Each activity inside the sequence to read the emails which are coming from the IMAP mails. Set item to Mail messages and enter the variable name as Messagelist_Variable.

To set items to Mail Message: Click on the TypeArgument and then select Browser For Types... and then select MailMessage, as shown below.
set-item-to-mail-messages-rpa-uipath
mail-message-rpa-uipath

Next, add Message box activity inside the body of the For Each loop and enter item.Subject inside the Message box activity, which means that we are going to read only the Subjects of the emails present in the inbox.
message-box-inside-the-body-rpa-uipath

Before running the sequence, we have to make some settings in our Gmail account also. Open your email account and go to settings.
setting-in-gmail-account-rpa-uipath

Under Settings, select Forwarding and POP/IMAP option and then select Enable IMAP.

enable-imap-rpa-uipath

Next, go to the security section in your account, The Less secure apps by default will be turned off, make it ON.
enable-less-secure-app-rpa-uipath

Now save and run the sequence in the UiPath Studio. After the execution, the top unread messages will be displayed in the pop-up message box.

Basics of Automation in UiPath Studio

Send Email Using UiPath

Create a new sequence called SMTP_Example
smtp-example-rpa-uipath

Next, add Send SMTP Mail Messages activity inside the sequence
smtp-activity-rpa-uipath

Next, fill the properties for SMTP, Like

  • Host:smtp.gmail.com
  • Port:587

Enter the host address in the server property and then enter the port address in the port property.
property-pane-in-smtp-rpa-uipah

Next, enter the To, Subject, and Body of the mail, as shown below.
smtp-messages-rpa-uipath

Now save and run the sequence; after the execution, go to Gmail account and check, you have received a mail with subject Welcome To UiPath Automation.
inbox-mail-smtp-rpa-uipath

Conditional Statements in UiPath Studio

Get Outlook Messages using UiPath

In this example we are going to extract the messages from the Outlook by using UiPath, Create a new sequence called Get_Outlook_MEssages_Example and add Get Outlook Mail Message activity

get-outlook-mail-message-rpa-uipath

Click on Get Outlook Mail Messages and in the Properties pane create a new variable called Message_Variable in the Messages Property.

create-new-variable-rpa-uipath

Add For Each activity, inside the sequence and set the item to System.Net.MailMessages and then enter the variable(Message_Variable) inside the For Each activity, as shown below.

Add the Message Box activity inside the sequence and then enter the item.Subject in it, as shown below.
add-message-box-inside-for-each-rpa-uipath

Now, save and run the sequence, after the execution, the unread Mails from the Outlook will be displayed one by one in the pop-message box.