I have made a simple workflow for automatic emails. It takes input by the user e.g., send an email to Sarah and ask about her next week planes. It work fine till here, but what if there are more than 1 Sarahs in my contact list?
I want the chat model to look for how many contacts of the same name exist in my list, then ask me which one do i want to send the email to?
And so far I am unable to resolve it… Can anybody guide?
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
You can solve this by using the Google Contacts “Get Many” operation to search for all contacts with the same name, then use an IF node to check if multiple contacts are returned. If there are multiple Sarahs, you can have your chat model present the list of contacts (with additional details like email or phone) and ask the user to specify which one they want to email.
Based on the [community.n8n.io]( Google Contact by Name not ID ) discussion, you’ll want to structure your workflow like this:
• Use Google Contacts “Get Many” with a filter for the name
• Add an IF node to check if the returned array has more than one contact
• If multiple contacts exist, format the results and send them back to the chat model for user selection
• Once the user selects, proceed with the email workflow
The key is using the “Get Many” operation instead of “Get” so you can retrieve all matching contacts rather than just the first one found.