Send dynamic email body

Hi guys,
Can anyone tell me that how i can mail dynamic body through outlook?
Actually i want to send mail in below format-
Hi all,
This is the req id for automation
12344
456677
44666

Thanks
And this id is change as per req.

@Megha_Kosta

Pass Variable in the mail body to make it dynamic.

Can u tell the format of it

image

make variable for your id and pass this id in the mail body as shown in the image.

But it will take only 1 id

@Megha_Kosta,

Initialize all variables with respective values before you put them in body, title, to, cc, name etc.
then your mail would be dynamic based on value

@Megha_Kosta

Just you can create a array value or else value stored into DT.

Then you can call For each activity and update the input value “Array” Variable. Inside of the body, you can use “Send SMTP Mail Message” activity. Update the information like “To Mail Id (Variable)”, “Subject (Variable)” and Body of the email “This is required id”+item.tostring.

I hope this steps will help you.

Happy Learning :slightly_smiling_face:

Can u pls send a sample of it?

@Megha_Kosta - Please refer the xaml file. [

Main.xaml (7.2 KB)

Happy Learning :slightly_smiling_face:

But value is changed everytime.

And how we change value in email body?

you mean entire content ?

Yes,when i run the bot so body value would changed everytime and those value i got after run a bot those value i have to send as a mail

Are you using any template or word or excel file for email body. That would be great to understand for your requirement.

How to store dynamic value in excel as well as passed in email body

@Megha_Kosta

If you are using excel file for email body, for example
image
Then you can use excel application scope and read range activity to read your datatble and iterate this datatable in for each row…After that use assign activity to store Id as shown in img.
Then you can send email using send smtp activity.

image

@Megha_Kosta - Please refer this below link, then you will get clear picture for dynamic variable. (i.e. Dynamic email id, subject & Email body).

Dynamic Email Body.zip (17.0 KB)

Happy Learning :slightly_smiling_face:

ref this