Dograh

How to Connect a Voice Agent to Zoho CRM: Lookups and Call Logs

How to Connect a Voice Agent to Zoho CRM: Lookups and Call Logs
TutorialDecember 4, 2026·10 min read

How to Connect a Voice Agent to Zoho CRM: Lookups and Call Logs

Abhishek Kumar
Abhishek Kumar·Co-founder, Dograh AI

Co-founder of Dograh, building the future of open-source voice AI agents. Own your voice AI stack.

To connect a voice agent to Zoho CRM, run a small bridge that refreshes Zoho's one-hour tokens, and send every lookup, update and call log through it. With that bridge in place, Dograh, the open-source AI voice agent platform, works with Zoho, and you can self-host it or use Dograh Cloud.

Key Takeaways

  • Zoho access tokens last one hour, so a bridge renews them with the refresh token.
  • Zoho's phone search covers every phone field in a module in one request.
  • A completed Zoho call needs a duration in HH:mm, never zero.

A voice agent that knows the caller's Zoho history before saying hello sounds prepared. This guide wires a voice agent to Zoho CRM in Dograh, our open-source AI voice agent platform, step by step from the Self Client to logged calls. Then we cover Zoho's API limits and testing.

What you need before you start

These steps follow the published Dograh and Zoho docs. Run them on a trial server before production, against a Zoho CRM sandbox or a test org, so test calls never write notes onto real customers.

You need Zoho CRM admin access, the data center your account lives in (the end of your Zoho address, such as .com, .eu or .in), a Dograh agent that passes a browser test call, and a small service of your own that we call the bridge. Our guide to connecting a voice agent to your CRM explains the bridge idea in full. Here it carries every Zoho request.

Zoho is reached through API calls you set up in Dograh, with Pre-Call Data Fetch before the greeting, HTTP API tools during the call and the Webhook node after it, rather than a built-in connector. If all you need is a log of each call in Zoho, a phone platform with a ready Zoho integration can do that with no code. The route below fits when the agent should know the caller, change the record during the call and write its own summary.

The reason for the bridge is the token. Each Zoho access token is valid for an hour, while a refresh token lasts until someone revokes it. A Dograh credential is a fixed value, so it cannot hold an hourly token. The bridge holds the refresh token, gets fresh access tokens and talks to Zoho, and Dograh sends the bridge a fixed key of your own.

Check: you know your data center, and the bridge has an HTTPS address Dograh can reach.

Step 1: Create a Self Client and a refresh token

A Self Client is Zoho's way to give one server-side app its own credentials, with no login screen. Sign in to the Zoho API console at api-console.zoho.com, choose Self Client, click Create Now and then OK. The Client ID and Client Secret sit under the Client Secret tab.

Open the Generate Code tab and enter the scopes, separated by commas. This setup needs ZohoCRM.modules.contacts.READ, ZohoCRM.modules.contacts.WRITE, ZohoCRM.modules.leads.READ, ZohoCRM.modules.leads.WRITE, ZohoSearch.securesearch.READ, ZohoCRM.modules.notes.CREATE and ZohoCRM.modules.calls.CREATE. Pick a Time Duration for the code, add a description, click Create, choose your portal and organization, click Create again and copy the grant token. It expires within that duration, so exchange it right away. The request below sends it, in code, to your data center's accounts URL:

curl -X POST "https://accounts.zoho.eu/oauth/v2/token" \
  -d "grant_type=authorization_code" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "code=YOUR_GRANT_TOKEN"

What this does: It swaps the one-time grant token for an access token, a long-lived refresh_token and the api_domain your account's API lives on. Store the refresh token and the domain in the bridge's secrets, and nowhere else.

Use the accounts URL that matches your data center, such as accounts.zoho.com, accounts.zoho.eu or accounts.zoho.in. A request sent to the wrong one fails. Salesforce works differently, and our post on connecting a voice agent to Salesforce uses its client credentials flow, where the bridge asks for a token with the client ID and secret alone.

Check: the exchange returns a refresh_token, and it is saved only in the bridge.

The bridge needs two Zoho calls to start with, a token refresh and a phone search. The code below caches the access token for most of its hour, then looks a number up in Contacts, sending the token in Zoho's own Zoho-oauthtoken header:

import time
import requests

ACCOUNTS_URL = "https://accounts.zoho.eu"   # your data center
API_DOMAIN = "https://www.zohoapis.eu"      # api_domain from the token reply
_token = {"value": None, "expires": 0}

def zoho_token():
    if time.time() < _token["expires"] - 300:
        return _token["value"]
    r = requests.post(f"{ACCOUNTS_URL}/oauth/v2/token", params={
        "refresh_token": REFRESH_TOKEN, "client_id": CLIENT_ID,
        "client_secret": CLIENT_SECRET, "grant_type": "refresh_token"}, timeout=5)
    r.raise_for_status()
    _token.update(value=r.json()["access_token"], expires=time.time() + 3600)
    return _token["value"]

def find_caller(phone):
    r = requests.get(f"{API_DOMAIN}/crm/v8/Contacts/search", params={"phone": phone},
                     headers={"Authorization": f"Zoho-oauthtoken {zoho_token()}"}, timeout=4)
    if r.status_code == 204:
        return {}
    r.raise_for_status()
    contact = r.json()["data"][0]
    return {"first_name": contact.get("First_Name"), "zoho_record_id": contact["id"],
            "zoho_module": "Contacts"}

What this does: zoho_token refreshes only when the cached token is within 5 minutes of its hour, so most calls reuse it. find_caller returns the contact's first name and record ID, or nothing when no contact has that number.

Zoho's phone search looks across all phone fields in the module, so a mobile number saved in the Mobile field still matches. If you also keep Leads, run the same search on /crm/v8/Leads/search when Contacts finds nobody, and return "zoho_module": "Leads".

Check: calling find_caller with a test contact's number returns that contact's record ID.

Dograh

Open Source Alternative to Vapi / Retell

Self-hosted voice agent platform — no per-minute fees

dograh-hq/dograh

Star on GitHub

Step 3: Look up the caller before the greeting

Now point Dograh at the bridge. In Dograh, open Credentials in the sidebar, click Add Credential and pick API Key as the Credential Type. Set Header Name to a name of your own, such as X-Bridge-Key, and put a long random value in API Key. The bridge refuses any request without it.

Open the agent and turn on Pre-Call Data Fetch at the bottom of the Start Call node, with the mode Inbound calls only. Set Endpoint URL to the bridge's lookup address and pick the API Key credential. It sends a POST with the caller's details to an endpoint you run, including from_number, and the bridge answers with the values Dograh should keep:

{
  "initial_context": {
    "first_name": "Jane",
    "zoho_record_id": "4876876000000123456",
    "zoho_module": "Contacts"
  }
}

What this does: Dograh merges these keys into the call's variables, so the prompt can use {{initial_context.first_name}} and the tools can send {{initial_context.zoho_record_id}}. An unknown caller gets an empty initial_context, and the agent asks for a name instead.

The caller hears ringing until the bridge answers, and Dograh waits up to 10 seconds. If the bridge fails or times out, the call goes on without the data, so the prompt should cope with a missing name. Our post on Pre-Call Data Fetch covers testing this in the browser with the Variables tab.

Check: a test call from a known number shows zoho_record_id in the call's variables.

Step 4: Update the record during the call

Mid-call changes also go through the bridge, since Dograh never holds a Zoho token. Here the agent saves the time a caller wants a callback. Open Tools, click Create New Tool and pick External HTTP API. Set HTTP Method to POST, Endpoint URL to the bridge's update address, and pick the same API Key credential on the Authentication tab.

A caller asks for a callback and the agent says it will note the time. During the call the time goes to the bridge, a small service of the team's own, which saves it on the contact in Zoho CRM. Below, the same callback time is kept as an extracted variable and still reaches the bridge after the call if the live update fails.
A live update can fail while the caller is still talking, so the callback time is captured twice, once mid-call and once in the results sent afterwards. Either way the bridge gets the time, rather than losing it to one failed attempt.

On the Parameters tab, add an LLM Parameter callback_time that the agent fills from the conversation, and a Preset Parameter zoho_record_id with the value {{initial_context.zoho_record_id}}, so the agent never has to say or guess an ID. The bridge turns that into Zoho's update request on the contact and answers with a short {"saved": true}.

The bridge request plus the Zoho request take a moment, so add a line under When the tool starts in the tool's Messages card, such as "Let me note that time for you." The tool waits 5 seconds by default and does not retry, so write in the prompt what the agent says if it gets an error. Add callback_time as an extracted variable too, so the time still reaches the bridge after the call when the live update fails.

Check: ask for a callback in a test call and watch the field change on the contact in Zoho.

Step 5: Write a note and a call record afterwards

When the call ends, a Webhook node sends the result to the bridge, which writes two things in Zoho. Select Add node on the canvas, add a Webhook node, set HTTP Method to POST, point Endpoint URL at the bridge, pick the API Key credential under Authentication and use a flat Payload Template:

{
  "call_id": "{{workflow_run_id}}",
  "zoho_record_id": "{{initial_context.zoho_record_id}}",
  "zoho_module": "{{initial_context.zoho_module}}",
  "started_at": "{{call_time}}",
  "duration_seconds": "{{cost_info.call_duration_seconds}}",
  "outcome": "{{gathered_context.call_disposition}}",
  "summary": "{{gathered_context.call_summary}}"
}

What this does: It gives the bridge the record, the call's start time and length, the outcome and a summary. Dograh also adds a call_disposition key of its own, which the bridge can ignore.

The bridge adds the summary as a Note on the record and creates a record in the Calls module. A Zoho Calls record needs a Subject, a Call_Type, a Call_Start_Time and, for a completed call, a Call_Duration in HH:mm that is never zero. So the bridge rounds a short call up to one minute:

import math
from datetime import datetime

def zoho_call(event):
    minutes = max(1, math.ceil(float(event["duration_seconds"] or 0) / 60))
    started = datetime.fromisoformat(event["started_at"]).replace(microsecond=0)
    return {"data": [{
        "Subject": f"Voice agent call: {event['outcome']}",
        "Call_Type": "Inbound",
        "Call_Start_Time": started.isoformat(),
        "Call_Duration": f"{minutes // 60:02d}:{minutes % 60:02d}",
        "Description": event["summary"],
        "Who_Id": {"id": event["zoho_record_id"]},
    }]}

What this does: A 42-second call becomes 00:01, and the summary lands on the contact's timeline. Post the result to /crm/v8/Calls. For a lead, set What_Id and $se_module to Leads instead of Who_Id.

The summary is the language model's paraphrase from variable extraction, so when the exact words matter, play the recording. Our post on extracting call data into your CRM sets up call_summary and outcome codes. Dograh retries temporary failures, up to five attempts in all, so the bridge keeps each call_id it has logged and skips a repeat. If Zoho refuses the note or the call record, the bridge retries a set number of times, then flags it for a person.

Check: after a test call, the contact shows one note and one call record with a duration of at least 00:01.

Join the Dograh Community

Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.

Step 6: Stay inside Zoho's API limits

Zoho counts API use in two ways, and the second one bites first on a phone line. Zoho's API limits set a rolling 24-hour credit budget, for example 50,000 credits plus 500 per user license on Professional, and most calls cost one credit. They also cap concurrent calls per org and app, at 5 on Free, 10 on Standard, 15 on Professional, 20 on Enterprise and 25 on Ultimate.

A quick sum of our own shows how soon that cap arrives. On a Professional org, 15 inbound calls that connect together send 15 phone searches, which is the org's full concurrency of 15. A 16th lookup in that moment waits or fails, and that caller hears a greeting without a name.

Two habits keep you clear. Cache recent callers in the bridge for a few minutes, so a caller who rings back does not search again, and reuse the access token as the code in Step 2 does. Keep the bridge's Zoho timeout short too, because Dograh waits no more than 10 seconds for the lookup.

Check: the bridge's logs show one token refresh an hour at most, not one per call.

Before you ship it

Place three test calls by phone, one from a known contact, one from a lead and one from a number Zoho has never seen. Open each call's View Trace in Dograh to see what the bridge returned, and check Zoho for one note and one call record each.

A phone match finds a record, and it does not prove who is calling. Before the agent reads out anything from the record beyond a first name, it checks an approved detail, such as the date of birth or the postal code on file. Keep Dograh's recording and transcript links out of the payload unless your team needs them, because those links open without a login.

On a self-hosted Dograh install, the bridge key, the bridge and the call records sit on your own servers. The speech and language models you pick still process each call's audio and text, and Zoho learns only what your tools and the Webhook node pass through the bridge. The refresh token never leaves the bridge. Start with inbound calls on the test org, and switch the lookup on for real numbers once a week of call logs reads cleanly.

Glossary

Self Client
A Zoho API console client for one server-side app, with no login screen. You generate a grant code in it and exchange that code for a refresh token.
Refresh token
Zoho's long-lived token, valid until revoked, that the bridge trades for a new one-hour access token whenever the cached one runs out.
Accounts URL
The Zoho sign-in address for your data center, such as accounts.zoho.eu. Token requests must go to your account's own one.
Bridge
A small service you run between the voice agent and Zoho. It holds the refresh token, makes every Zoho request and returns only what the agent needs.

Frequently Asked Questions

Get started with Dograh

Build, deploy, and scale AI agents with Dograh. Join the community of developers building the future.