Skip to main content
Answered

Can i create canvas kit apps with google apps script?


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": [
{ "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": [
{
"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?

 

Best answer by Diana Tripac

Hi @user1202​ 👋 You can use whatever language you like when creating Intercom apps. Have you followed our tutorial in the docs here for creating an app on the messenger? I can't debug the snippet you sent because I am not an expert in the google apps script, but as long as you are using our canvas kit reference as specified here then it should work 👍

View original
Did this topic help you find an answer to your question?

2 replies

Diana Tripac
Intercom Team
Forum|alt.badge.img+2
  • Senior Community Program Manager @Intercom
  • 154 replies
  • Answer
  • May 12, 2022

Hi @user1202​ 👋 You can use whatever language you like when creating Intercom apps. Have you followed our tutorial in the docs here for creating an app on the messenger? I can't debug the snippet you sent because I am not an expert in the google apps script, but as long as you are using our canvas kit reference as specified here then it should work 👍


  • New Participant
  • 1 reply
  • September 1, 2022

Hi @user1202​ 

 

I am about to start a project to build a sidebar app using google apps script. I was interested to see if you were able to get this figured out


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings