Google Apps Script and Zoho API
Hello,
i want insert leads with Google Apps Script but i have one error and i don't find the mistake, could you help me ?
- function test() {
- var url = 'https://crm.zoho.com/crm/private/json/Leads/insertRecords';
- var xmlData = '<Leads><row no="1"><FL val="Company">Your Company</FL><FL val="First Name">Hannah</FL><FL val="Last Name">Smith</FL><FL val="Email">testing@testing.com</FL></row></Leads>';
- var options =
- {
- 'authtoken' : 'XXXXXX',
- 'scope' : 'crmapi',
- 'newFormat' : '1',
- 'xmlData' : xmlData
- }
- var result=UrlFetchApp.fetch(url,options);
- var output = Utilities.jsonParse(result.getContentText());
- Logger.log(output);
- }