{
  "schema_version": "1.0.0",
  "id": "time-off-to-team-calendar",
  "title": "Put BambooHR time off on the team calendar",
  "category": "hr-recruiting",
  "difficulty": "beginner",
  "featured": false,
  "description": "Copy each BambooHR time-off request onto a shared Google Calendar and tell the team channel who is out and when.",
  "tags": [
    "bamboohr",
    "google-calendar",
    "slack",
    "time-off"
  ],
  "apps": [
    "BambooHR",
    "Google Calendar",
    "Slack"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 2 steps after the trigger"
    ]
  },
  "tasks": {
    "typical": 2,
    "max": 2
  },
  "trigger": {
    "app": "BambooHR",
    "event": "Time Off Request",
    "kind": "polling",
    "title": "Approved time off",
    "why": "Fires for time-off requests with the status approved, so pending requests do not reach the calendar.",
    "config": {
      "Account": "YOUR_BAMBOOHR_SUBDOMAIN",
      "Status": "approved"
    },
    "outputs": [
      "request_id",
      "employee_name",
      "type",
      "start",
      "end",
      "amount_days",
      "status",
      "note"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "event",
      "kind": "action",
      "app": "Google Calendar",
      "event": "Create Detailed Event",
      "title": "Add it to the team calendar",
      "why": "An all-day block on the shared calendar, named so it reads in month view.",
      "fields": {
        "Calendar": "YOUR_TEAM_CALENDAR",
        "Summary": "{{trigger.employee_name}} out ({{trigger.type}})",
        "Start Date & Time": "{{trigger.start}}",
        "End Date & Time": "{{trigger.end}}",
        "All Day": "Yes",
        "Show me as Free or Busy": "Free"
      },
      "outputs": [
        "id",
        "html_link"
      ]
    },
    {
      "key": "tell",
      "kind": "action",
      "app": "Slack",
      "event": "Send Channel Message",
      "title": "Tell the team",
      "why": "One line in #team; no reason or note is shared.",
      "fields": {
        "Channel": "#team",
        "Message Text": ":palm_tree: {{trigger.employee_name}} is out {{trigger.start}} to {{trigger.end}} ({{trigger.amount_days}} days).",
        "Send as a bot?": "Yes",
        "Bot Name": "Zap alerts",
        "Include a link to this Zap?": "No"
      },
      "outputs": [
        "ts",
        "permalink"
      ]
    }
  ]
}
