This is not a complete answer, but this may (not sure) help you based on your actual requirement.
You can have a function like this and then using installed triggers you can call this function every minute to poll document and check whether someone has edited it or not.
function isEdited()
{
var MyDoc = DocumentApp.getActiveDocument().getBody();
var Text = MyDoc.editAsText().getText();
var DocLen= Text.length;
if(DocLen!= PropertiesService.getDocumentProperties().getProperty('DocLen'))
{
CallYourFunction();
PropertiesService.getDocumentProperties().setProperty('DocLen', DocLen)
}
}
Is 60 sec delay okey in your service... 60 sec is the maximum delay that can occur here.