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

LukasC
LukasC Member Posts: 9 VERIFIED MEMBER
First Comment Photogenic
edited March 5 in Apps and Integrations #1

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.

  1. The trigger is an information from you e-mailing solution /outside of PD) that certain e-mail address hardbounced and no longer exists.
  2. Scenario searches PD whether this person exists
  3. If so, it deletes the e-mail … BUT!
    1. in case the person has only 1 e-mail, everything is fine, the email is deleted.
    2. 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

  • Tony Xavier
    Tony Xavier Pipedrive Team Posts: 216 PIPEDRIVE TEAM
    Third Anniversary 25 Answers 100 Comments 25 Likes

    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.