By Nan Jiang

Automating Location Updates with Apple Shortcuts and Redis

How I built an automated system to track and display my location a week ago using Apple Shortcuts, Upstash Redis

automationapple-shortcutsredis

I wanted to add a dynamic "Location a week ago" feature to my website that would automatically update based on my actual location a week ago. In this post, I'll explain how I built this system using Apple Shortcuts, Upstash Redis.

System Overview

The system consists of two main components:

  1. Apple Shortcuts: Captures and sends location data
  2. Upstash Redis: Stores location data with timestamps

Setting Up the Infrastructure

1. Apple Shortcuts Automation

I created an Apple Shortcut that:

  • Gets my location
  • Formats it into a simple string
  • Sends it to Upstash Redis with the date as the key

You can get the shortcut template here.

You should set to run shortcut automatically everyday through automation or when you trigger it.

2. Upstash Redis Setup

I use Upstash Redis as a simple key-value store where:

  • Keys are dates in the format M-D-YY (e.g., 3-18-25)
  • Values are location strings (e.g., Los_Angeles)

This provides a historical record of my locations over time. You can choose to display your location data that is a week ago.

Setting Up Your Own System

To implement this for your own website:

  1. Download the Apple Shortcuts template
  2. Set up an Upstash Redis database
  3. Configure the automation triggers
  4. Include in your website