How to make my program loop continuously?

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?

Hello @CalvinW,

Where would the keyword appear?
In the subject?

Yes, in the subject.

I’m using Outlook if that helps

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

Where do i type this?
Output> MailMessages?

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)

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…

Is your outlook configured properly?

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

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

See if this helps

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

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

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?

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

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

How do i do that?

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.

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

Still not working?

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