Blob Text - Does AppSheet have a way to extract values based on field identifiers?

I am creating an automated process that grabs content from emails as they arrive (using Integromat). This allows me to capture the email body as a blob of text into a Google sheet.

Within this blob of text are a set of field identifiers with their corresponding values, like so:

...Field1: Value 1...Field 2: Value 2...Field 30: Value 30

I am looking for a way to parse the blob, find โ€œField1โ€ and then return โ€œValue 1โ€. Then repeat for the other fields.

I am kind of familiar with the OCR feature and understand the EXTRACTโ€ฆ() functions but it doesnโ€™t seem like these will help with this use case.

Is there anything within AppSheet that can parse the text blob in the manner described above?

0 5 663
5 REPLIES 5

How consistent and structured is the email body? Same number of fields in the same order every time? Any blank values?

You might be able to SPLIT() the email body and INDEX() individual values if you can count on the same structure. But I canโ€™t think of a clean/easy way to make it dynamic.

I believe it would be fairly standard but things happen so I am not relying on that since its an email from an un-controlled source.

I think I may be able to resolve using Integromat. There is a text parser module that uses regexโ€™s.

Although, I would prefer to try to stay within the AppSheet ecosystem whenever possible.

Iโ€™m with you 100%. I think regex is the answer, and if youโ€™re already using Integromat to gather the text then you might as well parse it there, too. Then, the output of the Text Parse module will provide each individual value, ready to map back to the GSheet in the final step of the scenario.

Hopefully AppSheet will add regex at some point.

@WillowMobileSystems
John, is the Value for each pair numbers or texts or mixed? Whatโ€™s the type of those values?

A very wide variety of values - Names, addresses, IDโ€™s, phone numbers.

Actually, I played around with Integromat a LOT today and was able to find a relatively simple solution using the parser discussed above. I have been able to catch an incoming email, extract its content, parse into the fields I need and then populate the end results into my Google sheets.

The parser is using regex expressions - more specifically groups - to extract the info. I have used regex throughout my entire development career and never have put any time into understanding how they work. But I was able to create an acceptable expression for this need. I do fully expect there will need to be tweaks to it as differing samples come through.

Top Labels in this Space