I’m new to using Make, having defected to the dark side from Zapier!
I’m trying to create a Pipedrive Person from a Calendly Booking for my first scenario. But Make is throwing a couple of error messages which I don’t understand. Please see this very short video.
If anyone can show me the error of my ways I’d be grateful, thank you.
Hi Graham. Welcome to Make (we like to think we’re the right side of the Force, but each to their own ).
If you hover your mouse cursor over the
Phones fields on the Pipedrive
Create a Person module, you’ll see it tells you the data type it’s expecting - in this case, an array. So you can’t just give a single text field for
Phones - each needs an array, even if it only has one member.
To do this, you’ll need to use Functions. In the Mapping panel, click the little table icon - that will show you the Array functions. Click
add(), then position your cursor between the brackets, click
emptyarray, then a semicolon, then map your source data.
You’ll end up with a function that looks like this:
That is creating an empty array, then adding your email field to the array and returning it.
There’s more about Functions in the Help system.
Apologies - that function isn’t quite right as the array structure is a little more complex in this case.
I’ll post more on this tomorrow!
No worries, thanks for the update David and I’ll keep an eye out for your post tomorrow.
TL;DR - There’s complexity here that’s good to know, but there’s a simple solution!
A Person record in Pipedrive can have multiple Email or Phone fields, each tagged with a label of “Work”, “Home” or “Other”:
So what the Pipedrive
Create a Person module is looking for is an array containing key-value pairs of “email” and “email label” or “phone” and “phone label” (which you can see in the Pipedrive API docs if that stuff is meaningful to you).
There’s TWO ways to map this in Make. The first way (which does seem kind of intuitive if you’ve picked up the idea of “mapping”) is to toggle that Map switch and select your field.
But the value to be mapped must be an array in the exact format as described in the Pipedrive API docs. You can do that with Make (and in some use-cases that will be absolutely required) - but it does require some advanced techniques.
Instead, the right solution in most cases is to go with the default. In your case, you always have single
Phone values - you will never have a variable length array. You know what Email and Phone label you’re using - presumably
It’s disarmingly simple - click
+ Add Item and then map your field in as the
Value. Optionally, you can select the Label and whether this is the Primary method:
Interestingly, Zapier gets round this by not exposing the
Primary fields at all - and in fact, not allowing you to specify multiple methods - it just allows a single Email or Phone field, which is always labelled as
Work (Zapier tends to do this type of thing a lot as it doesn’t have Make’s user interface flexibility).
So in summary, the best solution as a Make newbie is almost always to go with the default options that Make presents to you.
Thank you for explaining that so clearly and taking the time to investigate for me, I really appreciate it. I’m on holiday for a week now but i’ll try it as soon as I get back.
Just tested and it works perfectly, thank you.
I have one other question please:
In Zapier, you can create a Pipedrive person on an Update Person Action. It will search using email address for an existing Person and if none exists, allow you to create the Person. Thereby avoiding a duplicate of an existing person. Can you tell me if/how that’s possible in Make please?
Zapier seems to reference a Person by the email address, but Make works on the
Person ID is more definitive and reliable, and it’s what the underlying API uses.
To replicate that in Make, you’d need to first search by email using the
Search for Items module (in the
Others category at the end of the module list) to get the Person ID.
Got it, thanks very much for your help David.
Best wishes, Graham
FYI, we’ve just added some new modules to the Pipedrive app so that you don’t need to use the generic
Search for Items module:
Apart from being easier to use, these also have the advantage of being able to use a tighter API Scope than the broader
Search for Items module.
Thanks very much for the update @DavidGurr_Make, that’s great.