Automatically Sync Contacts into Sheets

:bullseye: What is your goal?

I want to track my Google Contacts. When a new contact is added or an existing one is edited, I want to copy the contact ID, given name, last name, and email address into a Google Sheet. However, it should only create a new row in the sheet when a new contact is created in Contacts. When I update a contact in Contacts, it should update the corresponding entry in the sheet.

:thinking: What is the problem?

It doesn’t update the existing rows. If something is changed, it adds a new row with the information. I tried using an aggregator or iterator; however, this is quite confusing for me as a non-native speaker.

:test_tube: What have you tried so far?

Tried with an aggregator or iterator. Bulk Update Rows (Did not even got this module to work(I get following error code: BundleValidationError
Validation failed for 1 parameter(s).
Invalid collection in parameter ‘rows’.))

:link: Create public scenario page

Hi Marvin,

You’re almost there. The reason you’re getting new rows is that the scenario never checks whether the contact already exists in the sheet.
What you want to do is search the Google Sheet using the Contact ID before writing anything. That Contact ID should be your unique key. If the search finds a row, just update that row. If it doesn’t find anything, then create a new row.
You don’t need an aggregator or iterator for this, which is why it felt confusing. They’re not really meant for this use case. Also, you can skip “Bulk Update Rows” and just use a simple “Update a row” module once you have the row ID.

After that, edits in Google Contacts will update the existing row instead of creating duplicates.

Hope that helps.

Regards, Tony

Hi Tony,

First of all thank you for the very quick Feedback :).
I have played around with it till now and atleast all the inputs now work. However once i Update an already existing Contact i have following problem: The issue occurs because the router condition is evaluated for every row in the Google Sheet. Even if one row matches the contact ID and triggers an update, all other rows do not match and therefore trigger the “add new row” path. As a result, the contact is always added again, causing duplicate entries instead of a single update.

Which I understood with the help of ChatGPT, however how do I fix this now. In the easiest and if possible most credit friendly way possible.

Best Regards, Marvin

Welcome to the Make community!

In the first route, you should use “Total number of bundles” equal to 1, and Fallback route NO.

In the second route, you should use “Total number of bundles” equal to 0, and/or Fallback route YES.

And in the Sheets module, you perform the search filter like this, returning up to 1 result.

Hope this helps! If you are still having trouble, please provide more details.

I’d recommend going through the Make Academy if you haven’t yet!

Learn Make

How-Tos

— @samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

1 Like

Thank you so much Sam,

I spent some time doing the Academy, however I wanted to tried something hands on. This is why I started with this Scenario. I will definetly continue with the Academy.

Again thank you so much <3

Definitely do not skip the Make Academy! You can create all the automations afterwards like me.