Using String Format function to create dynamic message in send outlook mail message

Hi guys,

I’m looking to use the string format function to create a dynamic mail message body in send outlook mail message. Basically, I need to replace a few placeholder values in my txt file for the message of my email. However, I’m having some trouble getting it to work.

This is the body template (its an image file because this forum won’t let me post a txt file):

The three placeholders {1}, {2}, and {3} are supposed to be replaced with the variables “PersName”, “Game” and “Reminder” in my sequence. I’m having trouble using the following body code:

I’ve also attached my xaml file for reference:
Reminder.xaml (11.7 KB)
Database.xlsx (10.1 KB)

Can someone help me get this to work? Thanks in advance!


I checked your workflow and try below way.

String.Format(“Good Day, {0}.” +vbcrlf+ “Please note the following title {1} and {2}.”,“Robotics”,“Process”,“Automation”)

Hello! Thanks for your response. I’m able to substitute {0} for “Robotics.” I’m assuming you mean “Robotics” to be a variable for a certain value. However, the body ends up literally displaying “Robotics” and not the dynamic value I need it to show. Any way around this?


That’s sample example I provided you.

Replace those strings with string variables and give it a try.

Hi @Spacecats7

This might be bit different as what you after, but since you are gonna send out dynamic emails to a list of people, from what it looks like in the database.xlsx, the below sample will loop through all rows in the excel file and send email to each of them, if you want you can add some condition, for example, only email out to the people that reminder day equal today or something.
Dynamic (20.5 KB)

Hope it helps.



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