Triggering external application from OSC

Hi everyone,

I have this Javascript which is working fine when using the Script Editor (on Mac):

const app = Application('Google Chrome Beta');

app.activate();

const sysEvents = Application('System Events');

sysEvents.processes['Google Chrome Beta'].menuBars[0].menuBarItems['File'].menus['File'].menuItems['New Tab'].click();

Is there a way to trigger it directly from OSC by using for instance a button widget ?