Location Awareness Question - Can I do the same in javascript?

Can anyone explain where/how Drafts get the location data?? I am trying to use location capture in Obsidian and am curious how Drafts is able to obtain gps location so quickly (as compared with accessing this information from shortcuts).

I would like to generate the same info directly in Obsidian, currently I am using Drafts to create some of my notes and sending them to Obsidian.

Thanks for any guidance.


Drafts uses standard Apple location API to obtain location information. I don’t know how/where/if Obsidian exposes similar information.

Slightly off topic but…

… Is location information available to a (probably Javascript) action?

I’d like to add to my daily draft with “At home” versus, say, “Johannesburg” or “Istanbul”.

You could get your GPS coordinates from Drafts template tags (utilising draft.processTemplate() in JavaScript) and associate the result with whatever tolerance you wish to a location, or use an API (or call to Shortcuts to call an Apple API) to get an address.

1 Like