Nutshell
Manage leads, contacts, and sales activity in Nutshell CRM directly from InTouch via the Nutshell REST API.
This tool reads and creates the core Nutshell sales objects: leads, contacts, and activities. It uses only the Python standard library (no third-party packages) and returns the raw Nutshell payload as a JSON string so downstream job steps can parse it.
What it does
- Search and list leads, contacts, and activities (paged, sortable, free-text search).
- Create a new lead, contact, or sales activity.
The Nutshell payload is returned in result (a JSON string) and the HTTP status in status.
Operations
| operation | API call | Key inputs |
|---|---|---|
list_leads |
GET /rest/leads |
q, sort, limit, page |
create_lead |
POST /rest/leads |
description (required — sets lead name) |
list_contacts |
GET /rest/contacts |
q, sort, limit, page |
create_contact |
POST /rest/contacts |
name (required), emailValue, phone |
list_activities |
GET /rest/activities |
q, sort, limit, page |
create_activity |
POST /rest/activities |
description (required), logNote, activityType |
List operations accept:
q— free-text search across the entity's related info.sort— sort field; prefix with-for descending (e.g.-createdTime).limit— page size, 1–100 (default 10).page— zero-based page number (default 0).
API key setup
The Nutshell REST API authenticates with HTTP Basic auth:
- Username = a Nutshell user's email address (
emailinput). - Password = an API key (
apiKeyinput).
To get an API key:
- Sign in to Nutshell.
- Go to Setup > API keys.
- Create a key and copy it.
Provide both email (the user the key belongs to) and apiKey on every call. All requests go over HTTPS to https://app.nutshell.com/rest.
Examples
List the 5 most recently created leads:
{
"apiKey": "your-nutshell-api-key",
"email": "[email protected]",
"operation": "list_leads",
"sort": "-createdTime",
"limit": "5"
}
Search contacts for "acme":
{
"apiKey": "your-nutshell-api-key",
"email": "[email protected]",
"operation": "list_contacts",
"q": "acme"
}
Create a contact with a primary email and phone:
{
"apiKey": "your-nutshell-api-key",
"email": "[email protected]",
"operation": "create_contact",
"name": "Jane Doe",
"emailValue": "[email protected]",
"phone": "+1-555-0100"
}
Create a lead:
{
"apiKey": "your-nutshell-api-key",
"email": "[email protected]",
"operation": "create_lead",
"description": "Acme Q3 expansion"
}
Output
{
"result": "{\"leads\":[ ... ]}",
"status": "200",
"operation": "list_leads"
}
result— the Nutshell JSON response, as a string.status— HTTP status code. 4xx/5xx responses are returned with their error body intact (the tool does not fail the step on an API error); only transport-level failures produce anerrorand fail the step.truncated— present and"true"if the response body exceeded the 5 MB cap.
Notes
- Grounded in the official Nutshell developer docs: https://developers.nutshell.com/
- Standard library only (
urllib,json,base64). - License: MIT.