Sending Lead Data to Zoho CRM
Tutorial on how to setup a webhook from Zoho and connect to your Agent Supply account.
✅ Prerequisites
Make sure you have:
A Zoho CRM account with API access enabled.
A valid OAuth 2.0 access token from Zoho (guide below).
An Agent Supply account with access to build Chains (Agent workflows).
🧩 Step-by-Step: Send Lead Data to Zoho CRM via Agent Supply
Step 1: Generate Your Zoho CRM API Access Token
Zoho uses OAuth 2.0. Here’s how to get the token:
Go to Zoho API Console.
Create a new client (select Server-based Applications).
Set a redirect URI (it can be dummy if using the "Self Client").
Generate a code using the "Self Client" tab.
Exchange the code for an access token using this command:
bashCopiarEditarcurl --request POST \
--url https://accounts.zoho.com/oauth/v2/token \
--data 'grant_type=authorization_code&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&redirect_uri=YOUR_REDIRECT_URI&code=YOUR_CODE'
Save the access_token
and refresh_token
securely.
Step 2: Capture Lead Data in Agent Supply
Go to the Chain Builder in Agent Supply.
Add steps to collect user data:
Name
Email
Company
Phone
Store each piece of data in variables (e.g.,
{{first_name}}
,{{email}}
, etc.).
Step 3: Add HTTP Request Node to Your Chain
Insert an HTTP request node after capturing lead data.
Configure it with the following:
🌍 URL
rubyCopiarEditarhttps://www.zohoapis.com/crm/v2/Leads
🔧 Method
nginxCopiarEditarPOST
🔐 Headers
jsonCopiarEditar{
"Authorization": "Zoho-oauthtoken YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
🧾 Body (JSON)
Fill in Zoho CRM fields using your stored variables:
jsonCopiarEditar{
"data": [
{
"Company": "{{company}}",
"Last_Name": "{{last_name}}",
"First_Name": "{{first_name}}",
"Email": "{{email}}",
"Phone": "{{phone}}",
"Lead_Source": "Agent Supply"
}
]
}
Replace variable names with whatever you're using in your Chain.
Step 4: Test Your Chain
Run a test session through your Chain.
Submit lead data.
Go to Zoho CRM > Leads to confirm the lead was created.
Step 5: Handle Token Expiry (Optional)
Access tokens expire (usually after 1 hour). To handle this:
Use your
refresh_token
to generate new tokens on demand.You can set up a separate Agent Supply Chain to refresh the token:
bashCopiarEditarcurl --request POST \
--url https://accounts.zoho.com/oauth/v2/token \
--data 'refresh_token=YOUR_REFRESH_TOKEN&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&grant_type=refresh_token'
Store and reuse the new access token in your Agent Supply Chain.
✅ Summary
1
Get Zoho OAuth access token
2
Collect lead data in Agent Supply Chain
3
Use HTTP request node to send data to Zoho CRM
4
Test and confirm leads appear in Zoho
5
(Optional) Automate token refresh
Last updated