Inspiration

I wanted to use UIPath to create a mail merge with customized attachments, but I had some shortcomings when I wanted to change the number of attachments dynamically as well if I wanted to send from a shared mailbox. Once this was built a new Idea came along to make an outlook activity to follow up if mails are replied yet. This can be used by a lot of support and help desk departments.

What it does

  1. It starts from your active outlook client and create an email (mailItem). This is similar to the standard 'send outlook mail message'. I added the feature of adding a collection of attachments to the mail as well as the possibility to send from a shared mailbox (like a company helpdesk account). I know you can also do this using the smtp component, but in a lot of companies the business users are not allowed to send directly using the smtp server due to security policies.
  2. Here you start from a mail folder from which you want a list of mails that are replied yet and the once that still waits on a reply

How I built it

Starting from the UIPath tutorial, I create a code activity based on the outlook .net class. I made a test console to test the .net functionality and later on a test module to invoke a workflow.

Challenges I ran into

  1. The Standard UIPath mail activities use the mailmessage object. This was however not suitable for the solution, because for example there is no standard shared mailbox property. Outlook have its own more elaborated object mailItem, which a lot of extra properties. Running through the outlook mail folders was somewhat challenging, some recursive approach was necessary. /li>
  2. The most difficult thing in the second activity was figuring out how to link to messages as reply on each other. I found out that Microsoft has introduced a conversation feature for this.

Accomplishments that I'm proud of

I used this component at my company and created in 3 minutes 200 mails with customized attachment from a shared mailbox. It was used in a demo presented by to the CEO of KBC AM link. This was more robust and much faster than using the outlook GUI and create new mail with copy and paste. I added the component to the uipath gallery and I'm proud it is the most downloaded custom components.

What I learned

I discovered a part of the .net technology behind the UIPath suite, the windows workflow which is very interesting. In my opinion it is better to declare the booleans as inarguments so you can attach a variable to it in the UIstudio, instead of using the tick boxes. For example if you want to test you program you can set 'isDraft' by a variable instead of the tick box. This would allow you to make test xamls for some standard workflows.

What's next for OutlookActivities

I Want to create a native component as container of my code activities and look into a limited GUI to for example select the mail folder. As a further step I also want to resend a mailItem object directly once for example when it is detected as not yet responded in time. And I was thinking of creating a component to send out calendar invites.

Demo's

demo: send mail with dynamic number of attachments and move mail automatically to an arbitrary folder link.

demo: split mails into list of replied and unreplied mails link

Built With

+ 7 more
Share this project:
×

Updates