1 min read
– Rename Project – Click “Untitled product”
Replace the serial number value with your chatbot ID within the “callNewOaks” function and copy the function to replace the default function under “Code.gs” section
'serialNumber': '<YOUR_SERIAL_NUMBER>' The value of this “serialNumber” is located in Chatbot -> Settings -> General -> Chatbot ID.
'serialNumber': '<YOUR_SERIAL_NUMBER>'
// Replace <YOUR_SERIAL_NUMBER> with your chatbot ID.function callNewOaks(e) { var url = SpreadsheetApp.getActiveSpreadsheet().getUrl(); var options = { method: 'post', contentType: 'application/x-www-form-urlencoded', payload: { googleSheetUrl: url, serialNumber: '<YOUR_SERIAL_NUMBER>' } }; var response = UrlFetchApp.fetch( 'https://usapi.hottask.com/chat/chatbot/googlesheetedithook', options ); if (response.getResponseCode() == 200) { var content_text = response.getContentText(); if (JSON.parse(content_text).Succescc == false) throw new Error('http response not succescc'); } else throw new Error('http response code ' + response.getResponseCode());}
– Run the selected function – Click “Review permissions” – Choose an account – Click “Go to NewOaks AI(unsafe)” – Click “Allow”
You can modify the content of the Google Sheet and check whether the chatbot data is effective after 15 minutes.
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Post Comment