Connectors Zoho Mail

Zoho Mail

Text

The Zoho Mail connector is a text connector that fetches email messages via the Zoho Mail REST API and extracts claims from message bodies using db.ingest_text().

How it works

1 Register an OAuth App

Go to the Zoho API Console and create a new client (Server-based or Self Client).

2 Generate an Access Token

Complete the OAuth2 flow with the scope ZohoMail.messages.READ. You’ll receive an access token (starts with 1000.).

3 Find Your Account ID

Call GET https://mail.zoho.com/api/accounts with your token to get your account ID, or find it in Zoho Mail Settings → Mail Accounts.

4 Install the requests package

$ pip install requests

5 Connect

conn = db.connect("zoho",
    access_token="1000.xxx",
    account_id="12345")
result = conn.run(db)
Parameter Required Default Description
access_token Yes Zoho OAuth2 access token (1000....)
account_id Yes Zoho Mail account ID (numeric string)
folder_id No "" Folder ID to fetch from (default: inbox)
region No "com" Zoho data center TLD: com, eu, in, com.au, jp
max_results No 100 Maximum number of messages to fetch
save No False Encrypt and persist credentials

Basic usage

conn = db.connect("zoho",
    access_token="1000.xxx",
    account_id="12345")
result = conn.run(db)

EU region with folder filter

conn = db.connect("zoho",
    access_token="1000.xxx",
    account_id="12345",
    region="eu",
    folder_id="inbox",
    max_results=50,
)
result = conn.run(db)

With save

conn = db.connect("zoho",
    access_token=os.environ["ZOHO_TOKEN"],
    account_id=os.environ["ZOHO_ACCOUNT_ID"],
    save=True,
)
result = conn.run(db)

Related Connectors