Zoho CRM app
The Zoho CRM app gives workflows tools that make leads in Zoho CRM. It connects to Zoho with an OAuth client that the person who installs the app makes in Zoho.
How to send leads to Zoho CRM gives the steps.
Manifest
| Property | Value |
|---|---|
handle | zoho-crm |
name | Zoho CRM |
scopes | None. The app asks for no access to the project data. |
offlineAccess | Not set |
events | None |
slots | app-home |
workflowTools | create_lead, check_connection |
See App manifest for each property.
Slot
| Location | Title | Height | What it shows |
|---|---|---|---|
app-home | Zoho CRM connection | 360 | The app page. See App page. |
The height is in pixels.
App page
| Part | What it does |
|---|---|
Redirect URI: | The URL to give to the OAuth client in Zoho: <app URL>/oauth/callback. |
| Client ID | The client ID of the OAuth client. |
| Client secret | The client secret of the OAuth client. The page never shows a saved secret. |
| Save client | Stores the client. After this, the page shows Client ID <client ID>, client secret set. |
| Replace client | Shows the client form again, with a Cancel button. When the installation has a connection, the form shows Saving a new client disconnects Zoho CRM. |
Zoho data centre | The data center of the Zoho account. See Data centers. The default is us. |
| Connect Zoho CRM | Opens a new window at the sign-in page of Zoho. Shows when a client is stored and the installation has no connection. |
| Account line | Connected to <organization> through <accounts server>. When Zoho gives no organization name, Zoho CRM replaces it. |
| Test connection | Gets an access token from Zoho, and reads the name of the Zoho organization. |
Disconnect | Removes the connection. See Removal of the connection. |
Data centers
The Zoho data centre list holds these values. The app sends the person to the accounts
server of the data center that they choose.
| Value | Name in the list | Accounts server |
|---|---|---|
us | United States (zoho.com) | https://accounts.zoho.com |
eu | Europe (zoho.eu) | https://accounts.zoho.eu |
in | India (zoho.in) | https://accounts.zoho.in |
au | Australia (zoho.com.au) | https://accounts.zoho.com.au |
jp | Japan (zoho.jp) | https://accounts.zoho.jp |
uk | United Kingdom (zoho.uk) | https://accounts.zoho.uk |
ca | Canada (zohocloud.ca) | https://accounts.zohocloud.ca |
sa | Saudi Arabia (zoho.sa) | https://accounts.zoho.sa |
cn | China (zoho.com.cn) | https://accounts.zoho.com.cn |
The app accepts a connection only from one of these accounts servers. The app calls Zoho CRM at the API domain that Zoho gives for the connection.
Zoho scopes
The app asks Zoho for these scopes, with access_type=offline. Zoho then gives a refresh token:
| Scope | Use |
|---|---|
ZohoCRM.modules.leads.CREATE | Make leads. |
ZohoCRM.modules.leads.READ | Read leads. |
ZohoCRM.org.READ | Read the name of the Zoho organization. |
Zoho shows the consent page each time that a person connects.
Workflow tool create_lead
| Property | Value |
|---|---|
| Tool name | app.<installation slug>.create_lead, for example app.zoho-crm.create_lead |
| Label in workflows | Zoho CRM: Create Zoho lead |
| Effect | write |
The tool makes one lead in the Leads module of Zoho CRM.
Arguments
| Name | Label | Type | Required | Zoho field |
|---|---|---|---|---|
lastName | Last name | string | Yes | Last_Name |
firstName | First name | string | No | First_Name |
email | Email | string | No | Email |
company | Company | string | No | Company |
The tool does not send an empty argument to Zoho.
Output
| Name | Label | Type | Description |
|---|---|---|---|
zohoLeadId | Zoho lead id | string | The ID of the new lead in Zoho. test-run in a test run. |
A test run of a workflow does not make a lead. The tool returns
{ "zohoLeadId": "test-run" }. It does not read the connection. It still fails when
lastName is empty.
Errors
| Message | When |
|---|---|
lastName is required | lastName is empty. |
Connect Zoho CRM on the app’s page in this project first | The installation has no connection. |
Save your Zoho OAuth client on the app’s page in this project first | The installation has no client. |
Zoho refused the request: <error> | Zoho did not give an access token for the connection. |
Zoho answered without an access token | Zoho gave no access token for the connection. |
Zoho CRM refused the lead (<status>) | Zoho CRM did not make the lead. |
Zoho CRM could not be reached | The app cannot reach Zoho CRM. |
Workflow tool check_connection
| Property | Value |
|---|---|
| Tool name | app.<installation slug>.check_connection, for example app.zoho-crm.check_connection |
| Label in workflows | Zoho CRM: Check Zoho connection |
| Effect | read |
The tool has no arguments.
Output
| Name | Label | Type | Description |
|---|---|---|---|
connected | Connected | boolean | true when Zoho gives an access token, and Zoho CRM answers the request for the organization. |
organization | Zoho organisation | string | The name of the Zoho organization. Empty when the installation has no connection. |
The tool does not fail when the connection does not operate. It returns connected: false.
Data that Picked keeps
The app keeps the data of each installation in labels of the installation in Picked:
| Label | Type | Secret | Value |
|---|---|---|---|
zoho.client_id | text | No | The client ID of the OAuth client. |
zoho.client_secret | text | Yes | The client secret of the OAuth client. |
zoho.connection | json | Yes | The connection: accountsServer, apiDomain, refreshToken, connectedAt and organization. |
The page of the app gets the client ID, and only the fact that a secret is set. See How to store data for an installation.
New client
Save client with a new client does these things:
- The app stores the new client ID and client secret.
- When the installation has a connection, the app tells Zoho to revoke the refresh token.
- The app deletes
zoho.connection.
After this, the installation has no connection.
Removal of the connection
Disconnect tells Zoho to revoke the refresh token. It then deletes zoho.connection. The
client stays.
Removal of the app from the project also tells Zoho to revoke the refresh token. Picked then deletes all of the labels of the installation.
The app ignores the answer from Zoho. When Zoho does not revoke the token, Picked still deletes the connection.
Messages
| Message | When |
|---|---|
Saved your Zoho OAuth client | Save client is complete. |
Enter the client ID and client secret of your Zoho OAuth client | The client ID or the client secret is empty. |
Picked refused the client: <reasons> | Picked did not accept the labels of the client. |
Picked could not save the client; save it again | Picked did not store the client. |
Save your Zoho OAuth client first | Connect Zoho CRM started with no client. |
Unknown data centre | The data center is not in the list. |
Waiting for Zoho… | The new window of Connect Zoho CRM is open. |
Connected to <organization> | The connection, or the test of the connection, is complete. Connected to Zoho CRM when Zoho gives no organization name. |
Testing… | Test connection started. |
Zoho answered without an access token | Test connection got no access token from Zoho. |
Zoho CRM could not be reached | Test connection cannot reach Zoho CRM. |
Zoho sent no code | Zoho sent the window back with no authorization code. |
This connection link has expired or was opened in another browser; start again | The window is too old, or it is in a different browser. |
The app could not start connecting | The window did not get the sign-in address of Zoho. |
Allow pop-ups to connect | The browser did not open the window. |
The connection window closed. If you finished connecting there, it shows here | The window closed before it sent a result. |
Zoho named an accounts server the app does not trust | The accounts server is not in Data centers. |
Zoho answered without a refresh token; connect again | Zoho did not give a refresh token. |
Zoho refused the request: <error> | Zoho refused the authorization code or the refresh token. When Zoho gives no error, the message is Zoho refused the request. |
Zoho could not be reached | The app cannot reach the accounts server. |
Zoho CRM could not be connected | The connection failed for a different reason. |
Zoho CRM is not connected | Test connection with no connection. |
Zoho CRM answered <status> | Zoho CRM refused the request for the organization. |
Disconnected | Disconnect is complete. |
Sign in again | The session of the page expired. |
When Zoho sends an error in place of a code, the window shows the value of that error.
