List activities in deal - Pipedrive

Why the two types of listing activities from PD possible within Make aren’t the same?
Can i create a custom listing with an “API call” ?
image

List activities has a “type” mapper, but no “person” mapper:

List activities in a deal has no “type” mapper or something to filter for a specific activity:
image

So I have (if its possible) two possibilities to add in a custom GET “make an API call”:
(Unfortunately I am not an expert in API, and don’t know if specific parameters can be used together…:

  1. “List activities” incl. query to one specific deal.
    Pipedrive API v1 Reference
  2. “List activities in a deal” add query to map one specific activity.
    Pipedrive API v1 Reference

There are ways to do it with Zapier, but a few months ago, I moved away from Zapier and started using Make Scenarios. However, I’m facing difficulty getting this specific (it must be easy in my eyes) scenario running, especially with this topic…

The Blueprint data shows me in JSON the module’s just maps something easy…
image

image

In my opinion, it shouldn’t be difficult to combine these two modules, right?

Hopefully, somebody can help guide me in the right direction, so I can move on to other scenarios we have in mind. But first, the basic scenario needs to go live without any issues!

Thank you to the community in advance!

Hi @TT92,

List Activities has a “User” field, is that not what you want?

For this, you can use the filter after the module to filter what you are looking for.

What is your ultimate goal here? You want to query a specific deal, for a specific activity, by a specific user?

2 Likes

Hi @Donald_Mitchell,

  1. The “User” field is to find users (my collegeaus) from Pipedrive not “Persons” (clients/leads)

  2. When i use the filter after the module to find the specific “type” and it isn’t found the filter stops the complete scenario and won’t proceed!
    And with this i can’t filter to bundle count 0 to proceed… with an “or” rule it will use two bundles when exists and will add and duplicate activity in Pipedrive.

  3. I query in a module earlier within the scenario the specific deal, to a specific person. Only I need to query a specific activity within this deal and not all activities.
    when found proceed with this bundle, when not found bundle count is 0.

If it would be possible create a custom API call to add/merge the type selector from “list activities” module to “list activities in a deal” module i am there!
Or reversed, to add person or deal filter in the module from “list activities”

My mistake, totally missed that!

This is interesting.
From your screenshot were only two bundles output from the List Activities in a Deal module?
And neither one was the type you were looking for and for this reason the scenario stopped?
And you wanted the scenario to continue despite not matching any activities?

2 Likes

Hi @Donald_Mitchell,

No worries you missed the user/person, i understand with all the data from Makers you help via the community.

Yes indeed two bundles in this scenario’s output. The scenario need to continue when no match is found and the route after this module will continue to create an activity, in place of updating the activity.

Tried many filters after the “list activities in a deal” but still no succes unfortunatelly…

Make “modules” are largely based directly on API endpoints.

The Pipedrive API has an endpoint to List activities associated with a deal, which is implemented as the Make List Activities in a Deal module. The API endpoint itself doesn’t give you the option to query by type, so the module doesn’t either.

The Pipedrive API also has an endpoint to Get all activities assigned to a particular user (or all), implemented in Make as the List Activities module. The API endpoint doesn’t give you the option to query by deal.

So it’s a limitation of the Pipedrive API. Using the Make an API Call module wouldn’t help, as there’s no API endpoint that does exactly what you want.

The best route will be to use the List Activities in a Deal module and filter on type as you’ve already tried.

When you say that “scenario need to continue when no match is found and the route after this module will continue to create an activity, in place of updating the activity”, I’m guessing you mean that if there are no activities on the Deal.

The best way to combine the two behaviours will be to use an Array Aggregator after the List Activities in a Deal module. This collects all (if any) found bundles into an array. You can then add a Router with two branches, filtered on the array length.

It would look something like this:

1 Like

Correction - as one of my colleagues has pointed out to me, you don’t need to use the length() function as filters have inbuilt Array Operators including ones for Array length!

Every day’s a school day :mortar_board:

1 Like

@DavidGurr_Make,

You are a genius! Many thanks for the clear instructions.

I’ve only added one additional aggregated field, which was necessary to complete a route further in the scenario.

In the first tests, everything looks to be working as it should. I’ve also tried different scenarios within PD, including more activities, and so on.

Tomorrow, I will incorporate the Aggregator into the other routes within my Make Scenario, and I believe we can go live!

The “Array aggregator” is a bit new to me to use, for future projects i will use these more.
Every day’s a school day, for me to!

3 Likes

If you want to know more about Aggregators, or indeed any other Make tips and tricks, I thoroughly recommend the free Make Academy courses.

The Intermediate level introduces Iterators, Arrays and array functions (I’d recommend doing the earlier levels first though - you never know what else you might pick up!)

2 Likes