Google Contacts Task¶
Overview¶
The Google Contacts task works in the contacts of a Google account, the address book behind Gmail and Android phones. It finds a contact, adds one, or changes one, and it can put the contact in labels.
| What to do | What it does |
|---|---|
| Add or update a contact | Looks for the person by email, then by phone number. If they are there, adds the new details to them. If not, adds them. The same person is never added twice. |
| Find a contact | Finds a contact by its Google contact ID, email or phone number, and gives later steps its details. |
| Add a contact | Always adds a new contact. |
| Change a contact | Changes a contact found by its Google contact ID, email or phone number. |
When to use this task:
- Put every new lead, or every business card you scan, into your phone’s contacts so you know who is calling.
- Keep a salesperson’s own Google contacts in step with the clients they are responsible for.
- Label contacts by where they came from, such as
Business card,BNIorWebsite. - Look someone up in Google Contacts before deciding what a workflow does next.
This task works in Google Contacts. To work with the contacts on a BaseCloud client, use the Contact task.
Connecting a Google account¶
The task uses a Google Contacts connection. Add one under Settings → App Connections & Keys: choose Google Contacts, sign in with the Google account whose contacts you want to use, and allow BaseCloud to see and change its contacts.
Each Google account is its own connection. If three salespeople each want new clients in their own phone, connect each person’s Google account, and use an If task to send each client to the right one.
Configuration¶
Builder fields¶
The Field column is the label as it appears in the task builder; Key is the name the value is stored under and referenced by.
| Field | Key | Type | Default | Notes |
|---|---|---|---|---|
| What to do | action |
select | add_or_update_contact |
Options: Add or update a contact · Find a contact · Add a contact · Change a contact |
| Google account | app_connection_id |
app-connection | – | |
| Google contact ID | contact_id |
text | – | Only shown when action is get_contact, edit_contact |
| Find by email | find_email |
text | – | Only shown when action is get_contact, edit_contact |
| Find by phone number | find_phone |
text | – | Only shown when action is get_contact, edit_contact |
| First name | first_name |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Last name | last_name |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
email |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
|
| Cell number | cell_number |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Work phone | work_phone |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Company | company |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Job title | job_title |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Website | website |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Address | address |
textarea | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Notes | notes |
textarea | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
| Labels | labels |
text | – | Only shown when action is add_contact, edit_contact, add_or_update_contact |
- Google contact ID: the
contact_idan earlier Google Contacts task gave. A link to the contact on contacts.google.com works too. Leave it blank to find the contact by email or phone number instead. - Find by email / Find by phone number: when both are filled in, the email is tried first. Capital letters in an email do not matter.
- Phone numbers: any way of writing a number finds the same contact.
+1 415 555 2671,(415) 555-2671and4155552671are the same number, and so are+27 82 123 4567and082 123 4567. Use the Phone Number Formatter task first if you want numbers saved in one style. - Labels: separate labels with commas. A label that does not exist yet is made. Labels the contact already has stay.
What changes on an existing contact¶
Add or update a contact and Change a contact only change what you fill in. Blank fields are left alone.
- Email, cell number, work phone, website and address are added next to the ones the contact already has, unless they are already there.
- First name, last name, company, job title and notes are replaced.
- Labels are added. The contact keeps its other labels.
If the contact already has every detail the task fills in, nothing is sent to Google and edited is false.
How a contact is found¶
The task first asks Google’s contact search. Google’s search can miss a contact that was only just added, so when the search finds nobody, the task reads the address book itself and checks every contact. A contact added a minute ago by another run is still found.
Add or update a contact looks by email, then by cell number (or work phone when there is no cell number). With none of those filled in, it can only add.
Very large address books are read up to 25,000 contacts.
Output Fields¶
Every action gives the contact’s details. When nothing was found, they are blank.
| Field | Description |
|---|---|
contact_id |
The contact’s Google ID, such as people/c8571234567890. Use it in a later Google Contacts task. |
contact_url |
A link that opens the contact in Google Contacts. |
first_name, last_name, full_name |
The contact’s name. |
email, emails |
The first email, and every email separated by commas. |
cell_number, work_phone, phone_numbers |
The mobile number (or the first number), the work number, and every number separated by commas. |
company, job_title |
From the contact’s first organization. |
website, address, notes |
The first website and address, and the notes. |
labels |
The contact’s own labels, separated by commas. |
action |
The action that ran. |
Find a contact¶
| Field | Description |
|---|---|
found |
true when a contact was found, false when not. The task still runs its next steps either way. Use an If task on found. |
match_count |
How many contacts matched. The first is the one given. |
matched_on |
email, phone or contact_id. |
{{task_ID_run_text}} |
Google contact found. or No Google contact found. |
Add or update a contact¶
| Field | Description |
|---|---|
added |
true when the person was added as a new contact. |
edited |
true when an existing contact was changed. Both are false when the contact already had every detail. |
matched_on |
email or phone, when an existing contact was found. |
{{task_ID_run_text}} |
Google contact added successfully., Google contact updated successfully. or The Google contact already had these details. |
Add a contact¶
| Field | Description |
|---|---|
added |
Always true. |
{{task_ID_run_text}} |
Google contact added successfully. |
Change a contact¶
| Field | Description |
|---|---|
edited |
true when the contact was changed, false when it already had every detail. |
{{task_ID_run_text}} |
Google contact updated successfully. or The Google contact already had these details. |
When the task fails¶
- Add a contact is never run twice. If Google does not answer when the contact is added, or something fails after it was added (such as the labels), the task stops and says the contact may already be there, rather than trying again and adding the person a second time. Add or update a contact tries again safely, because it finds the contact first.
- Change a contact fails when no contact matches. To add the person when they are not there yet, use Add or update a contact instead.
- Add a contact and Add or update a contact fail when nothing is filled in: give at least a name, email or phone number.
- The task fails when the Google account was disconnected or did not allow BaseCloud to change its contacts. Reconnect it under Settings → App Connections & Keys.
Real-World Examples¶
Put every scanned business card in your phone¶
Inbound Email a photo of a business card is emailed in
└─ AI Prompt reads the name, email, phone and company off the card
└─ Google Contacts Add or update a contact
First name {{task_ID_first_name}}
Last name {{task_ID_last_name}}
Email {{task_ID_email}}
Cell number {{task_ID_cell_number}}
Company {{task_ID_company}}
Labels Business card
Sending the same card twice changes the existing contact instead of adding a second one.
New client into the responsible salesperson’s contacts¶
CRM Trigger a contact is added
└─ If responsible person is Sam
└─ Google Contacts Add or update a contact, on Sam’s Google account
└─ If responsible person is Alex
└─ Google Contacts Add or update a contact, on Alex’s Google account
Check Google Contacts before calling¶
Webhook In a lead arrives
└─ Google Contacts Find a contact, by phone {{task_ID_phone}}
└─ If {{task_ID_found}} is true
└─ Workflow Note "Already in your contacts as {{task_ID_full_name}}"
Related tasks¶
- Contact: get, add or change the contacts on a BaseCloud client.
- Phone Number Formatter: write phone numbers in one style first.
- If: branch on
found,addedoredited.