Workflow step with JavaScript: result is a link to a generated a PDF file - how can I retrieve it?

Check this Workflow action to navigate to url

Make sure the variable file is a string containing a valid URL.