Help with complex CRM deal creation scenario

Hi there! I need some help with a specific scenario building.

What I basically want is:

  • For every new row on Google Sheets (which is a deal with ‘Name’, ‘Organization’, ‘E-mail’, ‘Phone’), I want to create a deal on Pipedrive CRM.

  • But I also want to check if the ‘Organization’ filled in the sheets already exists on Pipedrive. If so, I just want to update it, if it doesn’t then create a new one.

  • In sequence I want to check if there is already an existing Person on Pipedrive (taking in consideration the filled Name on Google sheets). If so, update it, if it doesn’t then create a new one.

  • And, for the last part, create a Deal associating the new/update Organization and the new/update Person.

I’ve already tried to build this scenario, but, for some reason, whenever a new Organization is added on Google Sheets, it’s not taking in consideration the logic if it still exists. The same for Person’s creation. Here is a video that I just recorded so maybe you can understand it better:

PS: I didn’t show in this video, but both Person and Company were duplicated too (not 4x, but 2x).

I appreciate your attention in advance.

Yours,

Vitor