【发布时间】:2021-06-24 12:15:51
【问题描述】:
我无法将自定义负载从我的 SLACK 平台的 nodejs webhook 代码发送回 dialogflow。
const {WebhookClient, Payload, Platforms, Suggestion} = require('dialogflow-fulfillment');
let payloadObj = new Payload(Platforms.SLACK, questionStringToSend);
agent.add(payloadObj);
这里,questionStringToSend 是我要发送的 JSON 负载。
任何帮助将不胜感激。
我的 JSON 结构如下:
{
"blocks":[
{
"type":"section",
"text":{
"type":"mrkdwn",
"text":"How do you rate the company?"
}
},
{
"type":"actions",
"elements":[
{
"type":"button",
"text":{
"type":"plain_text",
"text":0
},
"value":0
},
{
"type":"button",
"text":{
"type":"plain_text",
"text":1
},
"value":1
}
]
}
]
}
【问题讨论】:
标签: node.js dialogflow-es slack-api dialogflow-es-fulfillment slack-block-kit