File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
solutions/webhook-chat-app Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ function webhook() {
2323 "headers" : { "Content-Type" : "application/json; charset=UTF-8" } ,
2424 "payload" : JSON . stringify ( {
2525 "text" : "Hello from Apps Script!" ,
26- "thread" : { "threadKey" : "THREAD_KEY_VALUE" }
26+ "thread" : {
27+ "threadKey" : "THREAD_KEY_VALUE"
28+ }
2729 } )
2830 } ;
2931 const response = UrlFetchApp . fetch ( url , options ) ;
Original file line number Diff line number Diff line change 1717
1818// [START chat_webhook]
1919function webhook ( ) {
20- const url = "https://chat.googleapis.com/v1/spaces/SPACE_ID/messages"
20+ const url = "https://chat.googleapis.com/v1/spaces/SPACE_ID/messages?key=KEY&token=TOKEN "
2121 const options = {
2222 "method" : "post" ,
2323 "headers" : { "Content-Type" : "application/json; charset=UTF-8" } ,
24- "payload" : JSON . stringify ( { "text" : "Hello from Apps Script!" } )
24+ "payload" : JSON . stringify ( {
25+ "text" : "Hello from Apps Script!"
26+ } )
2527 } ;
2628 const response = UrlFetchApp . fetch ( url , options ) ;
2729 console . log ( response ) ;
You can’t perform that action at this time.
0 commit comments