Get file path and save as variable

Depends a bit on the app in which you have it open.


See, for example:

Finding the File Path for the Front Document in the Front Application - Macro Library - Keyboard Maestro Discourse