Issues trying to isolate email addresses and remove duplicates to pass to other modules

What are you trying to achieve?

Filter email addresses from HTML content from gmail module. remove duplicate email addresses found. pass to other modules

Steps taken so far

  1. I have a gmail module that is getting emails from a filter setup inside gmail. This module provides HTML content to the next module

  2. The Text parser Match elements module is set to email and creates 4 bundles. I only need bundle 2 as it has the email I need to collect. Bundles 1,3 and 4 ideally would be removed somehow at this point

  3. Then the array aggregator looks at the match content from the text parser and this is where I cant seem to figure out.

  4. in another module i can use {{72.array[2].match}} and I get the emails im after but there are duplicate emails that I need to filter out.

Ive tried using filters and various other methods and am unable to filter the duplicates. I can’t deduplicate as its a collection from what I am reading and if I take the array from the aggregator it also fails and gives me: invalid email address in parameter ‘emails’.

You can see in the screenshots whats happening. Is there a way to just add a filter or something that can just only have bundle 2 from the parser and then remove duplicates?

extra context: im using docsend “user viewed x document” as my trigger and the email is inside the HTML content.

I’m working through the learning resources but I cant find this answer. Any help greatly appreciated thanks!
Dan

Screenshots: scenario setup, module configuration, errors

blueprint.json (14.1 KB)


Hey DG,

place a filter after the text parser and set it to Does not contain @2x.png
This way you will ignore those strings and only have the emails.
Please share screenshot of the outputs after that so we can check what is going on and see how to deduplicate it.

Stoyan, I really appreciate the help sir. The filter is of course easier than I was thinking in my mind to remove the bogey email alias’s. The output of the Array Agg looks good now.

How do we remove duplicate emails from the results, see the screen shot? tried deduplicate({{72.Array.Match}}

For anyone else facing similar… My issue was the agg wasnt correctly configured. Once I set it to the gmail as source it then output a single array which i could then deduplicate just fine and then iterate back into bundles for processing.