Simple script template for Google Docs. Add in: Extension: Apps
var userQuestion = "What is the weather like today?";
var chatGPTResponse = getChatGPTResponse(userQuestion); Logger.log(chatGPTResponse);
//Make sure you have enabled the "UrlFetchApp" service in your Apps Script project.