Hi Zack,
You can use the javascript microflow button to trigger a microflow and to trigger javascript.
Here is the link to the javascript microflow button
https://appstore.home.mendix.com/link/app/27064/Mendix/JavaScript-Button
And here is a link to a stack overflow post about closing a browser window in javascript.
Hope this helps!