How to make my program loop continuously?

loop
email

#1

The program I want to make checks my email every 5 minutes and if the keywords “Run ABC” appears, the program will run.

Any idea how i can accomplish this?


#2

Hello @CalvinW,

Where would the keyword appear?
In the subject?


#3

Yes, in the subject.

I’m using Outlook if that helps


#4

Use a get imap activity and mark OnlyUnreadMails option and put top=1
that way you’ll get the first unread email only

Then use mail(0).subject to get the subject of that email and use if condition to match if the subject=“RUN ABC” then take the appropriate action and after that loop it back to the get imap activity


#5

Where do i type this?
Output> MailMessages?


#6

Check out this workflow i created for you :slight_smile:

This will infinitely run until you manually stop the execution. If it finds a new unread mail(assuming all other mails are read) it will pick the subject and check if it equals “Run ABC” and then after the appropriate action wait for 5 min and then again check for a new mail

If it doesnt find a new email in the first go, it will waill for 5 min and check again! :slight_smile:

emailtest.xaml (13.5 KB)


#7

This is very helpful! :smiley:
However, i do not know the server and port for Outlook, I tried changing it to Outlook, but I get this error…
image


#8

Is your outlook configured properly?

So you’re not working with gmail and want to work with outlook?


#9

Yup I need to use Outlook.
This is how i configured the Outlook.(I changed my email to Account)


#10

See if this helps

I haven’t personally encountered this issue, it works fine for me!


#11

That article does not really help and i am getting the exact same error as the one asking the question


#12

Can your try changing the ‘Mailfolder’ property to some other folder and see if you are still getting the message?

Also,have you used this activity before?


#13

I have never done anything like this before, this is the third day i have access to Uipath


#14

Please try reinstalling the mail activities package! Maybe there is an update available!


#15

How do i do that?


#16


#17


#18

Can you go to install, uninstall this package, then go to available and install it again.

Also have sure you are signed in,
and try leaving the Account property empty.


#19

I have done this, i created a new file under Inbox and named it ABC. This is my Outlook properties,


#20

Still not working?

Keeping Mail Folder as inbox and account empty also didn’t work?