by Sergiu Susman
Version 6 (April 19, 2026)
Download (15 downloads)
When the battery level is lower than the selected value, acquire the device's location and upload the result to Google Drive. This happens continuously at around 3 minutes intervals until the battery level is back up again (higher than the selected value). A temporary alarm is also set when first entering this low battery state so that the device will ring instead of dying in silence.
Only a single last_dying_gasp_location.json file is stored (in both a local and a remote Drive folder) and always overwritten. If you don't like the defaults, folder paths are configurable and persistently stored as atomics.
Optionally, and if enabled, the generated json file or its text can be content shared with the included "DG Location JSON resolver" flow to view the location in the default map app. (e.g. select an exported last_dying_gasp_location.json from the Google Drive app -> "Send a copy" -> "Automate flow" -> "DG Location JSON resolver"). Besides testing, this would really only be useful to run from another device which has access to Google Drive for the obvious reason that the original device could be battery dead already. If you don't have another Automate device, you can always open the json manually.