Click button inside mail body or create button inside mail body


You can form a html email body with this as a hyperlink in that,

<html> <body> <a href=" Approved &body=Hi, Your request is Approved by XYZ(the person to respond) for the below mentioned responsibility: ABCDE, QWERT">Approve</a> <a href=" Rejected &body=Hi, Your request is rejected by XYZ(the person to respond) for the below mentioned responsibility: ABCDE, QWERT">Reject</a></body></html>

User needs to click on the Approve or Reject option and a plain mail will be opened in Outlook, so they need to click on Send button to send the mail with the auto generated text.

How do I use this html tag. It is giving me error when I use it in mail body. Can please help me with the activity to be used. I am using “Send Outlook Mail Message” activity to write this html tag.


Check this xaml and let me know in case any issues.
SendOutLookMail.xaml (5.1

Thanks. This solution is very helpful

Hey Sarathi,

Do we need any kind of configuration made in outlook for new mail to get popped up immediately? Because when I click approve, its asking for some account settings…Can you advise me on that?


While clicking on the approve button it will open a new outlook mail message with a to address mentioned and with this mail message “Hi, Your request is Approved by XYZ(the person to respond) for the below mentioned responsibility: ABCDE, QWERT”.

Do you have outlook installed where you are trying this workflow, check in a machine where outlook installed.

Hey Sarathi,

Thanks for your reply:) Yes I do have Outlook installed. But its asking for adding account when approve/reject is clicked, whereas if i open my mail box in web and click approve/reject, it working as expected(creating new mail to be sent). I don’t understand the issue with outlook installed…do we have to make any settings?


Do you have any mail account configured with the Outlook, if not then configure an account and try again

@sarathi125 I have a mail account already configured…but it still asks for an account to be set up…So I suspect that there is something to do with outlook desktop app and outlook web client


Which Outlook account you are using to send mails…

@sarathi125 do you mean to say that account from which mail is sent to my inbox should be configured to outlook?

So just for someone referring this thread…You just have to make Outlook as your default mail app in your system settings. It works!

Hi All,

I have a similar scenario.

Need to create a bot to read all the mail from outlook and open a particular mail which is for approval(mail triggered from MS Flow for approval) and click on the Approve button on the mail then provide some comments in the section and click Submit button.

Any suggestion would be appreciated.

Thanks in advance.

See this link

1 Like

You need to associate Mailto with Outlook by doing the following

Start-> type: Default Programs-> Set your default programs-> select Outlook-> Set this program as default

Hi Sarathi,

We tried your above mentioned html code in the uipath assign mailbody activity and tried to execute the same.
We are getting below error .

Hi Sarathi,

Please help us with the query posted by Ida.

Have you set the IsHtmlbody as true or not. Set it and check again. Possible share a sample xaml what you are trying

Hi Sarathi,

Thank you so much Sarathi for your swift response.

We are trying the below HTML code in the UiPath Assign activity. Getting the error as “Expected >”. Please use this in your environment and help us Sarathi.

Approve Reject
<a href=" Approved &body= Approved";>
<a href=" Rejected &body= Rejected";>