Have you had a look at the x-callback-url support:
Note that you can also call these URLs from AppleScripts.