Hi,
I am about to dope my gmail with AI functions. In the first steps of scenario, i would like to do a filter that only goes forward if the “sender email” or the “subject” does not contains certain words (or complet email). And the subject is i would like add theses mails / words in a google sheet (one per line, on A column)
My problem is:
1- when i add the google sheet module, the scenario multiplies the output bundles (one per line) to treat
2- i cannot success to have a filter that match both values : email OR Subject
With Google sheets the search module will spit out bundles. If you want an array you need to use some sort of aggregator.
The filter isn’t working because it’s filtering against all the outputs in your first step against each and every output in your second step.
Make the Google sheet your first step and use the map() function to filter the emails with the text strings in the Google sheets. This way your results aren’t multiplied
Opps sorry missed that. Try using a mailhook instead and make that the first module. With a mailhook each individual email will come in as a single bundle.
But if you want to keep the watch gmail module you will have run through the google sheet module each time, which is kind of a waste of operations since those values do not change.
Other option is to get rid of the google sheets module and instead use the inline function contains() and hard code each of those options.
The main issue you are facing is the range/row “results” from the Sheets are returned in multiple bundles.
You’ll want to “combine” them into a single array so you can create a pattern to “test” the email text content, in a filter.
Aggregators
Every result (item/record) from iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.
Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module.
As you can see, i also do a filter on the subjects now!
Thanks a lot and have a nice day!
Lionel
PS : and i have understood, what “pattern” means: it has nothing with the | it juste verifies if in the string there is a chain of caracters that “matches” the other chain of caracters
I had the same issue and it worked just fine. Match patterns is really powerful when filtering. I would love to know more about how it works in general!
For more information on regular expression patterns, see Text Parser in the Make Help Center:
Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
For experimenting with regular expressions, we recommend the regular expressions 101 website. Just make sure to tick the ECMAScript (JavaScript) FLAVOR in the left panel.
Hope this helps! Let me know if there are any further questions or issues.
P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!