Introduction

Sending personalized birthday greetings to clients or employees strengthens relationships and boosts morale. Automating this task using UiPath ensures timely delivery and that no one is forgotten. This guide walks you through implementing an HTML email template for birthday greetings using UiPath RPA.

Table of Contents

  1. Prerequisites
  2. Designing the HTML Template
  3. Setting Up the UiPath Project
  4. Adding and Configuring Activities
  5. Reading Data
  6. Customizing the Email Template
  7. Sending the Email
  8. Testing the Automation
  9. Conclusion

1. Prerequisites

Before you begin, ensure you have:

  • UiPath Studio installed.
  • An email account (e.g., Gmail, Outlook) to send the emails.
  • Basic knowledge of UiPath activities.

2. Designing the HTML Template

Begin by designing an HTML template for your birthday greeting. Below is an example:

Fig2: [Screenshot of Workbook Read Range activity]

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Birthday Greetings</title>
    <style>
        body { font-family: Arial, sans-serif; background-color: #f4f4f4; margin: 0; padding: 0; }
        .email-container { max-width: 600px; margin: auto; background-color: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); }
        .header { background-color: #4CAF50; color: white; padding: 10px 0; text-align: center; border-radius: 10px 10px 0 0; }
        .header img { width: 100px; height: auto; display: block; margin: 0 auto; }
        .content { padding: 20px; text-align: center; }
        .content h1 { color: #333333; }
        .content p { color: #666666; }
        .footer { text-align: center; padding: 10px; color: #999999; font-size: 12px; }
    </style>
</head>
<body>
    <div class="email-container">
        <div class="header">
            <img src="cid:logoImage" alt="Company Logo">
            <h1>Happy Birthday, {{name}}!</h1>
        </div>
        <div class="content">
            <h1>🎉 Happy Birthday, {{name}}! 🎉</h1>
            <p>Dear {{name}},</p>
            <p>We hope you have a fantastic birthday filled with joy and happiness. It's a special day, and we wanted to take a moment to celebrate you!</p>
            <p>Wishing you all the best on your special day!</p>
            <p>Best wishes,</p>
            <p>The {{company}} Team</p>
        </div>
        <div class="footer">
            <p>© {{year}} {{company}}. All rights reserved.</p>
        </div>
    </div>
</body>
</html>

3. Setting Up the UiPath Project

Install Required Packages: Open “Manage Packages” and ensure the UiPath.Mail.Activities package is installed for sending emails.

Create a New Project: Open UiPath Studio, click “New Project,” and select “Process.” Name the project “BirthdayGreetingAutomation” and click “Create.”

image

4. Adding and Configuring Activities

Reading Data

  • Use the Workbook Read Range activity to extract birthday data from an Excel file and store it in a DataTable variable.

Customizing the Email Template

  • Inside a For Each Row activity, loop through the DataTable.
  • Use the Read Text File activity to load the HTML template.
  • Add Assign activities to replace placeholders like {{name}} and {{company}} with actual values from the DataTable.

Sending the Email

Set the customized HTML template as the email body, and ensure the “IsBodyHtml” option is selected.

Use the Send Outlook Mail Message activity to send the personalized email.

5. Testing the Automation

Verify that the emails have been received correctly by checking the recipient’s inbox.

Run the workflow and check the output panel for any errors.

Fig3: [Screenshot of Assign activities inside For Each Row]

image 2

Fig4: [Screenshot of Send Outlook Mail Message activity configuration]

image 3

5. Testing the Automation

Verify that the emails have been received correctly by checking the recipient’s inbox.

Run the workflow and check the output panel for any errors.

Fig5: [Screenshot of the output panel and received email]

image 4
image 5

6. Conclusion

By automating birthday greetings with UiPath RPA, you save time and guarantee that no one is overlooked on their special day. This streamlined process ensures timely, personalized greetings, which you can easily adapt to your specific requirements.

Happy Automating!

Tagged in:

,