Google apps script and Zoho API
Hello,
i want create a leads with Google apps Script and my code make ERROR 4600 (problem with XmlData), but i don't know why ? could you help me thanks
- 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' : 'aaaa',
- 'scope' : 'crmapi',
- 'newFormat' : '1',
- 'xmlData' : xmlData
- }
- var result=UrlFetchApp.fetch(url,options);
- var output = Utilities.jsonParse(result.getContentText());
- Logger.log(output);
- }