I have a file which contains names in one column. I already have a flow set up that has a For Each Row to create an email for each row that has an email in the Email Address column. However, I want to send an email using outlook desktop (or outlook 365, if I cant achieve this using desktop) where I will insert the name into the body of the email (“Dear xx,”) sending the same email to every person on the spreadsheet, but the name will be different of course.
Might be the email body would be static regardless to the name, so as you mentioned (“Dear xx,”) in this in the place of xx you can put the name of person you are getting from the for each activity, this you can get it using the replace function mailBodyString.Replace(“xx”,item(“Name”).ToString)
Hi @Sanjit_Pal , thanks for your reply. As I am new to StudioX, where exactly do I insert the " mailBodyString.Replace(“xx”,item(“Name”).ToString)"?
Also, to provide more context, my file has a “Name” column next to the “Email Address” column, so the Name would be pulled from the file into each email sent.
@fernando_zuluaga as you said your name should be dynamic, so for this in the place of name you can write any static word(for example: XX) and you can replace that static word with the name you getting from the datatable.
Hi @jibroni,
You can directly use the assign activity to do this.
maiilBodyString = maiilBodyString.Replace(“Email: ”,item(“Email Address”).ToString) LeftSide = RightSide
This, combined with the for each excel row, I am able to send an email to each person on my spreadsheet and replace the XX using the add data value, by mapping the data value to the excel row that contains their names.