Auto-book my desk
Automatically book your usual desk on your office days, with a backup when it’s taken.
Prompt
Set up a scheduled task named "Auto-book my desk". - Schedule: every [RUN DAY AND TIME], my time. - Connectors for its runs: Robin (Workplace), plus Slack if I asked for a Slack DM below. - Notifications: [NOTIFICATIONS] when a run finishes. Email and phone notifications are task settings; a Slack DM is the last step of the task. - Before creating it, look up my desk with find_desks to get its desk id, floor id and building id, and run check_desk_availability for one upcoming day to confirm it can be booked. Tell me if it can't. - After creating it, tell me its approval setting. Runs only book on their own when the task approves automatically. Use this as the task's prompt, with the ids filled in: Book my desk in Robin for the next [WEEKS AHEAD] weeks. Use the Robin (Workplace) connector. Don't ask questions; nobody is watching this run. Desk: [DESK] (desk id, floor id and building id). Use the building's time zone for every booking. Days: [DAYS AND HOURS]. 1. get_current_user_info for today's date. Plan every office day from tomorrow through [WEEKS AHEAD] weeks out. 2. get_building_hours for the building over that range (at most 31 days per call). Skip closed days. Also skip US public holidays, even when Robin lists the building as open. 3. get_user_desk_reservations for the range. Skip any day where I already have a desk booking anywhere. 4. check_desk_availability for my desk with one window per remaining day, in the building's time zone. For each bookable day, call book_desk with the same desk, window and time zone, and reservationType set to the bookAs value it returned. 5. If my desk can't be booked on a day, book [IF MY DESK IS TAKEN]: use find_desks for the floor and check_desk_availability on those desks, and book the first bookable one. Never book a hot desk ahead of time. If nothing fits, skip the day and say why. 6. Never cancel, move or change a booking that already exists. 7. Finish with a short summary: each day, the desk booked, any backup desk and why, days skipped and why, and any failure with Robin's reason. If I asked for a Slack DM, send that summary to me as a Slack direct message. If the Robin connector offers my work schedule, time off or building closures, skip days I'm out or the building is closed.