@robinpath/zoho
0.1.1Node.jsPublicZoho module for RobinPath.
Zoho
Zoho module for RobinPath.
Package: @robinpath/zoho | Category: Crm | Type: Integration
Authentication
zoho.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 zoho module when you need to:
- listRecords -- Use
zoho.listRecordsto perform this operation - getRecord -- Use
zoho.getRecordto perform this operation - createRecord -- Use
zoho.createRecordto perform this operation - updateRecord -- Use
zoho.updateRecordto perform this operation - deleteRecord -- Use
zoho.deleteRecordto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure zoho credentials. | object |
listRecords | listRecords | object |
getRecord | getRecord | object |
createRecord | createRecord | object |
updateRecord | updateRecord | object |
deleteRecord | deleteRecord | object |
searchRecords | searchRecords | object |
upsertRecords | upsertRecords | object |
listModules | listModules | object |
getModuleFields | getModuleFields | object |
createLead | createLead | object |
createContact | createContact | object |
createDeal | createDeal | object |
createAccount | createAccount | object |
createTask | createTask | object |
convertLead | convertLead | object |
addNote | addNote | object |
listNotes | listNotes | object |
getUsers | getUsers | object |
getOrganization | getOrganization | object |
bulkRead | bulkRead | object |
Functions
setCredentials
Configure zoho credentials.
Module: zoho | Returns: object -- API response.
zoho.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
accessToken | string | Yes | accessToken |
listRecords
listRecords
Module: zoho | Returns: object -- API response.
zoho.listRecords
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getRecord
getRecord
Module: zoho | Returns: object -- API response.
zoho.getRecord
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createRecord
createRecord
Module: zoho | Returns: object -- API response.
zoho.createRecord
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
updateRecord
updateRecord
Module: zoho | Returns: object -- API response.
zoho.updateRecord
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteRecord
deleteRecord
Module: zoho | Returns: object -- API response.
zoho.deleteRecord
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
searchRecords
searchRecords
Module: zoho | Returns: object -- API response.
zoho.searchRecords
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
upsertRecords
upsertRecords
Module: zoho | Returns: object -- API response.
zoho.upsertRecords
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listModules
listModules
Module: zoho | Returns: object -- API response.
zoho.listModules
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getModuleFields
getModuleFields
Module: zoho | Returns: object -- API response.
zoho.getModuleFields
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createLead
createLead
Module: zoho | Returns: object -- API response.
zoho.createLead
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createContact
createContact
Module: zoho | Returns: object -- API response.
zoho.createContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createDeal
createDeal
Module: zoho | Returns: object -- API response.
zoho.createDeal
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createAccount
createAccount
Module: zoho | Returns: object -- API response.
zoho.createAccount
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createTask
createTask
Module: zoho | Returns: object -- API response.
zoho.createTask
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
convertLead
convertLead
Module: zoho | Returns: object -- API response.
zoho.convertLead
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
addNote
addNote
Module: zoho | Returns: object -- API response.
zoho.addNote
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listNotes
listNotes
Module: zoho | Returns: object -- API response.
zoho.listNotes
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getUsers
getUsers
Module: zoho | Returns: object -- API response.
zoho.getUsers
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getOrganization
getOrganization
Module: zoho | Returns: object -- API response.
zoho.getOrganization
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
bulkRead
bulkRead
Module: zoho | Returns: object -- API response.
zoho.bulkRead
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Zoho API error (${res.status}): ${t} | Check the error message for details |
zoho.setCredentials requires accessToken. | Check the error message for details |
zoho.updateRecord requires an ID. | Check the error message for details |
zoho.deleteRecord requires an ID. | Check the error message for details |
Zoho: "..." not configured. Call zoho.setCredentials first. | Check the error message for details |
@desc "List records and validate result"
do
set $result as zoho.listRecords
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Records
Retrieve all items and loop through them.
@desc "Setup authentication"
do
zoho.setCredentials $token
enddo
@desc "List records and iterate results"
do
set $result as zoho.listRecords
each $item in $result
print $item
end
enddo
2. Create a new item with createRecord
Create a new resource and capture the result.
@desc "Setup authentication"
do
zoho.setCredentials $token
enddo
@desc "Create record"
do
set $result as zoho.createRecord
print "Created: " + $result
enddo
3. Create and update workflow
Create an item and then update it.
@desc "Setup authentication"
do
zoho.setCredentials $token
enddo
@desc "Create record and update record"
do
set $created as zoho.createRecord
# Update the created item
zoho.updateRecord
enddo
4. Check before creating
List existing items and only create if needed.
@desc "Setup authentication"
do
zoho.setCredentials $token
enddo
@desc "List records and create record"
do
set $existing as zoho.listRecords
if $existing == null
zoho.createRecord
print "Item created"
else
print "Item already exists"
end
enddo
5. Multi-step Zoho workflow
Chain multiple zoho operations together.
@desc "Setup authentication"
do
zoho.setCredentials $token
enddo
@desc "List records, get record, and more"
do
set $r_listRecords as zoho.listRecords
set $r_getRecord as zoho.getRecord
set $r_createRecord as zoho.createRecord
print "All operations complete"
enddo
6. Safe listRecords with validation
Check results before proceeding.
@desc "Setup authentication"
do
zoho.setCredentials $token
enddo
@desc "List records and validate result"
do
set $result as zoho.listRecords
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- hubspot -- HubSpot module for complementary functionality
- salesforce -- Salesforce module for complementary functionality
- pipedrive -- Pipedrive module for complementary functionality
- freshdesk -- Freshdesk module for complementary functionality
- intercom -- Intercom module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | 1 months ago |
$ robinpath add @robinpath/zoho
