Skip to main content

Google Sheets Integration

Apply changes immediately in Google Sheets​

Click on "Apps Script"​

  • Rename project - Click on "Untitled project"

Set up the CallNewOaks function​

Replace the serial number value with your chatbot ID within the "callNewOaks" function and copy the function to replace the default function in the "Code.gs" section.

'serialNumber': '<YOUR_SERIAL_NUMBER>' The value of this "serialNumber" can be found in Chatbot -> Settings -> General -> Token.

// 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 failed');
} else throw new Error('HTTP response code ' + response.getResponseCode());
}

Save project​

  • Run the selected function - Click on "Review Permissions" - Choose an account - Click on "Go to Appointify" - Click on "Allow"

Add trigger​

Click on "Triggers" - Create a new trigger - Add trigger for Neoagent AI - Choose an account

Verify data synchronization​

You can modify the content of the Google sheet and check if the chatbot data is active after 15 minutes.