Scraping X number of cases from an email

Hi,

I am trying to scrape from an email that can have an unlimited amount of cases with only one mandatory field. The three fields are first name, last name and DOB and only last name is guaranteed to be there. There is also no seperators that indicate when the next case begins.

I need to seperate the fields and enter them in an application on a case-by-case basis.

For example the output could look like this:

First Name: Bob
Last Name: Smith
DOB: 12/12/12
Last Name: Jones
DOB: 13/12/13
First Name: Jeremy
Last Name: Smith
Last Name: Jones
DOB: 12/12/12

How would I go about seperating these into 4 different cases?

Thanks for your help.

1 Like

Hey @LeThomp

  1. Split the body string by new line delimiter.

  2. Loop through it

    2.a. When the item contains last-name & previous item not contains just start the data entry as new transaction

Thanks
#nK

We need to standardise this only then we can get the expected output field and it’s values

The reason is now we can have Last Name itself as a delimiter being said that it is always there

But the other can’t be fetched in a right way as it may or may not come

Standardisation should be done in a way that for each case there should be a line break so that we can take that line break as a delimiter and get the values for each case
Even if other values apart from lastname is missing we can still get them as we have got individual cases as a split item with the help of line break delimiter

So whenever we do a automation we need a standardisation to be done with input and only then a process can be automated

Cheers @LeThomp