How to insert name and relevant photo to the birthday wishes template

Hello,

I have to build a Birthday BOT and email to every staff members using their details. I already completed the current date and birth date comparison part and need your guidance on below area,
(1). How to get the birthday wish template ( I already have birthday wish template and I want to get it and insert employee details and relevant photo)

(2). How to insert Name, Designation and relevant photo to the template.

Please give your support to fix this.
Thank you.

Hi @Udesheyy

I think for creating a birthday wish template u can html template
create the birthday wish template using html in notepad.

then read the notepad and then store in string

As sample u can use the below as template

                              <html>
                               <body>
                                 <h2> Happy Birthday Name </h2>

                                  </body>
                                   </html>

now replace string data some data with Name, designation and photo [For photo i reccommened to use this activity : Send Inline Images in Outlook Email - RPA Component | UiPath Marketplace]. In above sample to replace Name, u can use string_var.replace(“Name”,Name) where Name is the variable which stores the name
Then send it

Now u
Regards,

Nived N

Happy Automation

1 Like
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Parisienne' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Alegreya SC' rel='stylesheet'>
<style>

body, html	
	{		
		height: 100%;
		margin-left: 180px;
		margin-right: auto;
		font-family: 'Parisienne';font-size: 22px;
	}
.hero-image
 	{
		background-image: url(1.png);
		height: 16.5cm;
		width:15cm;
		background-position: center;
		background-repeat: no-repeat;
		position: relative;
	}
.hero-text
	{
		text-align: center;
		position: absolute;
		top: 49%;
		left: 45%;
		width:400px;
		transform: translate(-40%, -50%);
		color: black;
		font-family: 'Alegreya SC';
	}
.center
 	{
		display: block;
		margin-left: auto;
		margin-right: auto;
		width: 30%;
	    height:120px;
	}

p.n	
	{
		display: block;
		margin-top: 0.2em;
		margin-bottom: 0.2em;
		margin-left: 0;
		margin-right: 0;
		font-size: 19px;
	}
	p.r	
	{
		display: block;
		margin-top: 0.2em;
		margin-bottom: 0.2em;
		margin-left: 0;
		margin-right: 0;
		font-size: 16px;
	}
	p.d	
	{
		display: block;
		margin-top: 0.2em;
		margin-bottom: 0.2em;
		margin-left: 0;
		margin-right: 0;
		font-size: 14px;
	}
</style>
</head>
<body>
<div Class='hero-image'>

<div Class='hero-text'>
<img src='imageplaceholder'  alt='Paris' Class='center'>

<p Class='n'>Name PlaceHolder</p>
<p Class='r'>Role PlaceHolder</p>
<p Class='d'>( Department PlaceHolder )</p>
<p Class='n'>Date PlaceHolder<sup>Script PlaceHolder</sup>Month PlaceHolder</p>
</div>
</div>
</body>
</html>

You can change background image and user image both.
With can replace placeholder values at runtime and open html and take SS or embed in email