Yes, it is a contextual trigger. Take a look at the
Cats Addon. You will handle the event by including it in your manifest:
example:
"drive": {
"onItemsSelectedTrigger": {
"runFunction": "getFolderID"
}
}
Then in your code:
function getFolderID(e) { // "e" is the event object
console.log(e);
var items = e.drive.selectedItems; //this may not be needed**
//write some code to parse the items to find the folderID
//**may be as easy as " const folderID = e.parameters.id "
//pass the fileID to your main function and do the work :)
return yourMainFunction(folderID);
}
Good luck!