Shortcut help with the weather

I made this shortcut for my side job and it’s working great. I’m not good with this stuff so I need some help.

I’m looking to have the weather put in at the top of the menu. Also is there any way to enter an address for the destination and saves it till I’m ready to use it? It would always be a different address, I’m looking to do that instead of always typing it in when I’m ready to use it.

https://www.icloud.com/shortcuts/467c293d53a84155ac923c128b85342d

As far as getting the weather, this should be pretty straightforward: you can use the “Get Current Weather” action at the start of the Shortcut.

If I understand correctly, you would like to show this as part of the menu message? If so, you just need to enter the “message” field and, instead of typing, select “variables” and then choose the magic variable that is generated from that first action.

The second part of your question might be a little more difficult, but is probably still possible one way or another. Do you mean that you would like to save the address somewhere in between running the shortcut (for example, you want to run the shortcut multiple times, the first with the ‘meet you’ option, then with the directions to the destination?)

If that is what you mean, you can’t save information between running the shortcut different times—at least not within the shortcut itself. I suspect we could come up with a solution, though—could you clarify:

  1. That this is what you mean?
  2. Where the address information comes from (is it somewhere else on your phone that could potentially be shared into the shortcut, for example?)
  3. Whether you would be using your phone for anything else in between running the shortcut multiple times with the same address? (If not, you might be able to just use the clipboard to store the information temporarily, but obviously any other usage of your device might result in overwriting the information by mistake.)
  4. How do you envisage using the shortcut, in an ideal situation? At what point do you run each menu item? Perhaps it can be streamlined so that you only run it once (and so you only need to put in the information once) but it can perform multiple actions for you.

To add the weather into the menu, you just need to use a weather related action and a magic variable.

For example:

Could give you this:

But, if you want specific weather data, you probably want to build up a bit of text in a text action and then include that in your menu.

For example:

Could give you this:

In terms of saving destinations for later use, that’s a bit vague; but if you are looking for persistent data between shortcut runs, then I believe that you really ought to be looking at files.

Whilst @Kaitlin suggests clipboard use, and it is certainly viable as a place to put data, temporarily for near term re-use/transfer, I would suggest that for what I think you are asking for, it is not a practical place to store data. Using the clipboard in such a way effectively takes your clipboard out of active use or puts it at risk of overwriting. Using a file has no such downside or risk. My particular concern would be having an address, overwriting with something that corresponds to a different address, and then unwittingly using that without realising, and that resulting in a time delay/loss of work/etc. I just don’t think it is worth the risk, regardless of how small it might be.

In terms of file utilisation, maybe a dictionary structure saved as JSON would be most useful.

This example is for some web hooks someone asked about previously, but the principle is the same … it is just storing a web address (URL) rather than a physical address.

You could incorporate a set dictionary value and a file save action after your Ask for Input on the “???” destination. You could then have another option that allowed you to remove destinations.

I’d suggest using a choose from list action to do any form of location selection involving the dictionary of addresses. You could utilise this for all of your destination options that you work with currently, as a list option under a new list item called, for example, “Other Recent Destinations”, and of course for deletions.

Overall, this should then give you a list multiple accessible “temporary” destinations you could use over the course of an extended period of time of your choosing, for whatever your business needs are.

Hopefully that all makes sense, and gives you some directions to explore and/or some options to consider.

@Kaitlin @sylumer thanks for the responses. For some reason I thought it would be harder to put the weather in, I thought I would need a text box or something like that. It seemed harder for me now it makes sense thanks.

This is a better example of the 2nd question of mine. When I go to the airport to pick someone up, I already have there destination that they are going to. Right now I tap destination and type in there address then start driving there using GPS. Sometimes I have an hour or 30 mins to kill before they arrive, so I was thinking if I have time to waste is it possible to just enter there destination address somewhere in the shortcut then when I’m ready to leave with the person I’m picking up just go to the menu then destination and somehow get the address to appear in the destination to start the GPS to get me to the location. I would think I would just need to save the address for a little bit maybe 30-60 mins.

I can just enter it in when I’m ready to leave, I just enjoy the shortcuts and I’m trying to have fun with this.

Thanks again

Here is an example of a simple method you may want to adapt. — jay

https://www.icloud.com/shortcuts/d2dafd7a0f5f428bbac6e8dd1497ec3d

You could use a file as the other responses have suggested (which is where I suspected I was going to get to eventually); I agree with @sylumer that the clipboard is probably not ideal. They’ve already covered that option well, so just to throw a few other thoughts in the mix:

The other option would be to enter it in the shortcut itself like you’ve done with the airports (i.e. before you run the shortcut). You could put it at the top and use a variable to access it later on to make it a bit easier. Again you might have to consider how likely you are to forget to update it or something and take the client to the wrong place! The other downside would be that you would have to update it this way every time, including deleting the old data—even if you didn’t have the extra time to spare.

For a third option, you could write down the address somewhere (for example in a note) and adapt your shortcut to be able to be accessed from the share menu? This way it could prompt you to enter the destination if you haven’t shared one, and you wouldn’t have the issue of lingering data. There’s probably less chance for using the wrong address inadvertently, too.

Alternatively, could you just run the shortcut while you are waiting (as-is), enter the destination as you are currently doing, and then when you are ready to go just switch back over to your maps app (which should already have directions showing)?

Thanks for the help. That’s what I was doing entering the address when I was waiting, I just thought maybe there was another way. It’s fun playing around with shortcuts.

This is my basic weather shortcut.

Instead of a notification you can feed this all into a text field and spli, replace and otherwise message the output however you want. The get current weather provides a TON of data. The second field is F° temp.