Sep 14, 2024
Obtain API Key
Open Google Docs
Create Custom Menu
onOpen
UI.createMenu('Custom Menu')
addItem('Summarize Selected Paragraph', 'summaryFunctionName')
Develop Summary Function
summaryDoc(paragraph)
text-davinci-002
)POST
), headers (content type and authorization), and payloadAccess Selected Paragraph
documentApp.getActiveDocument()
and getSelection()
summaryDoc()
functionOutput Summary to Document
Run
button for onOpen
function