Purpose: Enable Minnie to read deal data from Zoho CRM for Carmee's agentic assistant
Scopes Required: ZohoCRM.modules.deals.READ, ZohoCRM.modules.contacts.READ, ZohoCRM.modules.notes.READ
Date: February 17, 2026
Zoho CRM uses OAuth 2.0 for API access. This guide walks through:
Minnie CRM Integration (or any descriptive name)https://openclaw.ai (or ZTAG website)http://localhost:8080/oauth/callbackOn the VPS, create: /home/node/.openclaw/credentials/zoho-crm-client-secret.json
{
"client_id": "PASTE_CLIENT_ID_HERE",
"client_secret": "PASTE_CLIENT_SECRET_HERE",
"redirect_uri": "http://localhost:8080/oauth/callback",
"auth_uri": "https://accounts.zoho.com/oauth/v2/auth",
"token_uri": "https://accounts.zoho.com/oauth/v2/token"
}
File permissions:
chmod 600 /home/node/.openclaw/credentials/zoho-crm-client-secret.json
For Carmee's assistant, we need:
ZohoCRM.modules.deals.READ - Pull deal pipeline dataZohoCRM.modules.contacts.READ - Customer historyZohoCRM.modules.notes.READ - Internal deal notesRun this command on the VPS:
cd /home/node/.openclaw/workspace
python3 tools/zoho-crm-oauth-init.py
Expected output:
Zoho CRM OAuth Authorization URL:
https://accounts.zoho.com/oauth/v2/auth?scope=ZohoCRM.modules.deals.READ,ZohoCRM.modules.contacts.READ,ZohoCRM.modules.notes.READ&client_id=YOUR_CLIENT_ID&response_type=code&access_type=offline&redirect_uri=http://localhost:8080/oauth/callback
Copy this URL and open it in your browser.
access_type=offline ensures we get a refresh token (for automated renewal)http://localhost:8080/oauth/callback?code=LONG_AUTH_CODEcode=... value from the URL barExample URL:
http://localhost:8080/oauth/callback?code=1000.abcd1234efgh5678.ijkl9012mnop3456
Copy this part: 1000.abcd1234efgh5678.ijkl9012mnop3456
On the VPS:
cd /home/node/.openclaw/workspace
python3 tools/zoho-crm-oauth-exchange.py "PASTE_AUTH_CODE_HERE"
Replace PASTE_AUTH_CODE_HERE with the code from Step 4.3.
✓ Tokens retrieved successfully
Access Token: 1000.abcdef123456...
Refresh Token: 1000.ghijkl789012...
Expires In: 3600 seconds (1 hour)
✓ Tokens saved to: /home/node/.openclaw/credentials/zoho-crm-tokens.json
cat /home/node/.openclaw/credentials/zoho-crm-tokens.json
Should contain:
{
"access_token": "1000.abcdef...",
"refresh_token": "1000.ghijkl...",
"expires_in": 3600,
"api_domain": "https://www.zohoapis.com",
"token_type": "Bearer",
"scope": "ZohoCRM.modules.deals.READ ZohoCRM.modules.contacts.READ ZohoCRM.modules.notes.READ"
}
cd /home/node/.openclaw/workspace
python3 tools/zoho-crm-test.py
Expected output:
Testing Zoho CRM API access...
✓ Access token valid
✓ Connected to: https://www.zohoapis.com
Fetching deals (limit 5)...
Deal #1: [Deal Name] - Stage: [Qualification/Proposal/etc.]
Deal #2: ...
Deal #3: ...
✓ Test successful! Zoho CRM API is working.
Error: "invalid_code"
Error: "invalid_client"
Error: "insufficient_scope"
Error: "INVALID_TOKEN" when testing
Script: tools/zoho-crm-refresh-token.py
Usage:
python3 tools/zoho-crm-refresh-token.py
Scheduled refresh: Add to cron (runs every 50 minutes):
crontab -e
Add line:
*/50 * * * * cd /home/node/.openclaw/workspace && python3 tools/zoho-crm-refresh-token.py >> /tmp/zoho-crm-token-refresh.log 2>&1
When Carmee agent needs deal data:
from tools.zoho_crm_client import ZohoCRMClient
# Initialize client (auto-loads tokens, auto-refreshes if needed)
crm = ZohoCRMClient()
# Fetch deal by ID
deal = crm.get_deal("1234567890")
# Returns:
{
"Deal_Name": "Oakland School District - Grant Funded",
"Stage": "Qualification",
"Contact_Name": "Jane Smith",
"Amount": 50000,
"Closing_Date": "2026-03-15",
"Description": "ELOP grant, 150 students, after-school program"
}
Agent uses deal data to:
/home/node/.openclaw/credentials/zoho-crm-client-secret.json (600 permissions)/home/node/.openclaw/credentials/zoho-crm-tokens.json (600 permissions).gitignore)Zoho has multiple data centers. Ensure you're using the correct API domain:
https://www.zohoapis.com (most common)https://www.zohoapis.euhttps://www.zohoapis.inhttps://www.zohoapis.com.auhttps://www.zohoapis.com.cnCheck your account's data center:
api_domain in token file if neededCheck refresh logs:
tail -f /tmp/zoho-crm-token-refresh.log
Zoho CRM API limits (as of 2026):
For Carmee agent: Estimated 50-100 API calls/day (well under limit)
If needed, revoke API access:
Zoho API Documentation: https://www.zoho.com/crm/developer/docs/api/v3/
Zoho Developer Forum: https://help.zoho.com/portal/en/community/topic/zoho-crm
OpenClaw Zoho Integration Docs: (This file)
After completing this setup:
See: working/ops/carmee-agent-shadow-testing.md for testing protocol.