iOS Shortcuts
Attendance shortcut
3 actions. Works.
The shortcut (3 actions)
1
Get Contents of URL
- URL:
— - Method: POST
- Headers → Add field:
KeyX-API-Key· Value your API key - Request Body: JSON
Body — pick one:
With GPS (add two Text fields in the JSON body):
latitude→ Text → e.g.40.5426(or use a Location variable)longitude→ Text → e.g.-8.5386
Without GPS — leave JSON body empty (0 items) or add an empty Dictionary action and select it as body.
Auto in/out — empty body. Server checks Odoo state and toggles the right way.
Force check-in — add field action · Text · in
Force check-out — add field action · Text · out
2
Get Dictionary Value
- Get Value:
message - in: Contents of URL
Do not add “Get Dictionary from Input”. Contents of URL is already the JSON response.
3
Show Notification
- Notification text → Dictionary Value (from step 2)
- Title → optional (leave blank or set e.g. “Odoo”)
- Attachment → remove if empty
What the notification says
Checked in ✓ 0h 55m worked today · since 09:02
That’s the message field — title + details in one string.
Live GPS instead of fixed coords
Before step 1, add Get Current Location. In the JSON body use:
latitude→ tap variable → Latitude from Locationlongitude→ tap variable → Longitude from Location
Fancier notification (optional)
Instead of message, use two steps both reading from Contents of URL:
notification_title→ Show Notification titlenotification_body→ Show Notification body
Both must use Contents of URL — never chain off the previous Dictionary Value.
Troubleshooting
- “Text to Dictionary” error → step 2 must use Contents of URL, not Dictionary Value from another step
- “Attendance error” in notification → wrong API key → Recover access
- Lost API key → /recover with Odoo email + password