hi, i am trying to create an intercom canvas kit, i create a url for initialize and submit flow on google apps script but it don't work well
this is my google apps script code
INITIALIZE
function doPost(e) {
var Json = JSON.parse(e.postData.contents);
sendDataSocket(Json)
var CanvasBody = {
"canvas": {
"content": {
"components": t
{ "type": "button",
"label": "Click ME!!!!",
"style": "primary",
"id": "url_button",
"action": {
"type": "submit"
}
},
],
},
},
};
return ContentService.createTextOutput(JSON.stringify(CanvasBody)).setMimeType(ContentService.MimeType.JSON);
}
SUBMIT
function doPost(e) {
var Json = JSON.parse(e.postData.contents);
var CanvasBody = {
"canvas": {
"content": {
"components": u
{
"type": "text",
"text": "This is a text component"
}
]
}
},
"event": { "type": "completed" }
}
return ContentService.createTextOutput(JSON.stringify(CanvasBody)).setMimeType(ContentService.MimeType.JSON);
}
Is it possible to create workflows for canvas kit in google apps script?
what am I doing wrong?