@robinpath/clearbit
0.1.2Node.jsPublicClearbit module for RobinPath.
Clearbit
Clearbit module for RobinPath.
Package: @robinpath/clearbit | Category: Utility | Type: Utility
Authentication
clearbit.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 clearbit module when you need to:
- enrichPerson -- Use
clearbit.enrichPersonto perform this operation - enrichCompany -- Use
clearbit.enrichCompanyto perform this operation - findPerson -- Use
clearbit.findPersonto perform this operation - findCompany -- Use
clearbit.findCompanyto perform this operation - revealVisitor -- Use
clearbit.revealVisitorto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure clearbit credentials. | object |
enrichPerson | enrichPerson | object |
enrichCompany | enrichCompany | object |
findPerson | findPerson | object |
findCompany | findCompany | object |
revealVisitor | revealVisitor | object |
lookupEmail | lookupEmail | object |
lookupDomain | lookupDomain | object |
autocompleteCompany | autocompleteCompany | object |
getPersonFlag | getPersonFlag | object |
getCompanyFlag | getCompanyFlag | object |
prospectorSearch | prospectorSearch | object |
nameToEmail | nameToEmail | object |
listTags | listTags | object |
combined | combined | object |
Functions
setCredentials
Configure clearbit credentials.
Module: clearbit | Returns: object -- API response.
clearbit.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | apiKey |
enrichPerson
enrichPerson
Module: clearbit | Returns: object -- API response.
clearbit.enrichPerson
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
enrichCompany
enrichCompany
Module: clearbit | Returns: object -- API response.
clearbit.enrichCompany
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
findPerson
findPerson
Module: clearbit | Returns: object -- API response.
clearbit.findPerson
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
findCompany
findCompany
Module: clearbit | Returns: object -- API response.
clearbit.findCompany
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
revealVisitor
revealVisitor
Module: clearbit | Returns: object -- API response.
clearbit.revealVisitor
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
lookupEmail
lookupEmail
Module: clearbit | Returns: object -- API response.
clearbit.lookupEmail
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
lookupDomain
lookupDomain
Module: clearbit | Returns: object -- API response.
clearbit.lookupDomain
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
autocompleteCompany
autocompleteCompany
Module: clearbit | Returns: object -- API response.
clearbit.autocompleteCompany
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getPersonFlag
getPersonFlag
Module: clearbit | Returns: object -- API response.
clearbit.getPersonFlag
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getCompanyFlag
getCompanyFlag
Module: clearbit | Returns: object -- API response.
clearbit.getCompanyFlag
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
prospectorSearch
prospectorSearch
Module: clearbit | Returns: object -- API response.
clearbit.prospectorSearch
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
nameToEmail
nameToEmail
Module: clearbit | Returns: object -- API response.
clearbit.nameToEmail
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listTags
listTags
Module: clearbit | Returns: object -- API response.
clearbit.listTags
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
combined
combined
Module: clearbit | Returns: object -- API response.
clearbit.combined
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Clearbit API error (${res.status}): ${t} | Check the error message for details |
clearbit.setCredentials requires apiKey. | Check the error message for details |
Clearbit: "..." not configured. Call clearbit.setCredentials first. | Check the error message for details |
@desc "Enrich person and validate result"
do
set $result as clearbit.enrichPerson
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate PersonFlag
Retrieve all items and loop through them.
@desc "Setup authentication"
do
clearbit.setCredentials $token
enddo
@desc "Get person flag and iterate results"
do
set $result as clearbit.getPersonFlag
each $item in $result
print $item
end
enddo
2. Multi-step Clearbit workflow
Chain multiple clearbit operations together.
@desc "Setup authentication"
do
clearbit.setCredentials $token
enddo
@desc "Enrich person, enrich company, and more"
do
set $r_enrichPerson as clearbit.enrichPerson
set $r_enrichCompany as clearbit.enrichCompany
set $r_findPerson as clearbit.findPerson
print "All operations complete"
enddo
3. Safe enrichPerson with validation
Check results before proceeding.
@desc "Setup authentication"
do
clearbit.setCredentials $token
enddo
@desc "Enrich person and validate result"
do
set $result as clearbit.enrichPerson
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- json -- JSON module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.2 | latest | 1 months ago |
Related Modules
@robinpathv0.1.4
SMTP email sending and address parsing for RobinPath
hash
JS@robinpathv0.1.3
Cryptographic hashing utilities: MD5, SHA family, HMAC, CRC32, file hashing, UUID v5 generation, secure random bytes, and content fingerprinting
csv
JS@robinpathv0.1.2
Parse and stringify CSV data
apollo
JS@robinpathv0.1.2
Apollo module for RobinPath.
$ robinpath add @robinpath/clearbit
