Create a LEAD in ZOHO CRM using Node JS
In this article, I will explain you that, how we can insert a lead in ZOHO CRM with node js, for this we will create lead with XMLDATA using CURL request. You can create leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, custom, and notes also with ZOHO CRM. https://crm.zoho.com/crm/private/json/Leads/insertRecords API is used to insert a LEAD in ZOHO CRM with XMLDATA .
We will install below dependencies in node js to insert lead with zoho CRM
- axios
- xml
- querystring
To insert LEAD in ZOHO CRM with node js auth_token is required. I'm using the following code to insert LEAD.
const axios = require('axios')
const xml = require('xml')
const querystring = require('querystring')
const xmlData = xml({
Leads: [
{
row: [
{ _attr: { no: '1' } },
{ FL: [{ _attr: { val: 'Company' } }, 'NoMeLoMe IT'] },
{ FL: [{ _attr: { val: 'First Name' } }, 'User'] },
{ FL: [{ _attr: { val: 'Last Name' } }, 'Test'] },
{ FL: [{ _attr: { val: 'Referred By' } }, 'blank'] },
{ FL: [{ _attr: { val: 'Email' } }, 'sdfsdfsd@dfg.hgfj'] }
]
}
]
})
axios({
url: 'https://crm.zoho.com/crm/private/json/Leads/insertRecords?authtoken=AUTH TOKEN HERE&scope=crmapi&xmlData='+xmlData,
method: 'POST',
data: {
foo: 'bar'
}
})
In this article, I will explain you that, how we can insert a lead in ZOHO CRM with node js, for this we will create lead with XMLDATA using CURL request. You can create leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, custom, and notes also with ZOHO CRM. https://crm.zoho.com/crm/private/json/Leads/insertRecords API is used to insert a LEAD in ZOHO CRM with XMLDATA .
We will install below dependencies in node js to insert lead with zoho CRM
- axios
- xml
- querystring
To insert LEAD in ZOHO CRM with node js auth_token is required. I'm using the following code to insert LEAD.
const axios = require('axios')
const xml = require('xml')
const querystring = require('querystring')
const xmlData = xml({
Leads: [
{
row: [
{ _attr: { no: '1' } },
{ FL: [{ _attr: { val: 'Company' } }, 'NoMeLoMe IT'] },
{ FL: [{ _attr: { val: 'First Name' } }, 'User'] },
{ FL: [{ _attr: { val: 'Last Name' } }, 'Test'] },
{ FL: [{ _attr: { val: 'Referred By' } }, 'blank'] },
{ FL: [{ _attr: { val: 'Email' } }, 'sdfsdfsd@dfg.hgfj'] }
]
}
]
})
axios({
url: 'https://crm.zoho.com/crm/private/json/Leads/insertRecords?authtoken=AUTH TOKEN HERE&scope=crmapi&xmlData='+xmlData,
method: 'POST',
data: {
foo: 'bar'
}
})
Latest Comments