The workout logger from the previous article captures exercise, weight, reps, and date in a Google Sheet. Great data. Useless when you're standing at the squat rack trying to remember your last session.
Every time I went to the gym, I'd stand there looking up when I last did legs and how much I squatted—like an idiot in front of the squat rack, trying to figure out what to work on. We're trying to grow big, strong, independent humans in my household — we actually need to push ourselves, not just guess at it.
The data was there. I just needed it to come to me.
This article shows you how to build an Apple Shortcuts automation on your iPhone that fires when you walk into the gym — it checks your history and delivers a personalized workout briefing before your first set.
What you'll build
An Apple Shortcuts location automation that triggers when your iPhone detects you've arrived at the gym. It calls a Google Apps Script endpoint, reads your workout history, determines which muscle group is next in your rotation, and sends you a notification showing your last session's max weights for each exercise.
What you'll need
Apple Shortcuts (iOS 16+)
How the rotation logic works
Some workout plans use a day-of-week rotation: Monday is Push, Tuesday is pull, Wednesday is legs. But I skip days, you skip days, and now your plan is behind, ahead, or lost.
Instead, our script uses whatever you last logged. The Apps Script endpoint looks at your most recent session, reads the muscle groups you've trained, and moves to the next one in the rotation. If you did pull last time, you're doing Push this time. You can't get out of sync because it always picks up where you left off.
This requires one small addition to the existing sheet. We'll need to add a day column to the workout log, and it needs to be populated with the muscle group when you log a set.
Google Sheets Template: https://docs.google.com/spreadsheets/d/1cJViazT5MEh55wX6B7Sg4o-7zYe-3mtkUtW9W7zdp_c/copy
Logger Shortcut: https://www.icloud.com/shortcuts/1b0c9c0b7da54d378b6e853c08f6f72d
Gym Briefing Shortcut: https://www.icloud.com/shortcuts/71a91c1e5aee456ca848d1cf7dd8ce7b
Step 1: Copy the template
Copy the template for yourself.
The Workout Log tab has a Muscle Group column that you'll need.
Step 2: Update Your Logging Shortcut
Open the workout logger Shortcut you built from this article. At the very beginning, add a choose from Menu action with your muscle groups: Legs, Pull, Push, Full Body, Core, or whatever you're using.
Set the result to a variable called muscleGroup. Then find the "Get Contents of URL" action where you log a set and add muscleGroup as a parameter in the request body.

Updated Shortcut: https://www.icloud.com/shortcuts/1b0c9c0b7da54d378b6e853c08f6f72d
Step 3: Update your config
In the template sheet, go to Extensions → Apps Script. At the top of the script, find the config section and fill in your details.
const PERSON_1_NAME = "Your Name"
const PERSON_1_PHONE = "+1234567890"
const PERSON_2_NAME = "Partner Name" // leave blank if solo
const PERSON_2_PHONE = "+0987654321" // leave blank if solo
const MUSCLE_GROUP_ROTATION = ["Push", "Pull", "Legs","Full Body","Core"]Update MUSCLE_GROUP_ROTATION to match your program. Just make sure the names match exactly what you pick in your logging Shortcut. The script handles the rest.
Step 4: Deploy the Web App
Still in Apps Script, go to Deploy → Manage Deployments.
If this is your first deployment: click New Deployment, set "Execute as" to yourself and "Who has access" to Anyone, then click Deploy.
If you already deployed the logger from the previous article, click the pencil icon next to your existing deployment, bump the version to "New version," and click Deploy.
Either way, copy the deployment URL when it appears — you'll paste it into the Shortcut in the next step.
Step 5: Build the Location Automation in Shortcuts
This is a different kind of Shortcut than the logger. The logger is something you tap manually. This one runs by itself when you walk through the door.
Open Shortcuts → Automation tab → tap the + in the top right → Personal Automation → Location.
Set your gym as the location. A 100–150 meter radius works well. Set the trigger to "Arrives." Turn off "Ask Before Running"—it is buried in the automation settings, and if you leave it on, you'll get a confirmation prompt every time, which defeats the whole point.
Now build the Shortcut actions:
Get the briefing from Apps Script.
Add a "Get Contents of URL" action. Set the method to GET. The URL is your deployment URL with your phone number appended:
https://script.google.com/macros/s/YOUR_DEPLOYMENT_ID/exec?phone=+1234567890Replace YOUR_DEPLOYMENT_ID with your actual deployment URL, and hardcode your phone number — same number you put in the config.

Parse the response
Add a "Get Dictionary from Input" action, using the output from the URL fetch.
Build the message text.
Then add a "Repeat with Each" action over Dictionary Value for exercises. Inside the loop, add another "Text" action:
Collect each line using an "Add to Variable" action — create a variable called briefingLines.

Deliver the briefing
After the loop, add a "Show Notification" action. Set the title to "Gym Briefing" and the body to the briefingLines variable joined with newlines.
If you'd rather get an iMessage (it persists in your thread, easier to glance at mid-set), use "Send Message" instead — know that iOS 16+ will prompt for confirmation the first time, and in some versions you can't suppress that prompt entirely. Notifications are quieter and require no permission dance.

The final briefing looks like this:
Gym Briefing
- Deadlift: 245x5 (Mar 28)
- Barbell Row: 155x8 (Mar 25)
- Bicep Curl: 55x10 (Mar 28)Gotchas
"Ask Before Running" will be turned back on after an iOS update.
Apple occasionally resets automation permissions silently after a major update. If the automation stops firing automatically one day, check that setting first before debugging anything else.
First run with no history.
The first time you use the briefing, no muscle groups are logged in the sheet yet. The notification will say "Gym Briefing" with no exercise history below it. That's correct — you haven't logged Push yet. Log your session, and next time it'll have data.
Exercises that span multiple muscle groups.
If you log Deadlifts under both Pull and Legs, the briefing for each day will show the last Deadlift you logged under that specific muscle group. They don't cross-contaminate. This is usually the right behavior, but it's worth knowing.
Geofence lag.
The location trigger relies on your phone getting a clean GPS fix. In a basement gym or a building with a lot of RF interference, the trigger can fire a minute or two after you arrive — or occasionally miss entirely. If reliability matters more than automation magic, you can always add the Shortcut to your Home Screen as a one-tap backup.
The rotation only knows what you tell it.
If you do a random arms day and don't log it with a muscle group, the rotation doesn't know it happened. It picks up from the last thing you properly logged. This is a feature, not a bug — the rotation tracks what you actually did with intention, not everything you touched.
Redeploy after every config change.
If you edit the config and don't redeploy with a new version, the changes won't take effect. Every time you change the script, bump the version.
What This Changes
The actual workout doesn't change. The data you're logging doesn't change. What changes is that you stop doing the dumb thing I was doing — standing in a rack, squinting at a spreadsheet, reconstructing your training history from memory.
You walk in. Your phone already knows what you did last time and what's next. You check the notification, load the bar, and get to work.
The next step in the series is having Claude analyze your training history — looking for plateaus, spotting when you've been stuck at the same weight for too long, and suggesting when to push and when to deload. The data's all in the sheet already.