Iterate Webhook Data into multiple operations

Hi there,

I’m receiving data via a Webhook from Brevo, which contains multiple email addresses in a single array (e.g., [email1@domain.com, email2@domain.com]).

When I try to search these emails in Outlook using the Microsoft People module, the search fails because Outlook tries to process all values at once instead of individually.

What I need is to split the array from the webhook into separate operations—so that each email is searched one after the other (one per bundle). Same Problem when I use the Iterator beforhand and Outlook searches for the value

How can I correctly split this incoming array so that each value is passed one-by-one into the Microsoft People Search module?

Thanks in advance!

1 Like

Hi @TK ,

The Iterator should indeed solve the issue, but you need to ensure that the iterator value is properly mapped into the Outlook People Search module. Make sure that each email is passed as a separate input during the iteration, and the Outlook module will process them one by one.

If you need further guidance on setting up the iterator or mapping, feel free to reach out!

1 Like

Hi @TK Welcome to the community!

Can you please share output screenshot from the array which contains emails?

You can use split function with comma as Seperator within iterator if emails are in comma separated string.

Best,
@Prem_Patel

1 Like

Welcome to the Make community!

From your screenshot/output bundle, it appears that you have an ARRAY of items. What do you do when you have an array?

“Looping” Through Array Items

When you see an array in your module’s output, think of using an Iterator module.

In this example, this variable is an array of items (collections). You’ll want to map this array in an Iterator module.


Question: Have you tried mapping your array variable into an Iterator module, ran the scenario once, and view the output?

Next,

Combining Bundles Using Aggregators

Every result (item/record) from trigger/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. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Question: Which is the best aggregator do you think you’ll need for your use-case?

Mapping a Specific Structure Into a Complex Field

If you have an array of collections, in programming terms, this is called an array of objects, or an array with non-primitive data types (“complex”).

The Array Aggregator module is very powerful because it allows you to build a new complex array of collections that matches a later module’s field to map multiple items (collections) to it. Such fields initially would allow you to manually add items, but you can toggle the “Map” switch to the “on” state and map a whole array into a single field.

This is done by selecting the “Target structure type” in an Array Aggregator module.

As you can see from the above example, the “Map” toggle on complex fields are used when you have an array variable (like from an array aggregator). Other combinations of modules may also allow you to generate an array that matches a future field’s array structure, like “Aggregate to JSON + Parse JSON”, or “Create JSON + Parse JSON”, but this is an advanced topic.

Question: Are you mapping your array into a field that accepts more than one item/collection?

Example

Here is an example of how your scenario could look like:


This is just an example. Your final solution may or may not look like this depending on your requirements and actual data.

For more information, see “Mapping with arrays” in the Help Centre. You should also do the Make Academy, which also covers the use of Iterators & Aggregators.

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

1 Like

Hi @TK

What you can do is use the Iterator module after the webhook. This will split the list of emails so that each email is handled one by one. Then connect the Microsoft People Search module after the Iterator. Now it will search for one email at a time instead of all at once.

If you want to collect all the search results together after that, you can use the Text Aggregator module. It will combine the outputs from each search into one message or result.

This will make sure each email is searched separately and you still get everything together in the end if needed.

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

1 Like

Thank you all very much for your input and help!

I think I’ve narrowed the issue down to two key points:

  1. The main problem seems to be the Microsoft 365 People Search module:
    The Query field must be quoted, otherwise the search throws a syntax error.
    So I’m using "{{Value}}" – but I’m wondering:
    Could it be that this causes the module to interpret the whole value as a list or combined string, instead of treating each value from the Iterator as an individual item? Or am I misunderstanding how that works?
  2. My goal is to make sure that each email address (from the Webhook’s email[] array) is searched separately, one by one.
    I believe that splitting them into individual bundles or operations (ideally before passing them into the Search module) would solve the issue – so that each email is processed on its own.

Use case:
Whenever a group of contacts is deleted in Brevo, I receive a Webhook with the corresponding email addresses. I then want to check each one in Outlook, and if it exists, automatically delete it there as well.

Any confirmation on whether this quote issue can cause that kind of misinterpretation – or best practice on how to handle this cleanly – would be much appreciated!

@Prem_Patel




I don’t see this as the main problem anymore.

Rather: the Iterator still Outputs only one Bundle, instead of several, even though the Inputs is correctly connected.

Does anybody have a solution to this?

1 Like

This is how i would do it.

  1. Array example similar to yours
  2. Map that array in iterator
  3. this is how it would output

Now we need to see how exactly your output data looks like from webhook. if you can share that copy of output, it will be great.

This sis how you can do that,

  1. go to history where webhook output has returned 2 or more email items in array.
  2. click on download icon on top right corner
  3. Click on “Download Output bundles” option
  4. copy paste the whole output data and share it here

This way may be we can figure out and share exact mapping suggestions on why iterator is not giving the expected output.

Best,
@Prem_Patel

1 Like

Thank you @Prem_Patel!
This is the output data from the Webhook:

[
{
“id”: 1234567,
“event”: “contact_deleted”,
“email”: [
“anniaea.scuemiedecke@fake. com”,
“coencetta.wiraeh@fake. com”
],
“date”: “2025-07-16T09:03:29.7169Z”,
“ts”: 1234567890
}
]

This is then the input to the Iterator:
[
{
“array”: [
{
“value”: [
“anniaea.scuemiedecke@fake. com”,
“coencetta.wiraeh@fake. com”
]
}
]
}
]

Output from the Iterator:
[
{
“value”: [
“anniaea.scuemiedecke@fake. com”,
“coencetta.wiraeh@fake. com”
],
IMTINDEX”: 1,
IMTLENGTH”: 1
}
]

Input MS Search:
[
{
“limit”: 4,
“search”: “"anniaea.scuemiedecke@fake. com, coencetta.wiraeh@fake. com"”,
“orderby”: “createdDateTime desc”
}
]

Output Search:
[
{
IMTLENGTH”: 0
}
]

When using an other Webook from Brevo called Contact Updated, the Webhook output looks the follwoing, and works fine with the iterator:
[
{
“id”:1234567,
“event”: “contact_updated”,
“content”: {
“emails”: [
“anniaea.scuemiedecke@fake. com”,
“coencetta.wiraeh@fake. com”
],
“attribute_name”: “ANSPRACHE”,
“attribute_value”: “du”
},
“date”: “2025-07-16T07:01:19.7167Z”,
“ts”: 1234567890
}
]

Input Iterator in this scenario:
[
{
“array”: [
{
“value”: “anniaea.scuemiedecke@fake. com”
},
{
“value”: “coencetta.wiraeh@fake. com”
}
]
}
]

1 Like

Strange, your first webhook email array gets iterated correctly on my side.

How /Where did you input the Data?

1 Like

I just parsed the json shared by you and iterated that.

1 Like

I’ve set it up from scratch now.

This time the iterator works the way it should, however I can’t map “value” from the iterator in the MS Search Module. Mapping one of the others, will result in searching for numbers instead of email.

Any ideas?


[
{
“value”: “fake18@example.com”,
IMTINDEX”: 1,
IMTLENGTH”: 3
},
{
“value”: “fake19@example.com”,
IMTINDEX”: 2,
IMTLENGTH”: 3
},
{
“value”: “fake1@example.com”,
IMTINDEX”: 3,
IMTLENGTH”: 3
}
]

Just save, and re-open the editor for scenario and rerun till the iterator and then map value from iterator or just copy paste this in MS search module {{2.value}} because your iterator is 2nd module.

Solution:

Building up the Automation from scratch solved the Problem in the end.

Connected a new Webhook, replaced the Iterator etc..

No idea where the problem was in the beginning, now it works just fine.

Thanky you all for your support!

2 Likes