Tengo una duda, estoy realizando un proceso sobre el envio de correos para fechas de cumpleaños esto se maneja mendiante un excel el cual tiene las fechas de nacimiento y fechas de siguiente cumpleaños quiero saber como hago para que el bot busque las fechas las compare y guarde el nombre de esas personas para asi enviarles el correo a cada una de ellas.
Hopefully my english can translate well for you, but here is an idea for your question.
Let’s say you have an excel like this:
Name Email Birthday
Jesus jesus@heaven.com 12/25/2019
and there could be many rows.
So, first thing is you need an Excel Read Range.
Then, you need to compare the date with current date.
Then, send email (probably using SMTP activity)
Here is some fake code to present this idea:
Excel Scope
Read Range // store to data table, like bdaysData
For each row in bdaysData
If activity: Convert.ToDateTime(row("Birthday").ToString.Trim) = Today
Send SMTP // row("Email").ToString
You can also take a shortcut by filtering the data to loop through only the birthdays, using some .net:
Excel Scope
Read Range // store to data table, like bdaysData
Assign activity: bdaysArray = bdaysData.AsEnumerable.Where(Function(r) Convert.ToDataTime(r("Birthday").ToString.Trim) = Today ).ToArray
For each row in bdaysArray
Send SMTP // row("Email").ToString