Is it possible to check the email and initiate actions when email received?
For example, if a user has sends an email with the header like ‘ACTION: start downloading report’. Can a UiPath identify that an email has been received with this header and from this start an automated process?
Otherwise, it is possible to monitor a folder instead and when a text file (for example) is saved there to initiate an automated process?
I did this some time ago … just as a test. The basic idea is to write a text file every time an email reaches a certain folder … I’m not sure it even works ? But the most important thing is for you to see that it is good old VB. so give it a go !
Hey! here is an example. in this example, if the mail contains attachment then they are saved in a particular folder otherwise bot replies to the sender saying you have forgotten to attach files in the sent mail.
I did something similar and it works fairly well. The codes saves the contents of the email into a text file.
Dim objItem As Object
Dim myFolder As Folder
If Not TypeName(myItem) = "Nothing" Then
If LCase(myMail.Subject) = "SubjectKeyword" Then
strname = myMail.Subject
strdate = Format(myMail.ReceivedTime, "yymmddhhmmss")
myMail.SaveAs "C:\EmailFiles\" & strdate & ".txt", olTXT
I have then a process that picks up new files in the folder, reads the contents and acts upon the information received
There is a problem thought that the text is wrapped, so I had to find a way to merge the text