Returns the path of the currently active/focussed file, whether it’s a note, a canvas, an image etc.
This action will return nothing if there is no active/focussed file, which can be tested for using a built-in “If” action with a “has any value” condition.
Parameters
Vault
The vault to work in.
Type: Vault reference
Return Value
Text
Example
Use a built-in If conditional (“If [Active File]
has any value
”) with the result of the Get Active File action to test if the active tab contains anything:
![](/_astro/afo-get-active-file.sQKLaj33_ZbETbR.webp)
Related Links
- Search the Actions for Obsidian community forum for "Get Active File"