Trigger a workflow after external website command is "done"


I am reading an external file into my solution to display a PDF.

In mobile, when the app is run from the desktop the open external website link works as a pop-up window, which is great because it has a done button, that returns me to my solution.

I am however wanting to delete the file from the filesystem when it has been viewed, so wondering if there is any way of triggering a workflow once that “Done” button is pressed.

It looks like pressing “Done” simply runs the application again from the desktop? or would a custom state still be saved?

You could link something like to the done button:

and use a workflow when page is loaded and get code from url = done → start workflow whatever you want (i.e. delete something)