Current location question

Hello all. New here, good to meet you.
Wondering if you might be able to help.

I have an automation that runs when I get to my local grocery store. It delivers a notification reminding me to take in my shopping bags and then it composes a text addressed to my wife stating my location w/ the note: need anything from the grocery store. My problem is that, the “current location” is returning the street address when really i want it to return the name of the grocery store. Can I do that w/ a dictionary or some other method?

right now, the message that my shortcut spits out is, “I’m at 12345 Harbor Blvd, do you need anything from the grocery store?”. I’d like it to say, “I’m at Albertsons, do you need anything from the grocery store” or “I’m at Target, do you…” or “Im at Trader Joes, …” These will all illicit different responses from the recipient than If I just say I’m at the grocery store (inevitably, she’ll ask - what store?)

1 Like

you can probably do this with a dictionary…

for the keys, put the street addresses. then get your location, look that up in the dictionary, grab the corresponding store name. place that in the message.

hope that made sense :slight_smile:

1 Like

Welcome Mkcrbn! As ThatNerd suggested, a dictionary is the way to go. Just in case that’s all new to you, I tossed together this example.

1 Like

Just a thought. Without seeing how you are structuring the shortcut, and not using any location based native shortcut triggers myself, I’m figuring that the automation is triggered by location, but the location then has to be picked up by getting the location again in the shortcut. As I say, I’m guessing here.

Now, assuming that is the case, there are two points of note. First, the shortcut has to get the location, adding additional processing time. Second, the geo location is a bit “spongy” as you set a trigger range. The smallest location ranging I see on my i*OS 13 devices is 100m. Therefore your trigger location could vary quite a bit and I would imagine you would need to cater for all possible addresses within that broad location which I guess would be quite a lot of street addresses for an urban area. Perhaps not so much of an issue if you are only dealing with larger stores?

Based on this I’d like to offer a different approach.

  • For each broad location around a shop, set-up a shortcut trigger that triggers a unique shortcut.
  • Each of the unique shortcuts has two actions. The first action specifies the text or text element to include in the message you want to send - i.e. either the full message or just the name of the store. The second action is to run anther shortcut.
  • The other shortcut to be run is therefore called by each of the location specific shortcuts. It would be configured to send your message to your wife.
  • I assume the initial location trigger/shortcut would be named to remind you about bags, but with iOS14, if it is fully backgrounded, you might need to pop a bag notification in the final shortcut.

As noted, there are a few base assumptions (aka guesses) here that this is trying to address, but I think this approach would potentially speed things up by not having to poll a location twice, and also allow for low resolution location triggers and looking up shop locations.

Hope that helps.

1 Like

This may be overkill for your use case, but you could also leverage the Google Places API to return a list of places based on your current location.

Here is a simple example you could build from.

Here is the documentation for the API. Uses the nearby sources

— jay

super overkill option: stick an NFC tag around the store :laughing:

Wow this is awesome thank you all.
let me absorb this and I’m sure I’ll have some follow-up questions :+1:

@jim_sauer, thank you.
I’ve built onto your Shortcuts and this is the result.
Would you know what I might be doing wrong?

Looks like the Get Dictionary Value did not find a match in your DICTIONARY action. The location returned (e.g., 12345 Harbor Blvd) must have an exact match (even the same case) for one of the Keys in the Dictionary.

You can insert a QUICK LOOK or SHOW actions in your shortcut to view the location and then make sure there is a corresponding key in the DICTIONARY.

If you like to share your shortcut, I’d be a glad to take a look.