Yes, you can do this and it’s described in the post included by @Suvrutt_Gurjar. You may want to start reading from Post #15 in that thread to get to the meat of how it was implemented.
Unfortunately, as far as I know, there is not a way to capture the automatically generated filename when you are saving a PDF from a workflow. But you can specify which path and filename to use.
I created my solution as a two-step workflow to generate invoices:
- Creates the path + filename and saves it into a Files table - along with any pertinent info.
- Generate/Send PDF using the path + filename saved in step one. Because Step 1 saves to a different table you do have access to the changes immediately within the workflow to use when generating.