Describe the problem/error/question
I want to find a contact on Google Contacts by name to check if there is already an entry. then update that contact or create if not existent
Please share your workflow
i use Fibery as CRM and want to sync contacts to my phone. but i dont have the IDs of these contacts in fibery … (as other members of my company should be able to sync as well to their contacts list)
so i need to search for a contact in my address book before i can update or create a new contact
can i use the current available nodes for that somehow?
Hi @dukevannori, this can be a bit tricky if you’re processing multiple contacts at once. You’d first need to break your data down into batches of one, then run a search for each individual contact to check whether it exists or not.
The nodes you’d need for such a logic would be the Split In Batches node (to split up your existing list of contacts), the Google Contact node (to search for each contact and to create/update them) and the If node (to decide whether a contact has been found or not).
Now you didn’t share your exact data structure coming in from Fibery, but the basic idea could like so in a workflow (tested on n8n@1.5.1):
Hope this helps, let me know if you have any questions on this!
awesome - thank you. actually i get only one contact from a webhook at a time - so I guess the extra loop is not needed here?
but this workflow works like a charm - thanks a lot!
Glad to hear this helps! You’re right of course, when only processing a single contact at a time there is no need for the Split In Batches loop 