Add email to Google Contacts

Hello!

I’m trying to update Google Contacts from Notion, and the “add an email” field is not working. In particular, here’s my scenario:

Trigger: search Notion objects. (In my database, I have a checkmark box called “Upload to GContacts”. When that is checked (true), it starts the automation.

Action 1: Search contacts - from the Notion database item, it searches my Google Contacts based on full name (in Notion) and compares against Full Name (in GContacts).

Router 1: if email exists, go to Router 2A. If email doesn’t exist, go to Router 2B.

Router 2A: If contact doesn’t exist, create new contact. If email does exist, update google contact.

Router 2B: if email doesn’t exist, and contact doesn’t exist, create new contact. If email doesn’t exist but contact exists, update contact. (Btw, I mapped the empty email field with add(emptyarray) and works like a charm. This thread helped with this solution.)

The module that keeps failing is the “Create” or “Update” Google Contact record if the email exists. The error I keep getting is: “Validation failed for 1 parameter(s). Missing value of required parameter ‘value’.”

Because the email seems to need to be uploaded to Google Contacts as an array, and exists in Notion as an email property, I tried converting the email property into an array. For instance, I tried:

  • map(Notion Email; emailAddresses) - doesn’t work
  • toArray(Notion Email) - doesn’t work
  • get(Notion Email; emailAddresses) - doesn’t work
  • I also turned the “map” toggle both on and off using the aforementioned solutions, nothing worked.

Please help! Seems like it should be a very simple solution to map the email from Notion into Google contacts, but for the life of me, it isn’t working.

Hi @paulmatsushima,

Can you please share with me what your Create a Contact Module that is throwing errors looks like? I want to check how you are mapping fields in that module, by looks of it there is a missing data thus causing the error.

1 Like

Thanks for the help, @Runcorn ! See the screenshot for my module. I’ve tried entering in the “Display Name” and “Type” fields, both of those don’t solve the issue. And I’ve tried toggling on the “Map” button, that also didn’t solve the problem.

Hi @paulmatsushima,

I think it is caused due to either email or phone number you are getting from the notion being empty. Can you go to your execution history and see if that is the case?

2 Likes

Thanks so much! You were correct, it was the phone number being empty that was causing the issue.

I figured out the solution: I now have a router with 4 paths, each leading to another router with 2 paths.


Path 1: If Email and phone number exists
–Subpath 1A: If contact exists, create new contact (adds/edits email + phone)
–Subpath 1B: If contact doesn’t exist, update contact (adds/edits email + phone)

Path 2: If Email doesn’t exist but phone number does
–Subpath 2A: If contact exists, create new contact (adds/edits phone, doesn’t add email) → to make an email/phone number blank, use the add(emptyarray) code (see screenshot at the end)
–Subpath 2B: If contact doesn’t exist, update contact (adds/edits phone, doesn’t add email)

Path 3: If email exists but phone number does not
–Subpath 3A: If contact exists, create new contact (adds/edits email, doesn’t add phone)
–Subpath 3B: If contact doesn’t exist, update contact (adds/edits email, doesn’t add phone)

Path 4: If both email and phone numbers do not exist
–Subpath 4A: If contact exists, create new contact (doesn’t add email or phone)
–Subpath 4B: If contact doesn’t exist, update contact (doesn’t add email or phone)

3 Likes

Heya @paulmatsushima :wave:

I just wanted to say great work figuring this out! Also, thanks a lot for sharing your solution with the community, we truly appreciate it :pray:

Just FYI: I’m gonna go ahead and mark your reply as a solution. :white_check_mark:

1 Like