Mapping array items on add_time

:bullseye: What is your goal?

I want to map an array and count the items where add_time is today.

:thinking: What is the problem & what have you tried?

I’m trying to map on add_time, but since it’s returned as an ISO 8601 datetime from the previous module, I can’t seem to get it working properly in the mapping.

Filtering inside the Array Aggregator isn’t an option either, because then I lose other bundles (like deals that were won or lost today).

My Pipedrive “List Deals” module returns all deals that were created, won, or lost today. Initially, I filtered on status = open to count new deals, but I noticed that when some of those deals are marked as lost later the same day, the numbers are incorrect.

That’s why I want to switch to filtering based on add_time, but so far I haven’t been able to make this work.

Has anyone dealt with this or knows the best way to handle it?

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hello,

The simplest approach is to add a second List deals module and use a filter configured in Pipedrive, or a combination with an Array aggregator and filter.
Saving operations is a fun way of building, but you should always compromise between scalability and ease of maintenance.

The second option is a combination of a few tricks- it uses a router before aggregator together with Set variable and Get variable. With this approach, you can filter bundles from List deals and then aggregate them. Next, you store the result as a variable, which you retrieve on the last route.
By using router you can add multiple aggregators to one List deal module.

How to configure the filter:


I use addDays-1 because I don’t have any deals yet today

How the scenario looks:

What to be aware of:
Using my configuration, you can easily consume a lot of operations if you do not set up a proper filter on the last route:

Why is your map() function not working?

Add Time is a date and time value → for example, 2026-03-30T13:04:30.000Z. It is not the same as 2026-03-30 because of the time part. To make it work with this approach, you should build a new array with Add Time formatted as a date only.

Have a nice day,
Michal

Dear Michal,

Thank you for your reply and suggestion.

Yesterday i already looked into the same direction. My output from the array aggregator is grouped on the initials id. So i have 3 output bundles.

Is there a way to merge the 2 output’s from the Array aggregator’s based on the given key’s?

With this buildup incl. mapping i managed to send Slack messages based on variables:

  • But i need to have the deals mapped on add_time and not only the open ones, as i mentioned before the same day it’s possible the deals already been switched to lost..

@mszymkowiak For now, I’ve fixed the mapping by using a newly created custom field in Pipedrive. This ensures the date is no longer displayed as an ISO datetime value. New deals will now have this custom field populated in DD-MM-YYYY format. :nerd_face:

I will always open for learning in Make, so if you still have a answers to my previous message. :slight_smile:

1 Like

I’m afraid I don’t understand what you want to build exactly.

Pipedrive will return all your deals, and to get a metric of how many leads you had that day, you have to count them based on add_time.

What else do you want to achieve? Maybe it will be easier to suggest a solution - please tell me what metrics you want to have as a result of your scenario. We often work with Pipedrive so maybe there is an easier way :slight_smile: