我目前正在尝试在Zoho Desk中运行一个自定义函数,该函数在创建票证时触发,目标是由我们的支持@zoho创建的票证。电子邮件地址,可将收到的电子邮件转换为工单。
更具体地说,当电子邮件包含JSON附件时,我希望自定义函数能够读取附件并从附件中提取JSON数据。
这个是可能的吗?有谁成功了吗?
下面是我的代码,我认为我是在正确的轨道上,但遇到了下面的错误
//TicketID is set as an Argument for the custom function
ORGID = "********";
getthread = zoho.desk.getRelatedRecords(ORGID,"threads","tickets",TicketID);
threadid = getthread.getJSON("data").getJSON("id");
getthreadcontent = zoho.desk.getRelatedRecordById(ORGID,"threads",threadid,"tickets",TicketID);//.getJSON("content");
info getthreadcontent.getJSON("attachments").getJSON("name"); //Prints the Attachment Name (Works)
info getthreadcontent;//.getJSON("attachments").getJSON("href");//Prints the Attachment URL (Works)
response = invokeUrl
[
url: getthreadcontent.getJSON("attachments").getJSON("href")
type: GET
];上面的代码返回这个错误:
{"errorCode":"UNAUTHORIZED","message":"You are not authenticated to perform this operation."}如有任何帮助或建议,我们将不胜感激:)
发布于 2021-03-01 23:51:03
看起来您可能需要将Zoho Auth令牌添加到URL中,然后进行invoke_url()调用。
https://stackoverflow.com/questions/66270827
复制相似问题