Need to use Mail subject and Body to find out the request ID and Status for different scenarios

Currently I am developing BOT to read the mails from specific folder and using subject to know the request ID and status to update the status in the excel. I have different scenarios and formats of mails in every level of approvals.

I am planning to create a template of all email scenarios subject/Body format and check whether new mail is falling under any one of this template array. If it is from template, split and get required data

Example

Template file will have like :

Request id: <>has been created for the customer: <>;
The Request <> for the customer<> has been rejected.

Mail subject will have : Request id: 123 has been created for the customer: ABC;

Now BOT will check this subject line with the all the templates

Please suggest me whether I am in a right direction or making it complex. And also request you all to provide your ideas and thoughts and any other simple way if u feel.

Thanks,
Ram

Hi ,
Please see the below reference:
if message.subject.ToString.contains(“Request id”)
ind1= message.Body.tostring.IndexOf(“The Request”)
message.body.tostring.Substring(ind1,message.Body.ToString.IndexOf(“for the customer”)-ind1)

Use string functions to manipulate to work on mail and make your bot in uipath

1 Like

Thank u very much…it sounds good… let me try out and get back

Hi

I tried this and working fine to fetch specific data based on index…

Is there any way to deal with tables in Mail body?

I came across few posts that we can save mail and do scrapping… I would like to know is there any other way to achieve it.

Please reply on post if anyone have any inputs