Deduplicate function on Array Aggregator

I am watching Payments in QB as a trigger to get the customers info and update google contacts address book. However, there are many clients where I process a dozen or so payments at one time, so I am running the scenario much more than is necessary for my purposes.

I have dumped the Customer Ref ID, to an Array using the array aggregator, but am having trouble figuring out how to use the deduplicate function as there is little documentation that I have been able to find.

Can someone point me in the right direction?

Welcome to the Make community!

deduplicate() only works on primitive arrays - one where the immediate children values are simple types like text string, numbers, dates, etc., and not child arrays or collections.

I think you want to use distinct() instead, where it can compare collections within the array by a key.

For more information, see https://www.make.com/en/help/functions/array-functions#distinct-array---key--

Thanks I ended up moving the logic into the iterator tool like this
{{distinct(23.array; “CustomerRef.value”)}}

Working great now.

Heya @Stephend welcome to the community :wave:

I just wanted to quickly step in to say thanks a lot for sharing your final setup with us :pray: This is incredibly valuable and could help many folks down the line who are looking for similar info.

Keep up the great work :star2:

1 Like