How I Use Apple Shortcuts to Investigate 10x Faster in Alerting
You're on-call, it's 2 AM, Opsgenie is screaming, and you have a trace UUID in front of you. You know you need to search for it in Datadog... but you have to:
- Copy the UUID
- Open Chrome
- Go to Datadog
- Find the right page
- Paste the UUID
- Launch the search
6 steps and already 45 seconds wasted while the service is burning. π€
Plot twist: What if I told you that with a simple keyboard shortcut, you go from 6 steps to... just 1? Select your UUID, type ββ₯\, and BAM! Datadog opens directly on the right trace.
Today, I'll show you how I created an intelligent navigation system with Apple's Shortcuts app that automatically detects the type of information (UUID, Kubernetes pod, job ID, etc.) and sends you directly to the right place. Welcome to the future of investigation! π
The Problem: Multi-Tool Investigation Hell
The Reality of an SRE in Alerting
An Opsgenie alert wakes you up. In the message, you have:
- A trace UUID β to search in Datadog APM
- A K8s pod name β to inspect in kubectl
- A CI job ID β to check in GitHub Actions
- A build ID β to debug in Jenkins
- A Request ID β to trace in Grafana
The current workflow (without automation):
# Classic scenario at 3 AM
1. Read the Opsgenie alert β Identify the key info
2. Manually copy the UUID/ID/name
3. Remember which tool to use (Datadog? K8s? GitHub?)
4. Open the right site
5. Navigate to the right section
6. Paste and search
7. Repeat for each piece of info...
---
Total time: 2-3 minutes PER info
Stress level: π MAX
Error risk: High (wrong tool, typo, etc.)The painful stats:
- ~15 clicks on average to reach the right page
- 2.5 minutes lost per manual search
- 7-8 searches on average per incident
- H 20 minutes lost per incident just in navigation! π±
Why Classic Tools Aren't Enough
You'll tell me: "But I have Alfred/Raycast!". Yes, but:
β Alfred/Raycast: Great for launching apps, but...
- You have to type the command + the argument
- No automatic type detection
- Complex configuration for multi-tool usage
β Chrome Bookmarks: Convenient, but...
- Still have to navigate manually
- No dynamic parameter handling
- Slow when you have 50+ bookmarks
β Clipboard managers: Useful, but...
- No contextual intelligence
- You still have to do manual routingApple's Shortcuts app is the missing Swiss Army knife! π―
The Solution: An Intelligent Shortcut with Regex Detection
System Architecture
Here's how my magic shortcut works:
Demo in action:

The detailed flow:
- You select any text (UUID, ID, name, etc.)
- You type
ββ₯\(custom keyboard shortcut) - The shortcut analyzes with regex to identify the type
- It automatically opens the right URL with the right parameter
- Profit! You arrive directly where you need to be π
Creating the Basic Shortcut
Open the Shortcuts app on macOS and create a new shortcut:

πΎ Direct Download: Want to save time? Download my "Detective Mode" shortcut ready to use! You can then customize it according to your needs.
π± Shortcut: "Smart Investigation"
π Keyboard shortcut: ββ₯\ (Command + Option + \)
---
Actions:
1. Receive [Selection] as input from [Anywhere]
2. Set [Selected text] to [Shortcut Input]
3. If [Selected text] matches regex...
(This is where the magic happens!)Intelligent Detection Patterns
Here's a summary table of detection patterns. Each regex is optimized to avoid false positives:
| Type | Regex Pattern | Example | Automatic Action |
|---|---|---|---|
| π Datadog UUID | ^[0-9a-f]{8}-[0-9a-f]{4}-4... | f47ac10b-58cc-4372-a567-... | Opens Datadog APM trace |
| π³ Kubernetes Pod | ^[a-z0-9]...-[a-z0-9]{8,10}-[a-z0-9]{5}$ | auth-service-7d9f8c6b5-x7k2m | Terminal + kubectl logs -f |
| π§ GitHub Actions | ^[0-9]{10,11}$ | 12345678901 | Opens GitHub Actions Run |
| ποΈ Jenkins Build | ^[0-9]{1,6}$ | 42567 | Opens Jenkins Job + Build |
| π Grafana Hash | ^[0-9a-f]{16}$ | a1b2c3d4e5f6g7h8 | Opens Grafana Explore |
| π¨ Opsgenie Alert | ^[0-9a-f]{8}-[0-9a-f]{4}-... | 550e8400-e29b-41d4-... | Opens Alert Detail |
| π Docker Container | ^[0-9a-f]{12}$ or ^[0-9a-f]{64}$ | a1b2c3d4e5f6 | Terminal + docker logs -f |
| π« Jira Ticket | ^[A-Z]{2,10}-[0-9]{1,6}$ | DEVOPS-1234 | Opens Jira Issue |
| π IP Address | ^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$ | 192.168.1.1 | Menu: Ping/Traceroute/Whois |
π‘ Note: The complete patterns are configurable in the shortcut. You can add your own detections based on your tools!
Implementation: The Complete Shortcut
Configuration in Apple Shortcuts
Here's the complete shortcut flow (I'm giving you the pseudo-code as the visual interface is difficult to represent here):
π§ SHORTCUT: "Smart Investigation"
βββββββββββββββββββββββββββββββββββββ
1. Receive [Text] from [Selection]
2. Set variable [Input] = [Text]
3. Clean [Input] (trim spaces, lowercase if needed)
βββββββββββββββββββββββββββββββββββββ
4. IF [Input] matches UUID_REGEX
β Open URL: https://app.datadoghq.com/apm/trace/[Input]
βββββββββββββββββββββββββββββββββββββ
5. ELSE IF [Input] matches K8S_POD_REGEX
β Execute Shell script:
osascript -e 'tell application "Terminal"
do script "kubectl logs -f [Input] --tail=100"
activate
end tell'
βββββββββββββββββββββββββββββββββββββ
6. ELSE IF [Input] matches GH_JOB_REGEX
β Open URL: https://github.com/my-org/my-repo/actions/runs/[Input]
βββββββββββββββββββββββββββββββββββββ
7. ELSE IF [Input] matches JENKINS_REGEX
β Ask for job name (global variable or menu)
β Open URL: https://jenkins.company.com/job/[JOB_NAME]/[Input]
βββββββββββββββββββββββββββββββββββββ
8. ELSE IF [Input] matches OPSGENIE_REGEX
β Open URL: https://company.app.opsgenie.com/alert/detail/[Input]
βββββββββββββββββββββββββββββββββββββ
9. ELSE IF [Input] matches GRAFANA_REGEX
β Open URL: https://grafana.company.com/explore?query=[Input]
βββββββββββββββββββββββββββββββββββββ
10. ELSE IF [Input] matches DOCKER_REGEX
β Execute Terminal:
docker logs -f [Input] --tail=200
βββββββββββββββββββββββββββββββββββββ
11. ELSE IF [Input] matches IP_REGEX
β Menu: [Ping] [Traceroute] [Whois]
β Based on choice, execute appropriate command
βββββββββββββββββββββββββββββββββββββ
12. ELSE IF [Input] matches JIRA_REGEX
β Open URL: https://company.atlassian.net/browse/[Input]
βββββββββββββββββββββββββββββββββββββ
13. ELSE
β Google Search: "site:company.com [Input]"
β OR Slack search: slack://search?query=[Input]Concrete Example: Datadog UUID Detection
Here's how to configure UUID detection for Datadog APM:
Step 1: Create the "If" action
If [Shortcut Input] matches regular expression
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Options: β Case sensitiveStep 2: Build the URL
Text:
https://app.datadoghq.com/apm/trace/[Shortcut Input]Step 3: Open in browser
Open URL [Text]Real-world test:
# You have this message in Opsgenie:
"Error processing request f47ac10b-58cc-4372-a567-0e02b2c3d479"
# You select the UUID, you type ββ₯\
# β Chrome instantly opens on the Datadog trace!
Time saved: 45 seconds β 2 seconds πAdvanced Example: Kubernetes Pods Management
To quickly investigate a problematic pod:
Action: Execute Shell Script
#!/bin/bash
POD_NAME="$1"
# Open a new terminal with logs
osascript <<EOF
tell application "Terminal"
do script "kubectl logs -f $POD_NAME --tail=200 | grep -E 'ERROR|WARN|FATAL'"
activate
end tell
EOFBonus: Contextual menu for K8s
Menu: Choose from
- "Logs (-f tail 200)"
- "Describe pod"
- "Get pod events"
- "Exec into pod"
Based on choice:
- Logs: kubectl logs -f [POD] --tail=200
- Describe: kubectl describe pod [POD]
- Events: kubectl get events --field-selector involvedObject.name=[POD]
- Exec: kubectl exec -it [POD] -- /bin/bashAdvanced Use Cases
Contextual Menu for Kubernetes
Beyond simple kubectl logs, offer an action menu:
Menu: Choose from
- "Logs (-f tail 200)"
- "Describe pod"
- "Get pod events"
- "Exec into pod"Intelligent Detection for Jenkins
For Jenkins build numbers, ask which job:
JOB_DICTIONARY = {
"deploy-prod": "deployment/prod-pipeline",
"tests-integration": "tests/integration-suite"
}
Menu: Choose the job β Build the appropriate URLQuick IP Investigation
For a detected IP, offer several actions:
#!/bin/bash
# Menu: Ping | Traceroute | Whois | Check Blacklist
# Based on choice, execute the command or open the appropriate siteThe Concrete Gain
Before/after comparison on a typical incident:
| Step | Before (manual) | After (shortcut) |
|---|---|---|
| UUID β Datadog | 35 seconds | 2 seconds Β‘ |
| Pod β K8s Logs | 28 seconds | 3 seconds Β‘ |
| Ticket β Jira | 18 seconds | 2 seconds Β‘ |
| TOTAL | 93 seconds | 7 seconds |
| GAIN | - | 92% faster! π |
In one month: ~33 minutes saved, zero routing errors, and above all... much less stress on-call! π
3 Pro Tips to Go Further
1. Investigation History for Post-Mortems
Add an automatic log of each search:
#!/bin/bash
# Add to the shortcut to trace your path
echo "$(date '+%Y-%m-%d %H:%M:%S'): $TYPE_DETECTED - $INPUT" >> ~/investigation_history.logWhy is this useful? During the incident, you navigate quickly. With the history, you can reconstruct your reasoning for the post-mortem without racking your brain!
2. Team mode: Share with the whole team
# In Shortcuts:
File β Export β SmartInvestigation.shortcut
# Share via Slack, the whole team benefits! πBonus: Configure global variables (URLs, GitHub repos) so everyone can adjust to their environment:
URLS = {
"datadog": "https://app.datadoghq.com",
"grafana": "https://grafana.company.com",
"jenkins": "https://jenkins.company.com"
}3. Intelligent Fallback if Nothing Matches
If no pattern matches, offer options:
Contextual menu:
- "Search in Datadog"
- "Search in Slack"
- "Search in Google"
- "Copy and continue manually"This way, the shortcut remains useful even for edge cases! π―
Conclusion: Productivity is Automating the Annoying Stuff
In the end, this Apple shortcut is like having a personal assistant who knows all your tools by heart and instantly opens the right page in the right place. No more need to think, navigate, copy-paste... Just select and GO!
The concrete benefits:
- -92% time spent navigating during investigations
- 0 routing errors (no more "oops I searched in the wrong tool")
- 10x smoother investigation flow
- Stress divided by 2 on-call
- Jealous colleagues asking for your config π
The best part? Once configured, you don't even think about it anymore. It becomes a reflex: select, ββ₯\, investigate. Simple. Fast. Effective.
So, ready to transform your on-call shifts into moments of zen productivity? Your "3 AM self" will thank you! π
π₯ Bonus challenge: Time your next investigation before setting up the shortcut. Then measure again after. Send me your results, I bet you'll divide by 5 at minimum!
PS: My shortcut is called "Detective Mode" π΅οΈ and I configured Siri so I can say "Hey Siri, detective mode" when my hands are busy. Welcome to the future!
Stay in Touch
- π§ Email : tavernetech@gmail.com
- π GitHub : @DrakkarStorm
- πΊ YouTube : @TaverneTechh
Thank you for following me on this adventure! π
π Note: The original idea for this intelligent investigation system doesn't come from me. I simply adapted this concept for macOS using Apple's Shortcuts app, making this approach accessible to all Mac users without needing third-party tools.
This article was written with β€οΈ for the DevOps community.