How to create a Birthday Email Automation

  1. From excel, I have to check if user birthday is equal to today’s date.

  2. If there is, use email birthday template.
    I have to edit the template where placeholder is change to the name of the user’s birthday in the excel.
    Is it possible for me to use email birthday template as msg format as there is an image in it. Hence, unable for me to use txt file.
    Do I still need to use send email activity or do i have to use open outlook application as a process start?

If i were to use send email outlook activity is there a way for me to include multiple cc from web application?

1 Like

From excel, I have to check if user birthday is equal to today’s date.

I have attached a sample, go through it, it compares today’s date(“MM/dd”) with the DOB column from the excel.

If there is, use email birthday template.
I have to edit the template where placeholder is change to the name of the user’s birthday in the excel

I have covered this topic also in the file attached.
Do note I have attached a sample temple where the image is Encode in base64.
To see how the template looks in real-time, just copy text file content and paste here http://htmledit.squarefree.com/

I have attached a sample for your convenience, feel free to change or modify the workflow per your requirement.

Do mark this post as a solution if it answers your query.

Birthday_Email.zip (17.0 KB)

2 Likes

@SITI_NUR_ALYSHYIA
Download the revised workflow
everything is there, I had made a few changes and now you can run and see, try to debug 1st.

Yes, you can change the Name in the email template from the Name column of your excel.

mark as a solution, if it answers your query.

Updated_V01.zip (11.8 KB)

1 Like

If my excel column birthdate format is “dd/mm/yyyy”, how to check with today date only with “dd/mm” format?

Hi @SITI_NUR_ALYSHYIA
Check this code to convert a date format in dd/MM/yyyy to dd/mm format

given_date = "02/03/2020" 
given_date = DateTime.ParseExact(given_date, "dd/mm/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd/mm")        

This will convert the date time format from dd/mm/yyyy to dd/mm

Hope it helps you

Nived N
Happy Automation

2 Likes

@SITI_NUR_ALYSHYIA

just follow @NIVED_NAMBIAR solution, it will work like a charm.

please note given_date here is variable

so just use assign and create a variable and assign the date column to the variable.
e.g

in_Date = row("DateColumn").ToString
in_Date =   DateTime.ParseExact(given_date, "dd/mm/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd/mm")
2 Likes

I’ve tried but now I am having error Assign:String was not recognised as a valid Datetime. given_date is a variable of String type, value of “10/01/2020 00:00:00”
But my excel DOB is “10/01/2020”.

Then how do I write the If condition, is it given_date = Date.Now.ToString(“dd/mm”)

@SITI_NUR_ALYSHYIA

See the below-attached screenshot, hope this will give you an idea.
My Date column in excel is in dd-mm-yyyy format but when I am working in my workflow its been converted to mm-dd-yyyy, so when I am using my current date from the system I am just changing its format per my convenience.
So like I checked in my workflow, you should also debug and check the output of the date column data in your workflow first.

Now.ToString("MM/dd").Equals(row("Date").ToString.Substring(0,5)) = True

image

I am also attaching the excel file I used.
Date.xlsx (8.3 KB) Main.xaml (6.3 KB)

1 Like

Hi @indrajit.shah

I notice that the sample template is txt file and your image is encoded in base64. For my case, my template is a .msg file with image in the body of the email. I converted the .msg file to html. But when I run it, the error is that the picture can’t be displayed. So encoding the image in base64 is a need?

In my case, I used base64 encoding of image so even legacy system can get the full image with message, it’s not necessary in your case, but you can give it a try and see what happens.

I didn’t work with.msg file yet.
Btw do you check on the html option of the send email property, if not do so and give it a try.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.