You shouldn’t need any new JavaScript for this. There is action called “Open URL” in (I believe) Nanoflow Commons. Pass that the instagram URL like this:
instagram://user?username={USERNAME}
and the app should open.
Should be able to with nanoflow + javascript. Have you try something like this?
https://stackoverflow.com/questions/42254165/how-to-make-instagram-open-in-app-button