Hi, i would like UiPath to automated sending emails.
Firstly i use For Each Email activity for my emails on outlook. Then i require the bot to enter a website, which i use app browser activity, to pick out the reference number. I need the bot to find the reference number based on the email address in the For Each Email activity that match the email address on the website.
I am able to replace the innerText with my variable (“EmailAddress”). But given the constant change in email address in for each email activity, the system keeps telling me to key in a default value. I tried putting like CurrentEmail.SenderEmailAddress.ToString but the system does not allow and requires a default value.
Anyone can help me? my variable is “EmailAddress” = CurrentMail.SenderEmailAddress.ToString.
Could you please share the selector details as well
Usually - it is given like this if you want to pass some variable values into a selector
Put a message box to see what is the value coming in the passing variable before this selector
I replace the current “myemail@gmail.com” with variable “EmailAddress”.
I shows that my value is empty.
In my variable panel, i have keyed in “CurrentMail.SenderEmailAddress.ToString”

I am aware that the Default column requires a Default value. But if my value changes for every email (which is different email address), how do I pass my variable in fuzzy selector?
Hi @mnurhaikal
You could try using “myemail@gmail.com” itself as the default value.
But the email address is changing for every email.
Must he variable contain a default value? cant it be like this CurrentMail.SenderEmailAddress ?
Default value will be taken only if the variable does not contains value
In your case - you can give any email id as default. Put it in double quotes.
It wont be used in the process as your variable is always overwrite by the actual value while doing the loop
Example - “somedummyvalue@gmail.com” will also work
1 Like
ohh. understood. but if i wana check the email subject?
Lets say there are 2 email address of the same value. But the difference is the subject.
How do i tell the bot to pick the one that matches the email and the subject?
While using For Each Mail activity, You have all the required properties in the Mail object
To check - use a message box and see the values coming in CurrentMail.Subject
When you enter CurrentMail. - It will give all the options available
But can the fuzzy selector detect a non fixed value.
eg: CurrentMail.SenderEmailAddress instead of “myemail@gmail.com”.
I have looked online and have not seen an example that uses for each activity in the fuzzy selector.
You have to modify your selector accordingly
Anyways you are using EmailAddress variable in your fuzzy selector
Assign the variable EmailAddress with value CurrentEmail.SenderEmailAddress before the selector activity
@mnurhaikal
Try initializing the EmailAddress
variable with a default value before the For Each Email loop starts, like EmailAddress = ""
. This prevents UiPath from requiring a default value every time. Also, make sure CurrentMail
is correctly assigned within the loop before using it.