Send Inline images in Outlook UiPath

Sending inline images is something that we always come across as below scenarios:

  • After completing the whole process and sending the exception screenshots.
  • After completing the process sending either a success/ failure mail.
  • When saving the images in a report such as an HTML report.

In order to send inline images, we have to convert the images to base64 images.

Why do we need to change the image to base64?

Base64 is an encoding schema used for representing binary data in a text format.

This comes in handy when the storage or delivery medium does not support binary data such as when embedding an image into a database, CSS files, or HTML.

Where image file path is your image path.

We can pass this base64Image to Send outlook Mail Message Activity but if you want to have a dynamic width and height then follow the below step before sending mail.

Where ImageWidth is image width as an integer and ImageHeight is image Height as an integer.

Finally, pass that strBody in the Body section of Send Outlook Mail Message Activity as shown below:

Want to send multiple inline images in Outlook?

First, we need to create a variable(images) of type Array of strings that hold all the image file paths.

Now after creating that we need to create one more variable(bodyimages) of type string which will be our final string which contains all our base64 conversion of all images.

Finally, pass the string variable to the Body property in Send Outlook Mail Message Activity.

Follow the below steps to achieve this task:

That’s all for this post on sending inline images using Send Outlook Mail Message Activity.

Let me know your thoughts on this post whether useful or not and also your valuable feedback that helps to improve moving forward.

Happy Learning!

Like this post then let your friends know about this-:

Leave a Reply

Your email address will not be published. Required fields are marked *