I am trying to build a kind of a simple ticket system. By fetching the related E-Mails I have found a strange behaviour when it comes to extract the needed emails adresses. I use the “match elements transfomer module” to get the email adresses.
Now I had a scenario run, which for me unexplainably resultet in doubling the extration. As you can see, 1 Email has been fetched and the 3. modules output suddenly has 2 output operations
the related element is having only 1 entry
so it is not clear for me, why this results in 2 operations, delivering 2 tickets from same content at the end of my scenario.
Any Idea what might cause this behaviour?
Thank you for your comments
Your first Text Parser module is returning more than one result (two bundles), so the second Text Parser module runs twice, once for each previous bundle going into it.
Every result (item/record) from a search/match module will output a bundle. To “combine” them into a single structure, 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. The next popular aggregator is the Text Aggregator which is very flexible and has applies to many use-cases.
There are other types of aggregator modules, click the below links to find out more:
The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.
Here is an example of using the “Target structure type” of an Array Aggregator module:
As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.
1 Like
So the issue is not about using aggregators, but WHY you are using a Text Parser module?
Are you certain the Text Parser is the right tool for the job?
Hi samliew,
thank you for your comments. That’s true, the first text parser delivers 2 bundles!
I didn’t saw it due to the small result number showing 1 at the right top. So now I know where to adjust that.
For your question regarding text parser, I don’t know, this is my best result until today. It seems to be a bit tricky to extract only the naked email adress, because it will be delivered in verious ways, like every email and/server seems to delivery different kind of values to provide the related information.
What would you recommend to use instead?
Thx
And here I found another example which didn’t provide double output, but I can’t see the difference:
Still I have always problems to understand what is a bundle, what a collection from point of makes view. Since I understand what an array is, I always have problems to recognize when makes modules will interpret multiple values as an array and when not.
And to see the different behaviour, here again is the email fetched with my initial post here, which returned two bundles, like you correctly said
and another example from before which resultet only in 1 bundle
Can you tell me why this is so?
thx
Ah I got it. the second example didn’t deliver 2 email adresses. The second entry only shows an Alias.
If your Sender Email Address contains this format
"Amazon Sellect Central Communications (Do Not Reply)" <donotreply@amazon.com>
Then you can just do this wherever you want to map the email.
{{ replace(1.from.email; "/(^[^<]+<|>$)/g"; emptystring) }}
You don’t need a separate module for this.
samliew – request private consultation
Join the Make unofficial Discord server!
2 Likes
samliew, thank you. The thing is, sometimes it is like this
My Alias my.email@domain.com
other times it is just the email
my.email@domain.com
and how can I just take only the eMail from the collection
and ignore the second entry (Sender name) to avoid multiple output?
Can you please format example text in code blocks, because sometimes the formatting in this forum removes or changes some characters.
like this
example text
1 Like
oh, sorry, haha
either
my Name <my.email@anydomain.com>
or just
my.email@naydomain.com
I think the regex pattern will still work, because if there is nothing to replace it will just return the email.
Try it first?
1 Like
Oh, ok, yes sure. I will try that, coming back later with the result…