@robinpath/google-contacts
0.1.1Node.jsPublicGoogle Contacts module for RobinPath.
Google Contacts
Google Contacts module for RobinPath.
Package: @robinpath/google-contacts | Category: Productivity | Type: Integration
Authentication
google-contacts.setCredentials "your-credentials"
Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.
Use Cases
Use the google-contacts module when you need to:
- listContacts -- Use
google-contacts.listContactsto perform this operation - getContact -- Use
google-contacts.getContactto perform this operation - createContact -- Use
google-contacts.createContactto perform this operation - updateContact -- Use
google-contacts.updateContactto perform this operation - deleteContact -- Use
google-contacts.deleteContactto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure google-contacts credentials. | object |
listContacts | listContacts | object |
getContact | getContact | object |
createContact | createContact | object |
updateContact | updateContact | object |
deleteContact | deleteContact | object |
searchContacts | searchContacts | object |
listContactGroups | listContactGroups | object |
getContactGroup | getContactGroup | object |
createContactGroup | createContactGroup | object |
updateContactGroup | updateContactGroup | object |
deleteContactGroup | deleteContactGroup | object |
batchGetContacts | batchGetContacts | object |
getOtherContacts | getOtherContacts | object |
getProfile | getProfile | object |
listDirectoryPeople | listDirectoryPeople | object |
updateContactPhoto | updateContactPhoto | object |
Functions
setCredentials
Configure google-contacts credentials.
Module: google-contacts | Returns: object -- API response.
google-contacts.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | accessToken |
listContacts
listContacts
Module: google-contacts | Returns: object -- API response.
google-contacts.listContacts
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getContact
getContact
Module: google-contacts | Returns: object -- API response.
google-contacts.getContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createContact
createContact
Module: google-contacts | Returns: object -- API response.
google-contacts.createContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateContact
updateContact
Module: google-contacts | Returns: object -- API response.
google-contacts.updateContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteContact
deleteContact
Module: google-contacts | Returns: object -- API response.
google-contacts.deleteContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
searchContacts
searchContacts
Module: google-contacts | Returns: object -- API response.
google-contacts.searchContacts
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listContactGroups
listContactGroups
Module: google-contacts | Returns: object -- API response.
google-contacts.listContactGroups
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getContactGroup
getContactGroup
Module: google-contacts | Returns: object -- API response.
google-contacts.getContactGroup
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createContactGroup
createContactGroup
Module: google-contacts | Returns: object -- API response.
google-contacts.createContactGroup
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateContactGroup
updateContactGroup
Module: google-contacts | Returns: object -- API response.
google-contacts.updateContactGroup
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteContactGroup
deleteContactGroup
Module: google-contacts | Returns: object -- API response.
google-contacts.deleteContactGroup
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
batchGetContacts
batchGetContacts
Module: google-contacts | Returns: object -- API response.
google-contacts.batchGetContacts
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getOtherContacts
getOtherContacts
Module: google-contacts | Returns: object -- API response.
google-contacts.getOtherContacts
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getProfile
getProfile
Module: google-contacts | Returns: object -- API response.
google-contacts.getProfile
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listDirectoryPeople
listDirectoryPeople
Module: google-contacts | Returns: object -- API response.
google-contacts.listDirectoryPeople
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateContactPhoto
updateContactPhoto
Module: google-contacts | Returns: object -- API response.
google-contacts.updateContactPhoto
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
GoogleContacts API error (${res.status}): ${t} | Check the error message for details |
google-contacts.setCredentials requires accessToken. | Check the error message for details |
google-contacts.updateContact requires an ID. | Check the error message for details |
google-contacts.deleteContact requires an ID. | Check the error message for details |
google-contacts.updateContactGroup requires an ID. | Check the error message for details |
google-contacts.deleteContactGroup requires an ID. | Check the error message for details |
google-contacts.updateContactPhoto requires an ID. | Check the error message for details |
GoogleContacts: "..." not configured. Call google-contacts.setCredentials first. | Check the error message for details |
@desc "Validate result"
do
set $result as google-contacts.listContacts
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Contacts
Retrieve all items and loop through them.
@desc "Iterate results"
do
google-contacts.setCredentials $token
set $result as google-contacts.listContacts
each $item in $result
print $item
end
enddo
2. Create a new item with createContact
Create a new resource and capture the result.
@desc "Execute operation"
do
google-contacts.setCredentials $token
set $result as google-contacts.createContact
print "Created: " + $result
enddo
3. Create and update workflow
Create an item and then update it.
@desc "Execute operation"
do
google-contacts.setCredentials $token
set $created as google-contacts.createContact
# Update the created item
google-contacts.updateContact
enddo
4. Check before creating
List existing items and only create if needed.
@desc "Validate result"
do
google-contacts.setCredentials $token
set $existing as google-contacts.listContacts
if $existing == null
google-contacts.createContact
print "Item created"
else
print "Item already exists"
end
enddo
5. Multi-step Google Contacts workflow
Chain multiple google-contacts operations together.
@desc "Execute operation"
do
google-contacts.setCredentials $token
set $r_listContacts as google-contacts.listContacts
set $r_getContact as google-contacts.getContact
set $r_createContact as google-contacts.createContact
print "All operations complete"
enddo
6. Safe listContacts with validation
Check results before proceeding.
@desc "Validate result"
do
google-contacts.setCredentials $token
set $result as google-contacts.listContacts
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- google-sheets -- Google Sheets module for complementary functionality
- google-calendar -- Google Calendar module for complementary functionality
- google-forms -- Google Forms module for complementary functionality
- gmail -- Gmail module for complementary functionality
- outlook -- Outlook module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | 1 months ago |
Related Modules
rightplace
JS@robinpathv0.1.3
RightPlace integration — 130 functions for projects, WordPress, WooCommerce, email, files, git, spreadsheets, stages, docs, automations via rightplace-cli
asana
JS@robinpathv0.1.2
Asana module for RobinPath.
google-sheets
JS@robinpathv0.1.1
Google Sheets module for RobinPath.
airtable
JS@robinpathv0.1.2
Airtable module for RobinPath.
$ robinpath add @robinpath/google-contacts
