404: Not Found (undefined) - On Make.com

flo-envoliis
flo-envoliis Member Posts: 5 VERIFIED MEMBER
Name Dropper First Comment

Hello,

I'm trying to set up the "Make an API Call" module on Make to update a person's settings, specifically the "label" field.

Here's what I'm using:

I'm using the following URL: https://api.pipedrive.com/v1/persons/<id>

with a body like this:

{

"label": "8" <or other ID>

}

I can successfully perform the operation using Postman, without any problems. This is true for both the above URL and the one from my company.

However, in Make, it doesn't work, I always get the following message: 404: Not Found (undefined). Even though I use the same URL, the same API key, but using Make's integration.

Here are the details:

I'm having trouble understanding the problem...

Thanks in advance,

Have a good day,

Best Answer

  • David Gurr (Make.com)
    David Gurr (Make.com) Member Posts: 65 VERIFIED MEMBER
    10 Comments First Anniversary 5 Likes First Answer
    #2 Answer ✓

    If you note the help text under the URL entry field, you'll spot that it says:

    Enter a path relative to https://api.pipedrive.com/v1/, E.g. deals
    

    The crucial word is relative - so your URL parameter needs to be simply:

    persons/12
    

Answers

  • flo-envoliis
    flo-envoliis Member Posts: 5 VERIFIED MEMBER
    Name Dropper First Comment

    Oh, excuse me ! Thank you !

    Flo

  • flo-envoliis
    flo-envoliis Member Posts: 5 VERIFIED MEMBER
    Name Dropper First Comment
    edited January 4 #4

    @David Gurr (Make.com)

    I have another question regarding the "Phone" & "Email" fields, which are created as arrays, with a label & a value equal to the phone number.

    I want to create my users based on an Airtable base. So, I will retrieve the phone number and put it in the array like this :


    If the number is specified in Airtable, it's okay for creation.

    However, if it does not exist, I get this error message :


    I tried using Make conditions like ifempty, switch with "ignore" or "null", but it doesn't work;

    How can I handle this situation?

    Thanks in advance,

    Regards,

    Florentin

  • David Gurr (Make.com)
    David Gurr (Make.com) Member Posts: 65 VERIFIED MEMBER
    10 Comments First Anniversary 5 Likes First Answer

    If you need to handle the case where certain array elements might be missing entirely, you'll need to map an entire complex array object rather than building it through the UI, and then use an inline if() function to select either an empty array (for a missing phone) or the complex array that you've built.

    Here's an example:

    I've used a Set variable module to mimic your Airtable lookup.

    The Parse JSON module builds your JSON string (you don't need to create a data structure - just run this once to create that dynamically):

    The Array aggregator creates the Array (in your case it's an array of just one item, but you still need an array as per the Pipedrive API):

    Lastly, you select to Map the phones array and use an if() function:


  • flo-envoliis
    flo-envoliis Member Posts: 5 VERIFIED MEMBER
    Name Dropper First Comment

    Thank you, @David Gurr (Make.com) !

    Is it possible to retrieve both email and phone in the JSON & Array Aggregator ?

    I have done this and it works :

    I am indeed retrieving two arrays with my information, but I can't manage to separately retrieve the data from each of the arrays :

    How can I do this ?

    Regards,

    Florentin

  • David Gurr (Make.com)
    David Gurr (Make.com) Member Posts: 65 VERIFIED MEMBER
    10 Comments First Anniversary 5 Likes First Answer

    The Create a Person module uses the Pipedrive API Add a person endpoint - this requires separate arrays for email and phone.

    You'd simply need to daisy-chain the process - Parse JSON and Array aggregator for each, one after the other.

  • David Gurr (Make.com)
    David Gurr (Make.com) Member Posts: 65 VERIFIED MEMBER
    10 Comments First Anniversary 5 Likes First Answer

    One of my colleagues has suggested a more elegant solution that remove the need for the Array Aggregator modules ...

    By wrapping the array as a key-value pair it will be output from the module as a single object, which you can then reference by name - see below:



  • flo-envoliis
    flo-envoliis Member Posts: 5 VERIFIED MEMBER
    Name Dropper First Comment

    Thank you for the information, I was able to create my key-value double table with a table of phones and an e-mail table :

    I was able to modify my scenario to go from 4 modules to 1 module :

    It is therefore much simpler.

    Have a good day !

    Regards,

    Florentin

  • David Gurr (Make.com)
    David Gurr (Make.com) Member Posts: 65 VERIFIED MEMBER
    10 Comments First Anniversary 5 Likes First Answer

    Great work! Optimization makes your scenario use fewer Make operations, plus it's easier to maintain.