How to update/delete an e-mail of contact person via API?



Hi,
I am trying to setup Make.com automation as follows and I would like to ask for help / experience.
Specifically, I am running into a problem when trying to delete an e-mail address of a person, who has more than 1 address attached to then.
The automation has very simple use-cas.
- The trigger is an information from you e-mailing solution /outside of PD) that certain e-mail address hardbounced and no longer exists.
- Scenario searches PD whether this person exists
- If so, it deletes the e-mail … BUT!
- in case the person has only 1 e-mail, everything is fine, the email is deleted.
- in case the person has more than 1 e-mail, I have a problem, because I cannot find a way, how to delete only on of the e-mails (especially not knowing if it is 1st, 2nd etc., if it is Work, Home, other etc. 🤷♂️
I managed to setup iterator scanning the addresses of that person, deleting the one that hardbounced, but am not able to kombine the rest into a format acceptable for the "Update a person" module.
Does any of you have similar experience working with the e-mail address array in any way?
Thanks
Answers
-
Hello @LukasC,
Even though my experience with Make is limited, I wanted to share a possible option with a custom HTTP PATCH request to
https://api.pipedrive.com/api/v2/persons/{id}
and use a customised body parameter that only contains all the email addresses that are available after removing the hard-bounced ones.So, in theory, you would be making a request to update the email of the specific contact, and you will have complete control over the data sent in the body of the request.
0