Want to extract email from a deep tree of arrays of collections

Here is the raw data snippet:
com:EmailAddressBag
<com:EmailAddressText com:emailAddressPurposeCategory=“Main”>tm@lzlegalservices.com</com:EmailAddressText>
</com:EmailAddressBag>

I have a background in programming and have made several scenarios that were always just a breeze but this complex API response has stopped me in my tracks. I have tried many things to get the email from this (including modules in Make from JSON, Text Processing Regular Expression, XML, Xpath) and now have been trying to use the array operators. I just think I must be going about this the wrong way.

I have failed to get at the underlying address. Any help or pointers would be appreciated. Currently, the best I got was [collection] inserted into my Google Sheet email column.

The array map was my latest attempt but since when hover over it says Raw:1, don’t know what to put after the ; and it errors saying not an array (I guess it is a collection) still not sure how to index into the collection to extract the values,or why the value is not already just being inserted into the google sheet.

Any help would be appreciated.

may be u need to parse this xml correctly to get email _value.

Welcome to the Make community!

There was an issue a while back that was due to the colons in the variable labels. Perhaps this might be the case here too?

2 Likes

Could not get make.com to extract the emails, so I changed course and I just dumped the whole big API response (had to trim to 50,000 charters in some cases) into an Excel Cell and then just used Excel formulas (with chatGPT help) to extract the addresses.