Shiftbase logo Shiftbase automation · runs daily

Approve Shiftbase leave requests against the schedule

Staff request holidays from their own account, and a planner checks each request against the schedule before answering.

Cotlet does it in your own Shiftbase account with list_absence_requests, list_shifts, approve_absence_request and decline_absence_request, called by your AI agent, an n8n workflow or a script.

Hosted · nothing to install or maintain

Can Shiftbase do this on its own?

Shiftbase approves absence in the app, by a planner or a user with the right (checked 22 Oct 2026). The Public API lists absence and leave among its examples, and Shiftbase documents no rule that compares a request with the schedule.

How you do it in Shiftbase today

  1. Employees request holidays from their account, and the planner opens the pending request from the Requests view.
  2. The planner opens the Schedule tab for the same dates to see who else is off and who is on shift.
  3. The request is accepted or rejected, or left undecided, from its details.
  4. On approval, the absence policy decides what happens to shifts the employee already has in that period: remove them, keep them, or turn them into open shifts.
  5. Rules for balances and notice are set in the absence policy, which is tied to a contract type under Settings > Absence.

How to approve Shiftbase leave requests against the schedule

Prompt

Check the pending absence requests in Harbor Cafe. Approve a request if at least 3 colleagues stay on shift every day of it, decline the rest with a short note, and tell me which ones you declined.
  1. 01

    List what is pending

    list_absence_requests returns the requests still waiting for a decision, with the employee, department, dates and policy. The agent groups them by department.

  2. 02

    Count who stays on shift

    For each request, list_shifts reads the schedule for the same dates and department, and the agent counts the colleagues on shift per day, leaving out the requester.

  3. 03

    Apply your cover rule

    A request passes when every day meets the minimum from your prompt. It fails on the first day that falls short, and the agent notes which day.

  4. 04

    Approve or decline

    approve_absence_request runs for the requests that pass, and decline_absence_request for the rest with your note. Both reach the employee and wait for your OK by default.

  5. 05

    Watch the shifts

    After an approval, the agent reads the schedule again and lists the employee's shifts that the absence policy removed, kept or opened, so you can fill the open ones.

What you get back

Example data

Pending absence requests: 5
Approved 3 (cover of at least 3 every day):
- Lena Ortiz, 3-7 Nov, 2 shifts opened
Declined 2:
- Sam Okafor, 10-14 Nov: only 2 on shift on 12 Nov
Open shifts created by approvals: 2

Other ways to ask

  • Approve every request shorter than 3 days automatically and list the longer ones for me.
  • Show which pending requests clash with another request from the same department, and approve none.
  • Each morning, list the leave starting this week and the shifts that need cover.

What Shiftbase allows, and what to know first

  • Shiftbase lets you choose per absence policy whether an approved absence removes the shift, keeps it or turns it into an open shift.
  • Planners can approve absence requests, so a Planner account is enough for this job.
  • An absence policy is connected to a contract type, so staff on different contracts can follow different rules.
  • The Requests view lists the absence requests that still wait for approval.

approve_absence_request and decline_absence_request ask for your OK by default. To run it daily without you, switch confirmation off for those tools in your dashboard.

Sources: Shiftbase Help: Quick start guide · Shiftbase Help: Mobile app, my absence · Shiftbase Help: Full API access

Call approve_absence_request from a script

curl

curl -X POST https://cotlet.dev/api/v1/shiftbase/requests/7731/absence-request/approve \
  -H "Authorization: Bearer $COTLET_API_KEY"

Example response

{
  "request_id": "7731",
  "status": "approved",
  "affected_shifts": [
    {
      "id": "90455",
      "date": "2026-11-04",
      "result": "opened"
    },
    {
      "id": "90460",
      "date": "2026-11-06",
      "result": "opened"
    }
  ]
}

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is shiftbase_write → approve_absence_request. Example data.

Schedule it in n8n, Make, Zapier or cron

Shiftbase tools this automation uses

Cotlet Shiftbase tools used to approve Shiftbase leave requests against the schedule
Tool Parameters
list_absence_requests status, department_id
list_shifts from, to, department_id, employee_id
approve_absence_request request_id
decline_absence_request request_id, note
All 13 Shiftbase tools with descriptions

Frequently asked questions

Is it safe to connect Shiftbase to Cotlet?

Yes. You sign in to Shiftbase yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Shiftbase once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

Give your agent access to Shiftbase.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Shiftbase.