I want to automate email for birthday wishes. I have following data in excel.
What will be the steps in AE Proces Studio.
- You can first fetch the details using Excel Input Step
- Set a variable with current date in Modified Java script Step and compare it with Date from previous step.
- If the date/Month is equal to current date(not year) the you can fetch the email address, name and Send email using Send email step to Specific user.
Thanks for your input. However, I have tried with the same logic before in Modified Java Script Step, but it did not work. The required Email is not getting retrieved. Please note the excel that I used contains one DOB as today’s date (Oct 12).
The code works fine, you can check the demo workflow as below
date_operations.psw (21.8 KB)
Thank you for your input.
However, with your given solution it didn’t work either. Later on I found out the actual issue in the code itself. I altered the code logic and it worked finally.
What change you have done? can you share?
Sorry for the late reply.
Here is the code that I used:
var dobDateMonth = date2str(DOB, “dd-MM”);
var today = new Date();
var todayDateMonth = date2str(today, “dd-MM”);
if (dobDateMonth == todayDateMonth)
mail = true;
mail = false;