首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何通过节点js将自定义参数传递给sendy?

如何通过节点js将自定义参数传递给sendy?
EN

Stack Overflow用户
提问于 2022-01-20 16:19:54
回答 1查看 116关注 0票数 2

我正在尝试通过sendy的api传递自定义数据。Sendy有自定义字段属性,我们可以在其中传递数据。我正在使用一个sendy节点js包,其链接是在sendy网站上提供的。问题是我无法将自定义字段数据传递给sendy。这是我的密码

代码语言:javascript
复制
 var params = {
            email: email2,
            custom: {
                'assignmentDetail':assignmentLink,
                'submissionDetail':submissionDetail,
                'FormLink':reviewerFormLink,
            },
            list_id: ListID,
            api_key: 'vQzxtX76pNFekG4w5BzC'
        };
        sendy.subscribe(params, function (err, result) {  if (err){ 
                console.log(err.toString());
                }else{ 
                UpdateData(recordID, email2, ListID);     
                console.log('Subscribed succesfully');}
            });

自定义字段数据未在sendy中传递。请帮帮忙

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-21 13:04:17

我已经找到了解决问题的办法。这很简单。您需要将您的自定义字段用引号括起来,这样您就完成了。就像这样

代码语言:javascript
复制
 var params = {
            email: email2,
         //make sure custom field names are same otherwise sendy would igore the fields
                'assignmentDetail':assignmentLink,
                'submissionDetail':submissionDetail,
                'FormLink':reviewerFormLink,
            
            list_id: ListID,
            api_key: 'vQzxtX76pNFekG4w5BzC'
        };
        sendy.subscribe(params, function (err, result) {  if (err){ 
                console.log(err.toString());
                }else{ 
                UpdateData(recordID, email2, ListID);     
                console.log('Subscribed succesfully');}
            });
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70789751

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档